Skip to content

Commit

Permalink
Fix a bug where Selectable=no spawned units would despawn outside the…
Browse files Browse the repository at this point in the history
… visible map
  • Loading branch information
ZivDero committed Feb 22, 2025
1 parent 8be8882 commit 534e5ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extensions/aircraft/aircraftext_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bool AircraftClassExt::_Unlimbo(Coordinate& coord, DirType dir)
if (FootClass::Unlimbo(adjusted_coord, dir)) {

const auto weapon = Class->Fetch_Weapon_Info(WEAPON_SLOT_PRIMARY).Weapon;
if (!Class->IsSelectable || !Class->IsLandable || (weapon && weapon->IsCamera)) {
if (!class_ext->IsSpawned && (!Class->IsSelectable || !Class->IsLandable || (weapon && weapon->IsCamera))) {
IsALoaner = true;
}

Expand Down

0 comments on commit 534e5ae

Please sign in to comment.