- added submission for raising master/children/siblings.

- added submission for no decals on wall option.
- removed some useless code from SpawnMissile function.


SVN r1716 (trunk)
This commit is contained in:
Christoph Oelckers 2009-07-13 22:07:18 +00:00
commit 8e5b7373b8
11 changed files with 148 additions and 79 deletions

View file

@ -1369,60 +1369,6 @@ FUNC(LS_Thing_SpawnFacing)
return P_Thing_Spawn (arg0, it, arg1, ANGLE_MAX, arg2 ? false : true, arg3);
}
static bool DoThingRaise(AActor *thing)
{
if (thing == NULL)
return false; // not valid
if (!(thing->flags & MF_CORPSE) )
return true; // not a corpse
if (thing->tics != -1)
return true; // not lying still yet
FState * RaiseState = thing->FindState(NAME_Raise);
if (RaiseState == NULL)
return true; // monster doesn't have a raise state
AActor *info = thing->GetDefault ();
thing->velx = thing->vely = 0;
// [RH] Check against real height and radius
fixed_t oldheight = thing->height;
fixed_t oldradius = thing->radius;
int oldflags = thing->flags;
thing->flags |= MF_SOLID;
thing->height = info->height; // [RH] Use real height
thing->radius = info->radius; // [RH] Use real radius
if (!P_CheckPosition (thing, thing->x, thing->y))
{
thing->flags = oldflags;
thing->radius = oldradius;
thing->height = oldheight;
return false;
}
S_Sound (thing, CHAN_BODY, "vile/raise", 1, ATTN_IDLE);
thing->SetState (RaiseState);
thing->flags = info->flags;
thing->flags2 = info->flags2;
thing->flags3 = info->flags3;
thing->flags4 = info->flags4;
thing->health = info->health;
thing->target = NULL;
thing->lastenemy = NULL;
// [RH] If it's a monster, it gets to count as another kill
if (thing->CountsAsKill())
{
level.total_monsters++;
}
return true;
}
FUNC(LS_Thing_Raise)
// Thing_Raise(tid)
{
@ -1431,7 +1377,7 @@ FUNC(LS_Thing_Raise)
if (arg0==0)
{
ok = DoThingRaise (it);
ok = P_Thing_Raise (it);
}
else
{
@ -1439,7 +1385,7 @@ FUNC(LS_Thing_Raise)
while ( (target = iterator.Next ()) )
{
ok |= DoThingRaise(target);
ok |= P_Thing_Raise(target);
}
}
return ok;