- let RunHealth clamping respect the newly added global properties.

This commit is contained in:
Christoph Oelckers 2019-01-05 15:37:14 +01:00
parent 639fb43682
commit c651045ed3
3 changed files with 6 additions and 2 deletions

View file

@ -71,6 +71,8 @@ DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, defKickback)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, healthpic)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, berserkpic)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, defaultdropstyle)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, normforwardmove)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, normsidemove)
const char *GameNames[17] =
{

View file

@ -374,6 +374,8 @@ struct GameInfoStruct native
native int defaultdropstyle;
native TextureID healthpic;
native TextureID berserkpic;
native double normforwardmove[2];
native double normsidemove[2];
}
class Object native

View file

@ -1183,8 +1183,8 @@ class PlayerPawn : Actor
// Strife's player can't run when its health is below 10
if (health <= RunHealth)
{
forward = clamp(forward, -0x1900, 0x1900);
side = clamp(side, -0x1800, 0x1800);
forward = clamp(forward, -gameinfo.normforwardmove[0], gameinfo.normforwardmove[0]);
side = clamp(side, -gameinfo.normsidemove[0], gameinfo.normsidemove[0]);
}
// [GRB]