mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-18 23:52:02 +00:00
- the UDMF health key for actors was not correctly implemented. This addresses the problem by adding a second one and documenting 'Health' as implemented.
- fixed: Several ZDoom-exclusive actor keys did not check the current namespace.
This commit is contained in:
parent
0514a997db
commit
e4e023e59a
3 changed files with 19 additions and 2 deletions
|
@ -263,8 +263,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
gravity = <float>; // Set per-actor gravity. Positive values are multiplied with the class's property,
|
||||
// negative values are used as their absolute. Default = 1.0.
|
||||
|
||||
health = <int>; // Set per-actor health. Positive values are multiplied with the class's property,
|
||||
// negative values are used as their absolute. Default = 1.
|
||||
health = <int>; // Set per-actor health as an absolute value. Default = actor default.
|
||||
healthfactor = <float>; // Set per-actor health as a factor to the original. Default = 1.
|
||||
|
||||
renderstyle = <string>; // Set per-actor render style, overriding the class default. Possible values can be "normal",
|
||||
// "none", "add" or "additive", "subtract" or "subtractive", "stencil", "translucentstencil",
|
||||
|
|
|
@ -46,6 +46,7 @@ xx(Shadow)
|
|||
xx(Subtract)
|
||||
xx(Subtractive)
|
||||
xx(FillColor)
|
||||
xx(HealthFactor)
|
||||
|
||||
// Healingradius types
|
||||
xx(Mana)
|
||||
|
|
|
@ -515,6 +515,7 @@ public:
|
|||
FString arg0str, arg1str;
|
||||
|
||||
memset(th, 0, sizeof(*th));
|
||||
double healthfactor = 1;
|
||||
th->Gravity = 1;
|
||||
th->RenderStyle = STYLE_Count;
|
||||
th->Alpha = -1;
|
||||
|
@ -738,38 +739,52 @@ public:
|
|||
break;
|
||||
|
||||
case NAME_Alpha:
|
||||
CHECK_N(Zd | Zdt)
|
||||
th->Alpha = CheckFloat(key);
|
||||
break;
|
||||
|
||||
case NAME_FillColor:
|
||||
CHECK_N(Zd | Zdt)
|
||||
th->fillcolor = CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_Health:
|
||||
CHECK_N(Zd | Zdt)
|
||||
th->health = CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_HealthFactor:
|
||||
CHECK_N(Zd | Zdt)
|
||||
healthfactor = CheckFloat(key);
|
||||
break;
|
||||
|
||||
case NAME_Score:
|
||||
CHECK_N(Zd | Zdt)
|
||||
th->score = CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_Pitch:
|
||||
CHECK_N(Zd | Zdt)
|
||||
th->pitch = (short)CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_Roll:
|
||||
CHECK_N(Zd | Zdt)
|
||||
th->roll = (short)CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_ScaleX:
|
||||
CHECK_N(Zd | Zdt)
|
||||
th->Scale.X = CheckFloat(key);
|
||||
break;
|
||||
|
||||
case NAME_ScaleY:
|
||||
CHECK_N(Zd | Zdt)
|
||||
th->Scale.Y = CheckFloat(key);
|
||||
break;
|
||||
|
||||
case NAME_Scale:
|
||||
CHECK_N(Zd | Zdt)
|
||||
th->Scale.X = th->Scale.Y = CheckFloat(key);
|
||||
break;
|
||||
|
||||
|
@ -793,6 +808,7 @@ public:
|
|||
{
|
||||
th->args[1] = -FName(arg1str);
|
||||
}
|
||||
th->health = int(th->health * healthfactor);
|
||||
// Thing specials are only valid in namespaces with Hexen-type specials
|
||||
// and in ZDoomTranslated - which will use the translator on them.
|
||||
if (namespc == NAME_ZDoomTranslated)
|
||||
|
|
Loading…
Reference in a new issue