mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- let RunHealth clamping respect the newly added global properties.
This commit is contained in:
parent
639fb43682
commit
c651045ed3
3 changed files with 6 additions and 2 deletions
|
@ -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] =
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue