- fixed: IceGuyFX2 set its owner too late.

This commit is contained in:
Christoph Oelckers 2020-11-25 07:37:17 +01:00
parent 9925cc380e
commit e19b1b2ee7
4 changed files with 3 additions and 27 deletions

View file

@ -117,8 +117,6 @@ AActor *P_OldSpawnMissile(AActor *source, AActor *owner, AActor *dest, PClassAct
AActor *P_SpawnMissile (AActor* source, AActor* dest, PClassActor *type, AActor* owner = NULL);
AActor *P_SpawnMissileZ(AActor* source, double z, AActor* dest, PClassActor *type);
AActor *P_SpawnMissileXYZ(DVector3 pos, AActor *source, AActor *dest, PClassActor *type, bool checkspawn = true, AActor *owner = NULL);
AActor *P_SpawnMissileAngle(AActor *source, PClassActor *type, DAngle angle, double vz);
AActor *P_SpawnMissileAngleZ(AActor *source, double z, PClassActor *type, DAngle angle, double vz);
AActor *P_SpawnMissileAngleZSpeed(AActor *source, double z, PClassActor *type, DAngle angle, double vz, double speed, AActor *owner = NULL, bool checkspawn = true);
AActor *P_SpawnMissileZAimed(AActor *source, double z, AActor *dest, PClassActor *type);

View file

@ -6705,24 +6705,6 @@ DEFINE_ACTION_FUNCTION(AActor, OldSpawnMissile)
//
//---------------------------------------------------------------------------
AActor *P_SpawnMissileAngle (AActor *source, PClassActor *type, DAngle angle, double vz)
{
if (source == nullptr || type == nullptr)
{
return NULL;
}
return P_SpawnMissileAngleZSpeed (source, source->Z() + 32 + source->GetBobOffset(), type, angle, vz, GetDefaultSpeed (type));
}
AActor *P_SpawnMissileAngleZ (AActor *source, double z, PClassActor *type, DAngle angle, double vz)
{
if (type == nullptr)
{
return nullptr;
}
return P_SpawnMissileAngleZSpeed (source, z, type, angle, vz, GetDefaultSpeed (type));
}
AActor *P_SpawnMissileZAimed (AActor *source, double z, AActor *dest, PClassActor *type)
{
if (source == nullptr || type == nullptr)

View file

@ -875,9 +875,9 @@ class Actor : Thinker native
return SpawnMissileAngleZSpeed (pos.z + 32 + GetBobOffset(), type, angle, vz, GetDefaultSpeed (type));
}
Actor SpawnMissileAngleZ (double z, class<Actor> type, double angle, double vz)
Actor SpawnMissileAngleZ (double z, class<Actor> type, double angle, double vz, Actor owner = null)
{
return SpawnMissileAngleZSpeed (z, type, angle, vz, GetDefaultSpeed (type));
return SpawnMissileAngleZSpeed (z, type, angle, vz, GetDefaultSpeed (type), owner);
}

View file

@ -169,11 +169,7 @@ class IceGuyFX : Actor
{
for (int i = 0; i < 8; i++)
{
Actor mo = SpawnMissileAngleZ (pos.z+3, "IceGuyFX2", i*45., -0.3);
if (mo)
{
mo.target = target;
}
SpawnMissileAngleZ (pos.z+3, "IceGuyFX2", i*45., -0.3, target);
}
}
}