Skip to content

Commit 03e42a1

Browse files
committed
Fix f501559 caused the aircraft to sometimes hover over the airport due to continuous command reception
1 parent 72e8bb2 commit 03e42a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Misc/Hooks.BugFixes.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,9 @@ DEFINE_HOOK(0x6F4C50, TechnoClass_ReceiveCommand_NotifyUnlink, 0x6)
12521252
if (!pCall->InLimbo // Has not already entered
12531253
&& (pCall->AbstractFlags & AbstractFlags::Foot) // Is foot
12541254
&& pCall->CurrentMission == Mission::Enter // Is entering
1255-
&& static_cast<FootClass*>(pCall)->Destination == pThis) // Is entering techno B
1255+
&& static_cast<FootClass*>(pCall)->Destination == pThis // Is entering techno B
1256+
&& pCall->WhatAmI() != AbstractType::Aircraft // Not aircraft
1257+
&& pThis->GetTechnoType()->Passengers > 0) // Have passenger seats
12561258
{
12571259
pCall->SetDestination(pThis->GetCell(), false); // Set the destination at its feet
12581260
pCall->QueueMission(Mission::Move, false); // Replace entering with moving

0 commit comments

Comments
 (0)