mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- A_KIllSiblings and A_DamageSiblings didn't check for a valid master.
SVN r4242 (trunk)
This commit is contained in:
parent
e9cd2777f3
commit
bed47c6eff
1 changed files with 18 additions and 12 deletions
|
@ -2608,11 +2608,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillSiblings)
|
||||||
TThinkerIterator<AActor> it;
|
TThinkerIterator<AActor> it;
|
||||||
AActor *mo;
|
AActor *mo;
|
||||||
|
|
||||||
while ( (mo = it.Next()) )
|
if (self->master != NULL)
|
||||||
{
|
{
|
||||||
if (mo->master == self->master && mo != self)
|
while ( (mo = it.Next()) )
|
||||||
{
|
{
|
||||||
P_DamageMobj(mo, self, self, mo->health, damagetype, DMG_NO_ARMOR | DMG_NO_FACTOR);
|
if (mo->master == self->master && mo != self)
|
||||||
|
{
|
||||||
|
P_DamageMobj(mo, self, self, mo->health, damagetype, DMG_NO_ARMOR | DMG_NO_FACTOR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3501,18 +3504,21 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DamageSiblings)
|
||||||
ACTION_PARAM_INT(amount, 0);
|
ACTION_PARAM_INT(amount, 0);
|
||||||
ACTION_PARAM_NAME(DamageType, 1);
|
ACTION_PARAM_NAME(DamageType, 1);
|
||||||
|
|
||||||
while ( (mo = it.Next()) )
|
if (self->master != NULL)
|
||||||
{
|
{
|
||||||
if (mo->master == self->master && mo != self)
|
while ( (mo = it.Next()) )
|
||||||
{
|
{
|
||||||
if (amount > 0)
|
if (mo->master == self->master && mo != self)
|
||||||
{
|
{
|
||||||
P_DamageMobj(mo, self, self, amount, DamageType, DMG_NO_ARMOR);
|
if (amount > 0)
|
||||||
}
|
{
|
||||||
else if (amount < 0)
|
P_DamageMobj(mo, self, self, amount, DamageType, DMG_NO_ARMOR);
|
||||||
{
|
}
|
||||||
amount = -amount;
|
else if (amount < 0)
|
||||||
P_GiveBody(mo, amount);
|
{
|
||||||
|
amount = -amount;
|
||||||
|
P_GiveBody(mo, amount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue