- fixed: IceGuyFX2 set its owner too late.

This commit is contained in:
Christoph Oelckers 2020-11-25 07:37:17 +01:00 committed by drfrag
parent b3daaaffc8
commit 889b45e2e5
4 changed files with 3 additions and 27 deletions

View file

@ -125,8 +125,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

@ -6648,24 +6648,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

@ -867,9 +867,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);
}
}
}