- added DavidPH's ProjectileKickback submission.

SVN r3228 (trunk)
This commit is contained in:
Christoph Oelckers 2011-06-13 09:16:57 +00:00
parent 74ad869e62
commit 61dfb608f4
4 changed files with 20 additions and 3 deletions

View file

@ -800,6 +800,7 @@ public:
SDWORD tics; // state tic counter
FState *state;
SDWORD Damage; // For missiles and monster railgun
int projectileKickback;
DWORD flags;
DWORD flags2; // Heretic flags
DWORD flags3; // [RH] Hexen/Heretic actor-dependant behavior made flaggable

View file

@ -1029,7 +1029,9 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
{
int kickback;
if (!source || !source->player || !source->player->ReadyWeapon)
if (inflictor && inflictor->projectileKickback)
kickback = inflictor->projectileKickback;
else if (!source || !source->player || !source->player->ReadyWeapon)
kickback = gameinfo.defKickback;
else
kickback = source->player->ReadyWeapon->Kickback;

View file

@ -227,8 +227,12 @@ void AActor::Serialize (FArchive &arc)
<< velz
<< tics
<< state
<< Damage
<< flags
<< Damage;
if (SaveVersion >= 3227)
{
arc << projectileKickback;
}
arc << flags
<< flags2
<< flags3
<< flags4

View file

@ -447,6 +447,16 @@ DEFINE_PROPERTY(damage, X, Actor)
defaults->Damage = id;
}
//==========================================================================
//
//==========================================================================
DEFINE_PROPERTY(projectilekickback, I, Actor)
{
PROP_INT_PARM(id, 0);
defaults->projectileKickback = id;
}
//==========================================================================
//
//==========================================================================