mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- added DavidPH's ProjectileKickback submission.
SVN r3228 (trunk)
This commit is contained in:
parent
74ad869e62
commit
61dfb608f4
4 changed files with 20 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue