add prevent jump flag to iuser3 data (#410)

* add prevent jump flag to iuser3 data
This commit is contained in:
fl0werD 2019-09-13 22:07:52 +04:00 committed by Dmitry Novikov
parent a2a6997278
commit 2632c98c98
2 changed files with 10 additions and 1 deletions

View File

@ -72,6 +72,7 @@ const int DEFAULT_FOV = 90; // the default field of view
#define PLAYER_HOLDING_SHIELD BIT(3)
#define PLAYER_PREVENT_DUCK BIT(4)
#define PLAYER_PREVENT_CLIMB BIT(5) // The player can't climb ladder
#define PLAYER_PREVENT_JUMP BIT(6)
#define MENU_KEY_1 BIT(0)
#define MENU_KEY_2 BIT(1)

View File

@ -1880,7 +1880,7 @@ void PM_Duck()
pmove->oldbuttons &= ~IN_DUCK;
}
#ifdef REGAMEDLL_FIXES
#ifdef REGAMEDLL_ADD
// Prevent ducking if the iuser3 variable is contain PLAYER_PREVENT_DUCK
if ((pmove->iuser3 & PLAYER_PREVENT_DUCK) == PLAYER_PREVENT_DUCK)
{
@ -2400,6 +2400,14 @@ void PM_Jump()
return;
}
#ifdef REGAMEDLL_ADD
// Prevent jumping if the iuser3 variable is contain PLAYER_PREVENT_JUMP
if ((pmove->iuser3 & PLAYER_PREVENT_JUMP) == PLAYER_PREVENT_JUMP)
{
return;
}
#endif
// No more effect
// in air, so no effect
if (pmove->onground == -1)