mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- initialize the PlayerPawn members only used by scripts through the script variable interface.
The goal here is to eliminate the native PlayerPawn class, after all, so this will be needed anyway.
This commit is contained in:
parent
850ef1cd78
commit
da735c0e87
3 changed files with 11 additions and 6 deletions
|
@ -146,13 +146,13 @@ public:
|
|||
FName Face; // Doom status bar face (when used)
|
||||
FName Portrait;
|
||||
FName Slot[10];
|
||||
double HexenArmor[5];
|
||||
|
||||
// Everything below this point is only used by scripted code.
|
||||
int RunHealth;
|
||||
TObjPtr<AActor*> InvFirst; // first inventory item displayed on inventory bar
|
||||
double ForwardMove1, ForwardMove2;
|
||||
double SideMove1, SideMove2;
|
||||
double HexenArmor[5];
|
||||
PClassActor *FlechetteType;
|
||||
|
||||
};
|
||||
|
|
|
@ -1032,6 +1032,10 @@ xx(PickupSound)
|
|||
xx(ColorRangeStart)
|
||||
xx(ColorRangeEnd)
|
||||
xx(InvFirst)
|
||||
xx(ForwardMove1)
|
||||
xx(ForwardMove2)
|
||||
xx(SideMove1)
|
||||
xx(SideMove2)
|
||||
|
||||
xx(BlueCard)
|
||||
xx(YellowCard)
|
||||
|
|
|
@ -1541,11 +1541,11 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, spawnclass, L, PlayerPawn)
|
|||
DEFINE_CLASS_PROPERTY_PREFIX(player, forwardmove, F_f, PlayerPawn)
|
||||
{
|
||||
PROP_DOUBLE_PARM(m, 0);
|
||||
defaults->ForwardMove1 = defaults->ForwardMove2 = m;
|
||||
defaults->FloatVar(NAME_ForwardMove1) = defaults->FloatVar(NAME_ForwardMove2) = m;
|
||||
if (PROP_PARM_COUNT > 1)
|
||||
{
|
||||
PROP_DOUBLE_PARM(m2, 1);
|
||||
defaults->ForwardMove2 = m2;
|
||||
defaults->FloatVar(NAME_ForwardMove2) = m2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1555,11 +1555,11 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, forwardmove, F_f, PlayerPawn)
|
|||
DEFINE_CLASS_PROPERTY_PREFIX(player, sidemove, F_f, PlayerPawn)
|
||||
{
|
||||
PROP_DOUBLE_PARM(m, 0);
|
||||
defaults->SideMove1 = defaults->SideMove2 = m;
|
||||
defaults->FloatVar(NAME_SideMove1) = defaults->FloatVar(NAME_SideMove2) = m;
|
||||
if (PROP_PARM_COUNT > 1)
|
||||
{
|
||||
PROP_DOUBLE_PARM(m2, 1);
|
||||
defaults->SideMove2 = m2;
|
||||
defaults->FloatVar(NAME_SideMove2) = m2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1666,7 +1666,8 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, hexenarmor, FFFFF, PlayerPawn)
|
|||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
PROP_DOUBLE_PARM(val, i);
|
||||
defaults->HexenArmor[i] = val;
|
||||
auto hexarmor = &defaults->FloatVar(NAME_HexenArmor);
|
||||
hexarmor[i] = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue