mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-26 22:55:41 +03:00
add prevent jump flag to iuser3 data (#410)
* add prevent jump flag to iuser3 data
This commit is contained in:
parent
a2a6997278
commit
2632c98c98
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user