Skip to content

Commit 49e418e

Browse files
authored
fix(mechanics): Properly despawn carriers when they land (endless-sky#11687)
1 parent 76040e8 commit 49e418e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

source/Ship.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4651,8 +4651,9 @@ bool Ship::DoLandingLogic()
46514651
for(const auto &it : escorts)
46524652
{
46534653
const auto escort = it.lock();
4654-
// Check if escorts are also landed, or destroyed.
4655-
if(!escort || escort->IsDestroyed() || escort->zoom == 0.f)
4654+
// Check if escorts are also landed, destroyed, disabled, or being carried.
4655+
if(!escort || escort->IsDestroyed() || escort->IsDisabled() || escort->zoom == 0.f
4656+
|| !escort->GetSystem())
46564657
continue;
46574658
escortsLanded = false;
46584659
break;

0 commit comments

Comments
 (0)