- Fixed: G_DoPlayDemo did not free the demobuffer or the CVAR backups when it

failed to start the demo.
- Added a MF5_BRIGHT flag to always render an actor fullbright.
- Fixed: Calling Door_Animated with a non-zero tag created a new thinker
  for each two-sided line of the sector.
- Added Karate Chris's submission for making 'spray' a cheat.
- Added CO2's default parameter additions for several Doom code pointers
  submission.
- Added CO2's A_RemoveMaster/A_RemoveChildren submission.
- Added Blzut3's SBARINFO replacement for the Doom statusbar.
- Fixed: SBarInfo still displayed the wrong bar for height 0
- Added A_KillSiblings and A_DamageSiblings code pointers.
- added MaxAbsorb and MaxFullAbsorb properties for Armor.


SVN r1304 (trunk)
This commit is contained in:
Christoph Oelckers 2008-12-06 10:22:37 +00:00
commit 153a2a4c2c
26 changed files with 367 additions and 1019 deletions

View file

@ -1788,6 +1788,25 @@ DEFINE_ACTION_FUNCTION(AActor, A_KillChildren)
}
}
//===========================================================================
//
// A_KillSiblings
//
//===========================================================================
DEFINE_ACTION_FUNCTION(AActor, A_KillSiblings)
{
TThinkerIterator<AActor> it;
AActor * mo;
while ( (mo = it.Next()) )
{
if (mo->master == self->master && mo != self)
{
P_DamageMobj(mo, self, self, mo->health, NAME_None, DMG_NO_ARMOR);
}
}
}
//===========================================================================
//
// A_CountdownArg
@ -2129,6 +2148,39 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DamageChildren)
// [KS] *** End of my modifications ***
//===========================================================================
//
// A_DamageSiblings (amount)
// Damages the siblings of this master by the specified amount. Negative values heal.
//
//===========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DamageSiblings)
{
TThinkerIterator<AActor> it;
AActor * mo;
ACTION_PARAM_START(2);
ACTION_PARAM_INT(amount, 0);
ACTION_PARAM_NAME(DamageType, 1);
while ( (mo = it.Next()) )
{
if (mo->master == self->master && mo != self)
{
if (amount > 0)
{
P_DamageMobj(mo, self, self, amount, DamageType, DMG_NO_ARMOR);
}
else if (amount < 0)
{
amount = -amount;
P_GiveBody(mo, amount);
}
}
}
}
//===========================================================================
//
// Modified code pointer from Skulltag
@ -2254,3 +2306,36 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ChangeFlag)
}
}
//===========================================================================
//
// A_RemoveMaster
//
//===========================================================================
DEFINE_ACTION_FUNCTION(AActor, A_RemoveMaster)
{
if (self->master != NULL)
{
P_RemoveThing(self->master);
}
}
//===========================================================================
//
// A_RemoveChildren
//
//===========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveChildren)
{
TThinkerIterator<AActor> it;
AActor * mo;
ACTION_PARAM_START(1);
ACTION_PARAM_BOOL(removeall,0);
while ( (mo = it.Next()) )
{
if ( ( mo->master == self ) && ( ( mo->health <= 0 ) || removeall) )
{
P_RemoveThing(mo);
}
}
}

View file

@ -205,6 +205,7 @@ static FFlagDef ActorFlags[]=
DEFINE_FLAG(MF5, SPECIALFIREDAMAGE, AActor, flags5),
DEFINE_FLAG(MF5, SUMMONEDMONSTER, AActor, flags5),
DEFINE_FLAG(MF5, NOVERTICALMELEERANGE, AActor, flags5),
DEFINE_FLAG(MF5, BRIGHT, AActor, flags5),
// Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),

View file

@ -1039,19 +1039,62 @@ DEFINE_CLASS_PROPERTY(savepercent, F, Armor)
{
PROP_FIXED_PARM(i, 0);
i = clamp(i, 0, 100*FRACUNIT)/100;
// Special case here because this property has to work for 2 unrelated classes
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorPickup)))
{
((ABasicArmorPickup*)defaults)->SavePercent = i;
((ABasicArmorPickup*)defaults)->SavePercent=i;
}
else if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorBonus)))
{
((ABasicArmorBonus*)defaults)->SavePercent = i;
((ABasicArmorBonus*)defaults)->SavePercent=i;
}
else
{
I_Error("\"Armor.SavePercent\" requires an actor of type \"Armor\"\n");
I_Error("\"Armor.SavePercent\" requires an actor of type \"Armor\"");
}
}
//==========================================================================
//
//==========================================================================
DEFINE_CLASS_PROPERTY(maxabsorb, I, Armor)
{
PROP_INT_PARM(i, 0);
// Special case here because this property has to work for 2 unrelated classes
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorPickup)))
{
((ABasicArmorPickup*)defaults)->MaxAbsorb = i;
}
else if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorBonus)))
{
((ABasicArmorBonus*)defaults)->MaxAbsorb = i;
}
else
{
I_Error("\"Armor.MaxAbsorb\" requires an actor of type \"Armor\"\n");
}
}
//==========================================================================
//
//==========================================================================
DEFINE_CLASS_PROPERTY(maxfullabsorb, I, Armor)
{
PROP_INT_PARM(i, 0);
// Special case here because this property has to work for 2 unrelated classes
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorPickup)))
{
((ABasicArmorPickup*)defaults)->MaxFullAbsorb = i;
}
else if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorBonus)))
{
((ABasicArmorBonus*)defaults)->MaxFullAbsorb = i;
}
else
{
I_Error("\"Armor.MaxFullAbsorb\" requires an actor of type \"Armor\"\n");
}
}