Skip to content

Commit

Permalink
Fix spawner aircraft being unable to land on hover spawners
Browse files Browse the repository at this point in the history
  • Loading branch information
ZivDero committed Mar 5, 2025
1 parent 962714b commit 956299f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/new/spawnmanager/spawnmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "animtype.h"
#include "cell.h"
#include "extension.h"
#include "hoverlocomotion.h"
#include "ionstorm.h"
#include "kamikazetracker/kamikazetracker.h"
#include "tibsun_inline.h"
Expand Down Expand Up @@ -530,10 +531,10 @@ void SpawnManagerClass::AI()
* If we've arrived at the spawner, "land" (despawn).
* Otherwise, keep going towards the spawner.
*/
Cell owner_coord = Owner->Get_Cell();
Cell spawnee_coord = spawnee->Get_Cell();
Cell owner_cell = Owner->Get_Cell();
Cell spawnee_cell = spawnee->Get_Cell();

if (owner_coord == spawnee_coord && std::abs(spawnee->Coord.Z - Owner->Coord.Z) < 20)
if (owner_cell == spawnee_cell && (std::abs(spawnee->Coord.Z - Owner->Coord.Z) < 20 || (Owner->Is_Foot() && Owner->Techno_Type_Class()->Locomotor == __uuidof(HoverLocomotionClass) && spawnee->Coord.Z <= Owner->Coord.Z + 20)))
{
/**
* WARNING: Limbo() can destroy the unit in certain situations. If that happens, we
Expand Down

0 comments on commit 956299f

Please sign in to comment.