mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-27 14:08:00 +03:00
Features: Add for iuser3 flag PLAYER_PREVENT_CLIMB
This commit is contained in:
parent
932001b591
commit
9d89a347fa
@ -70,6 +70,7 @@ const int DEFAULT_FOV = 90; // the default field of view
|
||||
#define PLAYER_IN_BOMB_ZONE BIT(2)
|
||||
#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 MENU_KEY_1 BIT(0)
|
||||
#define MENU_KEY_2 BIT(1)
|
||||
@ -82,11 +83,6 @@ const int DEFAULT_FOV = 90; // the default field of view
|
||||
#define MENU_KEY_9 BIT(8)
|
||||
#define MENU_KEY_0 BIT(9)
|
||||
|
||||
#define HUD_PRINTNOTIFY 1
|
||||
#define HUD_PRINTCONSOLE 2
|
||||
#define HUD_PRINTTALK 3
|
||||
#define HUD_PRINTCENTER 4
|
||||
|
||||
#define WEAPON_SUIT 31
|
||||
#define WEAPON_ALLWEAPONS (~(1<<WEAPON_SUIT))
|
||||
|
||||
|
@ -4316,6 +4316,13 @@ BOOL EXT_FUNC AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, e
|
||||
state->skin = ent->v.skin;
|
||||
state->effects = ent->v.effects;
|
||||
|
||||
#ifdef REGAMEDLL_ADD
|
||||
if (ent->v.skin == CONTENTS_LADDER &&
|
||||
(host->v.iuser3 & PLAYER_PREVENT_CLIMB) == PLAYER_PREVENT_CLIMB) {
|
||||
state->skin = CONTENTS_EMPTY;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!player && ent->v.animtime && !ent->v.velocity.x && !ent->v.velocity.y && !ent->v.velocity.z)
|
||||
state->eflags |= EFLAG_SLERP;
|
||||
|
||||
|
@ -2838,7 +2838,11 @@ void PM_PlayerMove(qboolean server)
|
||||
g_onladder = FALSE;
|
||||
|
||||
// Don't run ladder code if dead or on a train
|
||||
if (!pmove->dead && !(pmove->flags & FL_ONTRAIN))
|
||||
if (!pmove->dead && !(pmove->flags & FL_ONTRAIN)
|
||||
#ifdef REGAMEDLL_ADD
|
||||
&& !(pmove->iuser3 & PLAYER_PREVENT_CLIMB)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
pLadder = PM_Ladder();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user