- Added SnowKate709's A_DamageMaster/A_DamageChildren patch.

- Added a SFX_TRANSFERAMBUSHFLAG for A_SpawnItemEx.
- Added "Shaded" as a valid parameter for DECORATE's RenderStyle.
- Added Karate Chris's patch for a MAPINFO option making Strife conversations
  not halt the game.
- Extended the $limit fix that $alias and $random definitions can have their
  own $limit now.
- Fixed: When resolving a linked sound the limit of the current sound was
  ignored and the one of the referenced sound being used. This was particularly
  noticable when using the chaingun in a group of Zombiemen.
- Added a namespc parameter to FWadCollection::CheckNumForFullName which is
  used when a normal lump name has to be looked up and changed all
  CheckNumForFullName/CheckNumForName combinations in the source to use
  the extended version of CheckNumForFullName only to have consistent
  behavior for lump name lookup. 

SVN r865 (trunk)
This commit is contained in:
Christoph Oelckers 2008-03-29 22:59:41 +00:00
commit d5c3693fd9
18 changed files with 138 additions and 64 deletions

View file

@ -1477,7 +1477,9 @@ enum SIX_Flags
SIXF_ABSOLUTEMOMENTUM=8,
SIXF_SETMASTER=16,
SIXF_NOCHECKPOSITION=32,
SIXF_TELEFRAG=64
SIXF_TELEFRAG=64,
// 128 is used by Skulltag!
SIXF_TRANSFERAMBUSHFLAG=256,
};
void A_SpawnItemEx(AActor * self)
@ -1547,6 +1549,7 @@ void A_SpawnItemEx(AActor * self)
mo->momz=zmom;
mo->angle=Angle;
if (flags & SIXF_TELEFRAG) P_TeleportMove(mo, mo->x, mo->y, mo->z, true);
if (flags & SIXF_TRANSFERAMBUSHFLAG) mo->flags = (mo->flags&~MF_AMBUSH) | (self->flags & MF_AMBUSH);
}
}
@ -2171,4 +2174,66 @@ void A_JumpIfTargetInLOS(AActor * self)
DoJump(self, CallingState, StateParameters[index]);
}
//===========================================================================
//
// A_DamageMaster (int amount)
// Damages the master of this child by the specified amount. Negative values heal.
//
//===========================================================================
void A_DamageMaster(AActor * self)
{
int index = CheckIndex(2);
if (index<0) return;
int amount = EvalExpressionI (StateParameters[index], self);
ENamedName DamageType = (ENamedName)StateParameters[index+1];
if (self->master != NULL)
{
if (amount > 0)
{
P_DamageMobj(self->master, self, self, amount, DamageType, DMG_NO_ARMOR);
}
else if (amount < 0)
{
amount = -amount;
P_GiveBody(self->master, amount);
}
}
}
//===========================================================================
//
// A_DamageChildren (amount)
// Damages the children of this master by the specified amount. Negative values heal.
//
//===========================================================================
void A_DamageChildren(AActor * self)
{
TThinkerIterator<AActor> it;
AActor * mo;
int index = CheckIndex(2);
if (index<0) return;
int amount = EvalExpressionI (StateParameters[index], self);
ENamedName DamageType = (ENamedName)StateParameters[index+3];
while ( (mo = it.Next()) )
{
if (mo->master == self)
{
if (amount > 0)
{
P_DamageMobj(mo, self, self, amount, DamageType, DMG_NO_ARMOR);
}
else if (amount < 0)
{
amount = -amount;
P_GiveBody(mo, amount);
}
}
}
}
// [KS] *** End of my modifications ***