- Added a damage type parameter to A_KillChildren, A_KillMaster, and

A_KillSiblings. 


SVN r2023 (trunk)
This commit is contained in:
Randy Heit 2009-12-13 04:59:19 +00:00
parent 2fb2c79887
commit b3d2a1f074
3 changed files with 24 additions and 11 deletions

View File

@ -1,3 +1,7 @@
December 12, 2009
- Added a damage type parameter to A_KillChildren, A_KillMaster, and
A_KillSiblings.
December 11, 2009 (Changes by Graf Zahl) December 11, 2009 (Changes by Graf Zahl)
- fixed: Auto-COMPAT_SHORTTEX for IWADs must be set per IWAD, not in general - fixed: Auto-COMPAT_SHORTTEX for IWADs must be set per IWAD, not in general
for Doom. for Doom.

View File

@ -1951,11 +1951,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIf)
// A_KillMaster // A_KillMaster
// //
//=========================================================================== //===========================================================================
DEFINE_ACTION_FUNCTION(AActor, A_KillMaster) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillMaster)
{ {
ACTION_PARAM_START(1);
ACTION_PARAM_NAME(damagetype, 0);
if (self->master != NULL) if (self->master != NULL)
{ {
P_DamageMobj(self->master, self, self, self->master->health, NAME_None, DMG_NO_ARMOR); P_DamageMobj(self->master, self, self, self->master->health, damagetype, DMG_NO_ARMOR);
} }
} }
@ -1964,16 +1967,19 @@ DEFINE_ACTION_FUNCTION(AActor, A_KillMaster)
// A_KillChildren // A_KillChildren
// //
//=========================================================================== //===========================================================================
DEFINE_ACTION_FUNCTION(AActor, A_KillChildren) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillChildren)
{ {
ACTION_PARAM_START(1);
ACTION_PARAM_NAME(damagetype, 0);
TThinkerIterator<AActor> it; TThinkerIterator<AActor> it;
AActor * mo; AActor *mo;
while ( (mo = it.Next()) ) while ( (mo = it.Next()) )
{ {
if (mo->master == self) if (mo->master == self)
{ {
P_DamageMobj(mo, self, self, mo->health, NAME_None, DMG_NO_ARMOR); P_DamageMobj(mo, self, self, mo->health, damagetype, DMG_NO_ARMOR);
} }
} }
} }
@ -1983,16 +1989,19 @@ DEFINE_ACTION_FUNCTION(AActor, A_KillChildren)
// A_KillSiblings // A_KillSiblings
// //
//=========================================================================== //===========================================================================
DEFINE_ACTION_FUNCTION(AActor, A_KillSiblings) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillSiblings)
{ {
ACTION_PARAM_START(1);
ACTION_PARAM_NAME(damagetype, 0);
TThinkerIterator<AActor> it; TThinkerIterator<AActor> it;
AActor * mo; AActor *mo;
while ( (mo = it.Next()) ) while ( (mo = it.Next()) )
{ {
if (mo->master == self->master && mo != self) if (mo->master == self->master && mo != self)
{ {
P_DamageMobj(mo, self, self, mo->health, NAME_None, DMG_NO_ARMOR); P_DamageMobj(mo, self, self, mo->health, damagetype, DMG_NO_ARMOR);
} }
} }
} }

View File

@ -209,9 +209,9 @@ ACTOR Actor native //: Thinker
action native A_RemoveMaster(); action native A_RemoveMaster();
action native A_RemoveChildren(bool removeall = false); action native A_RemoveChildren(bool removeall = false);
action native A_RemoveSiblings(bool removeall = false); action native A_RemoveSiblings(bool removeall = false);
action native A_KillMaster(); action native A_KillMaster(name damagetype = "none");
action native A_KillChildren(); action native A_KillChildren(name damagetype = "none");
action native A_KillSiblings(); action native A_KillSiblings(name damagetype = "none");
action native A_RaiseMaster(); action native A_RaiseMaster();
action native A_RaiseChildren(); action native A_RaiseChildren();
action native A_RaiseSiblings(); action native A_RaiseSiblings();