- Fixed: A_RemoveSiblings and A_KillSiblings did not check that the caller had a master to deduce siblings from.

SVN r4237 (trunk)
This commit is contained in:
Randy Heit 2013-04-30 02:46:47 +00:00
parent f7aa019f85
commit 5dc034c2ed
1 changed files with 12 additions and 6 deletions

View File

@ -3780,11 +3780,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveSiblings)
ACTION_PARAM_START(1);
ACTION_PARAM_BOOL(removeall,0);
while ((mo = it.Next()) != NULL)
if (self->master != NULL)
{
if (mo->master == self->master && mo != self && (mo->health <= 0 || removeall))
while ((mo = it.Next()) != NULL)
{
P_RemoveThing(mo);
if (mo->master == self->master && mo != self && (mo->health <= 0 || removeall))
{
P_RemoveThing(mo);
}
}
}
}
@ -3831,11 +3834,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseSiblings)
TThinkerIterator<AActor> it;
AActor *mo;
while ((mo = it.Next()) != NULL)
if (self->master != NULL)
{
if (mo->master == self->master && mo != self)
while ((mo = it.Next()) != NULL)
{
P_Thing_Raise(mo);
if (mo->master == self->master && mo != self)
{
P_Thing_Raise(mo);
}
}
}
}