NSView: Don't run stair smoothing code when we're going up on elevators/platforms.
Change some type names around for consistency.
This commit is contained in:
parent
2526751db1
commit
bc2f56b6d1
|
@ -26,8 +26,8 @@ typedef enum
|
|||
BOTSKILL_EASY = 1,
|
||||
BOTSKILL_MEDIUM,
|
||||
BOTSKILL_HARD
|
||||
} botskill_e;
|
||||
} botskill_t;
|
||||
|
||||
var botskill_e autocvar_bot_skill = 2;
|
||||
var botskill_t autocvar_bot_skill = 2;
|
||||
|
||||
var string autocvar_bot_prefix = "";
|
||||
|
|
|
@ -28,7 +28,7 @@ typedef enum
|
|||
VIEWMODE_FPS, /* uses view target position + view offset */
|
||||
VIEWMODE_THIRDPERSON, /* third person view, fixed */
|
||||
VIEWMODE_SPECTATING /* spectating, mixed viewmodes inside */
|
||||
} viewmode_e;
|
||||
} viewmode_t;
|
||||
|
||||
class
|
||||
NSView
|
||||
|
@ -39,7 +39,7 @@ NSView
|
|||
vector m_vecPosition;
|
||||
vector m_vecSize;
|
||||
float m_flFieldOfView;
|
||||
viewmode_e m_viewmode;
|
||||
viewmode_t m_viewmode;
|
||||
|
||||
vector m_vecLastOrigin;
|
||||
|
||||
|
@ -68,8 +68,8 @@ NSView
|
|||
virtual void(void) UpdateView;
|
||||
|
||||
/* set/get */
|
||||
virtual void(viewmode_e) SetViewMode;
|
||||
virtual viewmode_e(void) GetViewMode;
|
||||
virtual void(viewmode_t) SetViewMode;
|
||||
virtual viewmode_t(void) GetViewMode;
|
||||
|
||||
virtual void(vector) SetViewPosition;
|
||||
virtual void(vector) SetViewSize;
|
||||
|
|
|
@ -59,6 +59,10 @@ NSView::RenderView(void)
|
|||
void
|
||||
NSView::StairSmooth(void)
|
||||
{
|
||||
/* don't run this on anything going up or down... */
|
||||
if (fabs(m_viewTarget.groundentity.velocity[2]))
|
||||
return;
|
||||
|
||||
/* handle stair stepping */
|
||||
if (GetViewMode() == VIEWMODE_FPS) {
|
||||
vector endpos = origin;
|
||||
|
@ -134,12 +138,12 @@ NSView::SetClientAngle(vector new_angle)
|
|||
}
|
||||
|
||||
void
|
||||
NSView::SetViewMode(viewmode_e new_mode)
|
||||
NSView::SetViewMode(viewmode_t new_mode)
|
||||
{
|
||||
m_viewmode = new_mode;
|
||||
}
|
||||
|
||||
viewmode_e
|
||||
viewmode_t
|
||||
NSView::GetViewMode(void)
|
||||
{
|
||||
return m_viewmode;
|
||||
|
|
|
@ -118,14 +118,14 @@ typedef enum
|
|||
HINT_WORLD_BLINKING_LIGHT = 1001,
|
||||
HINT_WORLD_HUMAN_BLOOD = 1002,
|
||||
HINT_WORLD_ALIEN_BLOOD = 1003,
|
||||
} hinttype_e;
|
||||
} hinttype_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
IGNORE_NO,
|
||||
IGNORE_YES,
|
||||
IGNORE_DEFAULT
|
||||
} ignorefacing_e;
|
||||
} ignorefacing_t;
|
||||
|
||||
/* TODO: Make this match NSMonster more */
|
||||
typedef enum
|
||||
|
@ -133,21 +133,21 @@ typedef enum
|
|||
AISTATE_IDLE,
|
||||
AISTATE_ALERT,
|
||||
AISTATE_COMBAT
|
||||
} aistate_e;
|
||||
} aistate_t;
|
||||
|
||||
#define HINTSF_ALLOWJUMPUP 65536
|
||||
|
||||
class
|
||||
info_hint:NSPointTrigger
|
||||
{
|
||||
hinttype_e m_hintType;
|
||||
hinttype_t m_hintType;
|
||||
string m_strHintActivity;
|
||||
float m_flNodeFOV;
|
||||
bool m_bStartDisabled;
|
||||
string m_strHintGroup;
|
||||
ignorefacing_e m_ignoreFacing;
|
||||
aistate_e m_minState;
|
||||
aistate_e m_maxState;
|
||||
ignorefacing_t m_ignoreFacing;
|
||||
aistate_t m_minState;
|
||||
aistate_t m_maxState;
|
||||
|
||||
void(void) info_hint;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ typedef enum
|
|||
{
|
||||
RICHPRES_STATUS,
|
||||
RICHPRES_CONNECT
|
||||
} richpresence_e;
|
||||
} richpresence_t;
|
||||
|
||||
string g_richpres[RICHPRESENCE_KEYS];
|
||||
var bool g_richpresence_set = false;
|
||||
|
|
|
@ -116,7 +116,7 @@ typedef enum {
|
|||
ACT_FLINCH_RIGHTARM,
|
||||
ACT_FLINCH_LEFTLEG,
|
||||
ACT_FLINCH_RIGHTLEG,
|
||||
} monster_activity_e;
|
||||
} monster_activity_t;
|
||||
|
||||
/* monster flags, these are defined by the level designers */
|
||||
typedef enumflags
|
||||
|
@ -134,7 +134,7 @@ typedef enumflags
|
|||
MSF_MULTIPLAYER,
|
||||
MSF_FALLING,
|
||||
MSF_HORDE
|
||||
} monsterFlag_e;
|
||||
} monsterFlag_t;
|
||||
|
||||
/* movement states */
|
||||
typedef enum
|
||||
|
@ -146,7 +146,7 @@ typedef enum
|
|||
MONSTER_AIMING,
|
||||
MONSTER_DEAD,
|
||||
MONSTER_GIBBED
|
||||
} monsterState_e;
|
||||
} monsterState_t;
|
||||
|
||||
/* scripted sequence states */
|
||||
typedef enum
|
||||
|
@ -155,7 +155,7 @@ typedef enum
|
|||
SEQUENCESTATE_IDLE,
|
||||
SEQUENCESTATE_ACTIVE,
|
||||
SEQUENCESTATE_ENDING
|
||||
} sequenceState_e;
|
||||
} sequenceState_t;
|
||||
|
||||
/* alliance state */
|
||||
typedef enum
|
||||
|
@ -164,14 +164,14 @@ typedef enum
|
|||
MAL_ENEMY, /* unfriendly towards the player */
|
||||
MAL_ALIEN, /* unfriendly towards anyone but themselves */
|
||||
MAL_ROGUE /* no allies, not even amongst themselves */
|
||||
} allianceState_e;
|
||||
} allianceState_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MOVESTATE_IDLE,
|
||||
MOVESTATE_WALK,
|
||||
MOVESTATE_RUN
|
||||
} movementState_e;
|
||||
} movementState_t;
|
||||
|
||||
/* These numerations involve the m_iTriggerCondition attribute.
|
||||
* Basically these conditions are being checked and triggered depending on what
|
||||
|
@ -191,7 +191,7 @@ typedef enum
|
|||
MTRIG_HEARWEAPONS, /* we hear weapons being fired */
|
||||
MTRIG_SEEPLAYER, /* we see a player, don't have to be angry at him. */
|
||||
MTRIG_SEEPLAYER_RELAXED, /* we see a player and we're currently attacking anything */
|
||||
} triggerCondition_e;
|
||||
} triggerCondition_t;
|
||||
|
||||
/* FIXME: I'd like to move this into NSMonster, but our current IsFriend()
|
||||
* check is currently only checking on a .takedamage basis. */
|
||||
|
@ -216,7 +216,7 @@ class NSMonster:NSNavAI
|
|||
float m_flSequenceSpeed;
|
||||
vector m_vecSequenceAngle;
|
||||
int m_iSequenceFlags;
|
||||
movementState_e m_iMoveState;
|
||||
movementState_t m_iMoveState;
|
||||
|
||||
int m_iTriggerCondition;
|
||||
string m_strTriggerTarget;
|
||||
|
@ -227,8 +227,8 @@ class NSMonster:NSNavAI
|
|||
/* attack/alliance system */
|
||||
entity m_eEnemy;
|
||||
float m_flAttackThink;
|
||||
monsterState_e m_iMState;
|
||||
monsterState_e m_iOldMState;
|
||||
monsterState_t m_iMState;
|
||||
monsterState_t m_iOldMState;
|
||||
vector m_vecLKPos; /* last-known pos */
|
||||
|
||||
#endif
|
||||
|
@ -299,9 +299,9 @@ class NSMonster:NSNavAI
|
|||
virtual bool(void) InAnimation;
|
||||
|
||||
/* states */
|
||||
virtual void(monsterState_e, monsterState_e) StateChanged;
|
||||
virtual void(monsterState_e) SetState;
|
||||
virtual monsterState_e(void) GetState;
|
||||
virtual void(monsterState_t, monsterState_t) StateChanged;
|
||||
virtual void(monsterState_t) SetState;
|
||||
virtual monsterState_t(void) GetState;
|
||||
|
||||
/* TriggerTarget/Condition */
|
||||
virtual int(void) GetTriggerCondition;
|
||||
|
|
|
@ -628,14 +628,14 @@ NSMonster::IsAlive(void)
|
|||
}
|
||||
|
||||
void
|
||||
NSMonster::StateChanged(monsterState_e oldState, monsterState_e newState)
|
||||
NSMonster::StateChanged(monsterState_t oldState, monsterState_t newState)
|
||||
{
|
||||
NSLog("^2%s::^3StateChanged^7: state changed from %d to %d", \
|
||||
classname, oldState, newState);
|
||||
}
|
||||
|
||||
void
|
||||
NSMonster::SetState(monsterState_e newState)
|
||||
NSMonster::SetState(monsterState_t newState)
|
||||
{
|
||||
if (newState == m_iMState)
|
||||
return;
|
||||
|
@ -645,7 +645,7 @@ NSMonster::SetState(monsterState_e newState)
|
|||
StateChanged(m_iOldMState, m_iMState);
|
||||
}
|
||||
|
||||
monsterState_e
|
||||
monsterState_t
|
||||
NSMonster::GetState(void)
|
||||
{
|
||||
return m_iMState;
|
||||
|
|
|
@ -75,7 +75,7 @@ typedef enum
|
|||
NETFIELD_ANGLE,
|
||||
NETFIELD_ENTITY,
|
||||
NETFIELD_STRING
|
||||
} nettype_e;
|
||||
} nettype_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ typedef enum
|
|||
WATERLEVEL_KNEE,
|
||||
WATERLEVEL_CHEST,
|
||||
WATERLEVEL_SUBMERGED
|
||||
} waterlevel_e;
|
||||
} waterlevel_t;
|
||||
|
||||
#ifdef SERVER
|
||||
void PMove_StartFrame(void);
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef enum
|
|||
XR_INPUT_HEAD,
|
||||
XR_INPUT_LEFT,
|
||||
XR_INPUT_RIGHT
|
||||
} xrinput_e;
|
||||
} xrinput_t;
|
||||
|
||||
#define XR_STATUS_ORG (1u<<0)
|
||||
#define XR_STATUS_ANG (1u<<1)
|
||||
|
@ -38,10 +38,10 @@ NSXRInput
|
|||
unsigned int m_iStatus;
|
||||
unsigned int m_iWeapon;
|
||||
|
||||
xrinput_e m_inputType;
|
||||
xrinput_t m_inputType;
|
||||
|
||||
void(void) NSXRInput;
|
||||
virtual void(xrinput_e) SetType;
|
||||
virtual void(xrinput_t) SetType;
|
||||
virtual void(NSXRSpace) SetParentSpace;
|
||||
|
||||
virtual vector(void) GetOrigin;
|
||||
|
@ -50,7 +50,7 @@ NSXRInput
|
|||
virtual vector(void) GetAngularVelocity;
|
||||
virtual unsigned int(void) GetStatus;
|
||||
virtual unsigned int(void) GetWeapon;
|
||||
virtual xrinput_e (void) GetType;
|
||||
virtual xrinput_t(void) GetType;
|
||||
|
||||
virtual bool(void) IsAvailable;
|
||||
virtual void(void) InputFrame;
|
||||
|
|
|
@ -64,7 +64,7 @@ NSXRInput::GetWeapon(void)
|
|||
return m_iWeapon;
|
||||
}
|
||||
|
||||
xrinput_e
|
||||
xrinput_t
|
||||
NSXRInput::GetType(void)
|
||||
{
|
||||
return m_inputType;
|
||||
|
@ -126,7 +126,7 @@ NSXRInput::IsAvailable(void)
|
|||
}
|
||||
|
||||
void
|
||||
NSXRInput::SetType(xrinput_e type)
|
||||
NSXRInput::SetType(xrinput_t type)
|
||||
{
|
||||
m_inputType = type;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue