mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- made WoundHealth modifiable to allow more control over the wound state.
This commit is contained in:
parent
2a4a5e7a70
commit
d5250d6b9f
7 changed files with 7 additions and 7 deletions
|
@ -1028,6 +1028,7 @@ public:
|
|||
double RadiusDamageFactor; // Radius damage factor
|
||||
double SelfDamageFactor;
|
||||
double StealthAlpha; // Minmum alpha for MF_STEALTH.
|
||||
int WoundHealth; // Health needed to enter wound state
|
||||
|
||||
SDWORD tics; // state tic counter
|
||||
FState *state;
|
||||
|
|
|
@ -254,7 +254,6 @@ PClassActor::PClassActor()
|
|||
DeathHeight = -1;
|
||||
BurnHeight = -1;
|
||||
GibHealth = INT_MIN;
|
||||
WoundHealth = 6;
|
||||
|
||||
DropItems = NULL;
|
||||
// Record this in the master list.
|
||||
|
@ -306,7 +305,6 @@ void PClassActor::DeriveData(PClass *newclass)
|
|||
newa->BurnHeight = BurnHeight;
|
||||
newa->BloodColor = BloodColor;
|
||||
newa->GibHealth = GibHealth;
|
||||
newa->WoundHealth = WoundHealth;
|
||||
newa->HowlSound = HowlSound;
|
||||
newa->distancecheck = distancecheck;
|
||||
|
||||
|
|
|
@ -296,7 +296,6 @@ public:
|
|||
double BurnHeight; // Height on burning death
|
||||
PalEntry BloodColor; // Colorized blood
|
||||
int GibHealth; // Negative health below which this monster dies an extreme death
|
||||
int WoundHealth; // Health needed to enter wound state
|
||||
FSoundID HowlSound; // Sound being played when electrocuted or poisoned
|
||||
|
||||
FDropItem *DropItems;
|
||||
|
|
|
@ -1536,7 +1536,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
|
|||
woundstate = target->FindState(NAME_Wound, mod);
|
||||
if (woundstate != NULL)
|
||||
{
|
||||
int woundhealth = target->GetClass()->WoundHealth;
|
||||
int woundhealth = target->WoundHealth;
|
||||
|
||||
if (target->health <= woundhealth)
|
||||
{
|
||||
|
|
|
@ -315,6 +315,7 @@ DEFINE_FIELD(AActor, CameraHeight)
|
|||
DEFINE_FIELD(AActor, RadiusDamageFactor)
|
||||
DEFINE_FIELD(AActor, SelfDamageFactor)
|
||||
DEFINE_FIELD(AActor, StealthAlpha)
|
||||
DEFINE_FIELD(AActor, WoundHealth)
|
||||
|
||||
DEFINE_FIELD(PClassActor, Obituary)
|
||||
DEFINE_FIELD(PClassActor, HitObituary)
|
||||
|
@ -322,7 +323,6 @@ DEFINE_FIELD(PClassActor, DeathHeight)
|
|||
DEFINE_FIELD(PClassActor, BurnHeight)
|
||||
DEFINE_FIELD(PClassActor, BloodColor)
|
||||
DEFINE_FIELD(PClassActor, GibHealth)
|
||||
DEFINE_FIELD(PClassActor, WoundHealth)
|
||||
DEFINE_FIELD(PClassActor, HowlSound)
|
||||
|
||||
//==========================================================================
|
||||
|
@ -490,6 +490,7 @@ void AActor::Serialize(FSerializer &arc)
|
|||
A("visibleendangle",VisibleEndAngle)
|
||||
A("visiblestartpitch",VisibleStartPitch)
|
||||
A("visibleendpitch",VisibleEndPitch)
|
||||
A("woundhealth", WoundHealth)
|
||||
A("rdfactor", RadiusDamageFactor)
|
||||
A("selfdamagefactor", SelfDamageFactor)
|
||||
A("stealthalpha", StealthAlpha);
|
||||
|
|
|
@ -608,8 +608,7 @@ DEFINE_PROPERTY(gibhealth, I, Actor)
|
|||
DEFINE_PROPERTY(woundhealth, I, Actor)
|
||||
{
|
||||
PROP_INT_PARM(id, 0);
|
||||
assert(info->IsKindOf(RUNTIME_CLASS(PClassActor)));
|
||||
static_cast<PClassActor *>(info)->WoundHealth = id;
|
||||
defaults->WoundHealth = id;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -297,6 +297,8 @@ class Actor : Thinker native
|
|||
RadiusDamageFactor 1;
|
||||
SelfDamageFactor 1;
|
||||
StealthAlpha 0;
|
||||
WoundHealth 6;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue