mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- merged Thing_Destroy extension from Doom64 branch into trunk and extended it by a tid=0, tag!=0 case which will kill all shootable actors in sectors with the specified tag.
SVN r2825 (trunk)
This commit is contained in:
parent
b50007ecf6
commit
7b01f7b296
2 changed files with 19 additions and 5 deletions
|
@ -123,7 +123,7 @@ DEFINE_SPECIAL(UsePuzzleItem, 129, 2, 5, 5)
|
|||
DEFINE_SPECIAL(Thing_Activate, 130, 1, 1, 1)
|
||||
DEFINE_SPECIAL(Thing_Deactivate, 131, 1, 1, 1)
|
||||
DEFINE_SPECIAL(Thing_Remove, 132, 1, 1, 1)
|
||||
DEFINE_SPECIAL(Thing_Destroy, 133, 1, 2, 2)
|
||||
DEFINE_SPECIAL(Thing_Destroy, 133, 1, 3, 3)
|
||||
DEFINE_SPECIAL(Thing_Projectile, 134, 5, 5, 5)
|
||||
DEFINE_SPECIAL(Thing_Spawn, 135, 3, 4, 4)
|
||||
DEFINE_SPECIAL(Thing_ProjectileGravity, 136, 5, 5, 5)
|
||||
|
|
|
@ -1210,22 +1210,36 @@ FUNC(LS_Thing_Remove)
|
|||
}
|
||||
|
||||
FUNC(LS_Thing_Destroy)
|
||||
// Thing_Destroy (tid, extreme)
|
||||
// Thing_Destroy (tid, extreme, tag)
|
||||
{
|
||||
if (arg0 == 0)
|
||||
AActor *actor;
|
||||
|
||||
if (arg0 == 0 && arg2 == 0)
|
||||
{
|
||||
P_Massacre ();
|
||||
}
|
||||
else if (arg0 == 0)
|
||||
{
|
||||
TThinkerIterator<AActor> iterator;
|
||||
|
||||
actor = iterator.Next ();
|
||||
while (actor)
|
||||
{
|
||||
AActor *temp = iterator.Next ();
|
||||
if (actor->flags & MF_SHOOTABLE && actor->Sector->tag == arg2)
|
||||
P_DamageMobj (actor, NULL, it, arg1 ? TELEFRAG_DAMAGE : actor->health, NAME_None);
|
||||
actor = temp;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FActorIterator iterator (arg0);
|
||||
AActor *actor;
|
||||
|
||||
actor = iterator.Next ();
|
||||
while (actor)
|
||||
{
|
||||
AActor *temp = iterator.Next ();
|
||||
if (actor->flags & MF_SHOOTABLE)
|
||||
if (actor->flags & MF_SHOOTABLE && (arg2 == 0 || actor->Sector->tag == arg2))
|
||||
P_DamageMobj (actor, NULL, it, arg1 ? TELEFRAG_DAMAGE : actor->health, NAME_None);
|
||||
actor = temp;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue