- changed spectral missiles to use FriendPlayer instead of health to distinguish between player spawned and monster spawned versions. Also moved most of this into the basic missile spawning functions instead of littering all spectral missile spawning functions with these initializations.
SVN r3651 (trunk)
This commit is contained in:
parent
ddf1af455b
commit
0f8e2441a1
9 changed files with 68 additions and 31 deletions
|
|
@ -333,11 +333,6 @@ static void DoAttack (AActor *self, bool domelee, bool domissile,
|
|||
{
|
||||
missile->tracer=self->target;
|
||||
}
|
||||
// set the health value so that the missile works properly
|
||||
if (missile->flags4&MF4_SPECTRAL)
|
||||
{
|
||||
missile->health=-2;
|
||||
}
|
||||
P_CheckMissileSpawn(missile);
|
||||
}
|
||||
}
|
||||
|
|
@ -967,10 +962,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomMissile)
|
|||
// automatic handling of seeker missiles
|
||||
missile->tracer=self->target;
|
||||
}
|
||||
// set the health value so that the missile works properly
|
||||
// we must redo the spectral check here because the owner is set after spawning so the FriendPlayer value may be wrong
|
||||
if (missile->flags4&MF4_SPECTRAL)
|
||||
{
|
||||
missile->health=-2;
|
||||
if (missile->target != NULL && missile->target->player != NULL)
|
||||
{
|
||||
missile->FriendPlayer = int(missile->target->player - players) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
missile->FriendPlayer = 0;
|
||||
}
|
||||
}
|
||||
P_CheckMissileSpawn(missile);
|
||||
}
|
||||
|
|
@ -1121,11 +1123,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomComboAttack)
|
|||
{
|
||||
missile->tracer=self->target;
|
||||
}
|
||||
// set the health value so that the missile works properly
|
||||
if (missile->flags4&MF4_SPECTRAL)
|
||||
{
|
||||
missile->health=-2;
|
||||
}
|
||||
P_CheckMissileSpawn(missile);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue