Xonotic
player.qh File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IS_DUCKED(s)   (boolean((s).flags & FL_DUCKED))
 
#define IS_JUMP_HELD(s)   (!((s).flags & FL_JUMPRELEASED))
 
#define ITEMS_STAT(s)   ((s).items)
 
#define PHYS_ACCELERATE(s)   STAT(MOVEVARS_ACCELERATE, s)
 
#define PHYS_AIRACCEL_QW(s)   STAT(MOVEVARS_AIRACCEL_QW, s)
 
#define PHYS_AIRACCEL_QW_STRETCHFACTOR(s)   STAT(MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, s)
 
#define PHYS_AIRACCEL_SIDEWAYS_FRICTION(s)   STAT(MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, s)
 
#define PHYS_AIRACCELERATE(s)   STAT(MOVEVARS_AIRACCELERATE, s)
 
#define PHYS_AIRCONTROL(s)   STAT(MOVEVARS_AIRCONTROL, s)
 
#define PHYS_AIRCONTROL_BACKWARDS(s)   STAT(MOVEVARS_AIRCONTROL_BACKWARDS, s)
 
#define PHYS_AIRCONTROL_PENALTY(s)   STAT(MOVEVARS_AIRCONTROL_PENALTY, s)
 
#define PHYS_AIRCONTROL_POWER(s)   STAT(MOVEVARS_AIRCONTROL_POWER, s)
 
#define PHYS_AIRCONTROL_SIDEWARDS(s)   STAT(MOVEVARS_AIRCONTROL_SIDEWARDS, s)
 
#define PHYS_AIRSPEEDLIMIT_NONQW(s)   STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, s)
 
#define PHYS_AIRSTOPACCELERATE(s)   STAT(MOVEVARS_AIRSTOPACCELERATE, s)
 
#define PHYS_AIRSTRAFEACCEL_QW(s)   STAT(MOVEVARS_AIRSTRAFEACCEL_QW, s)
 
#define PHYS_AIRSTRAFEACCELERATE(s)   STAT(MOVEVARS_AIRSTRAFEACCELERATE, s)
 
#define PHYS_AMMO_FUEL(s)   STAT(FUEL, s)
 
#define PHYS_DODGING_FROZEN(s)   STAT(DODGING_FROZEN, s)
 
#define PHYS_FRICTION(s)   STAT(MOVEVARS_FRICTION, s)
 
#define PHYS_FRICTION_ONLAND(s)   STAT(MOVEVARS_FRICTION_ONLAND, s)
 
#define PHYS_FRICTION_SLICK(s)   STAT(MOVEVARS_FRICTION_SLICK, s)
 
#define PHYS_FROZEN(s)   STAT(FROZEN, s)
 
#define PHYS_HEALTH(s)   STAT(HEALTH, s)
 
#define PHYS_HIGHSPEED(s)   STAT(MOVEVARS_HIGHSPEED, s)
 
#define PHYS_INPUT_BUTTON_ATCK(s)   PHYS_INPUT_BUTTON_BUTTON1(s)
 
#define PHYS_INPUT_BUTTON_ATCK2(s)   PHYS_INPUT_BUTTON_BUTTON3(s)
 
#define PHYS_INPUT_BUTTON_BACKWARD(s)   (PHYS_INPUT_MOVEVALUES(s).x < 0)
 
#define PHYS_INPUT_BUTTON_CHAT(s)   PHYS_INPUT_BUTTON_BUTTON_CHAT(s)
 
#define PHYS_INPUT_BUTTON_CROUCH(s)   PHYS_INPUT_BUTTON_BUTTON5(s)
 
#define PHYS_INPUT_BUTTON_DODGE(s)   PHYS_INPUT_BUTTON_BUTTON11(s)
 
#define PHYS_INPUT_BUTTON_DRAG(s)   PHYS_INPUT_BUTTON_BUTTON8(s)
 
#define PHYS_INPUT_BUTTON_FORWARD(s)   (PHYS_INPUT_MOVEVALUES(s).x > 0)
 
#define PHYS_INPUT_BUTTON_HOOK(s)   PHYS_INPUT_BUTTON_BUTTON6(s)
 
#define PHYS_INPUT_BUTTON_INFO(s)   PHYS_INPUT_BUTTON_BUTTON7(s)
 
#define PHYS_INPUT_BUTTON_JETPACK(s)   PHYS_INPUT_BUTTON_BUTTON10(s)
 
#define PHYS_INPUT_BUTTON_JUMP(s)   PHYS_INPUT_BUTTON_BUTTON2(s)
 
#define PHYS_INPUT_BUTTON_LEFT(s)   (PHYS_INPUT_MOVEVALUES(s).y < 0)
 
#define PHYS_INPUT_BUTTON_MASK(s)
 
#define PHYS_INPUT_BUTTON_MINIGAME(s)   PHYS_INPUT_BUTTON_BUTTON12(s)
 
#define PHYS_INPUT_BUTTON_PRYDON(s)   PHYS_INPUT_BUTTON_BUTTON_PRYDON(s)
 
#define PHYS_INPUT_BUTTON_RIGHT(s)   (PHYS_INPUT_MOVEVALUES(s).y > 0)
 
#define PHYS_INPUT_BUTTON_USE(s)   PHYS_INPUT_BUTTON_BUTTON_USE(s)
 
#define PHYS_INPUT_BUTTON_ZOOM(s)   PHYS_INPUT_BUTTON_BUTTON4(s)
 
#define PHYS_INPUT_BUTTON_ZOOMSCRIPT(s)   PHYS_INPUT_BUTTON_BUTTON9(s)
 
#define PHYS_JETPACK_ACCEL_SIDE(s)   STAT(JETPACK_ACCEL_SIDE, s)
 
#define PHYS_JETPACK_ACCEL_UP(s)   STAT(JETPACK_ACCEL_UP, s)
 
#define PHYS_JETPACK_ANTIGRAVITY(s)   STAT(JETPACK_ANTIGRAVITY, s)
 
#define PHYS_JETPACK_FUEL(s)   STAT(JETPACK_FUEL, s)
 
#define PHYS_JETPACK_MAXSPEED_SIDE(s)   STAT(JETPACK_MAXSPEED_SIDE, s)
 
#define PHYS_JETPACK_MAXSPEED_UP(s)   STAT(JETPACK_MAXSPEED_UP, s)
 
#define PHYS_JETPACK_REVERSE_THRUST(s)   STAT(JETPACK_REVERSE_THRUST, s)
 
#define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS(s)   STAT(MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS)
 
#define PHYS_JUMPVELOCITY(s)   STAT(MOVEVARS_JUMPVELOCITY, s)
 
#define PHYS_JUMPVELOCITY_CROUCH(s)   STAT(MOVEVARS_JUMPVELOCITY_CROUCH, s)
 
#define PHYS_MAXAIRSPEED(s)   STAT(MOVEVARS_MAXAIRSPEED, s)
 
#define PHYS_MAXAIRSTRAFESPEED(s)   STAT(MOVEVARS_MAXAIRSTRAFESPEED, s)
 
#define PHYS_MAXSPEED(s)   STAT(MOVEVARS_MAXSPEED, s)
 
#define PHYS_PL_CROUCH_MAX(s)   STAT(PL_CROUCH_MAX, s)
 
#define PHYS_PL_CROUCH_MIN(s)   STAT(PL_CROUCH_MIN, s)
 
#define PHYS_PL_CROUCH_VIEWOFS(s)   STAT(PL_CROUCH_VIEW_OFS, s)
 
#define PHYS_PL_MAX(s)   STAT(PL_MAX, s)
 
#define PHYS_PL_MIN(s)   STAT(PL_MIN, s)
 
#define PHYS_PL_VIEWOFS(s)   STAT(PL_VIEW_OFS, s)
 
#define PHYS_SLICK_APPLYGRAVITY(s)   STAT(SLICK_APPLYGRAVITY)
 
#define PHYS_STOPSPEED(s)   STAT(MOVEVARS_STOPSPEED, s)
 
#define PHYS_TRACK_CANJUMP(s)   STAT(MOVEVARS_TRACK_CANJUMP, s)
 
#define PHYS_VIEWHEIGHT(s)   STAT(VIEWHEIGHT, s)
 
#define PHYS_WARSOWBUNNY_ACCEL(s)   STAT(MOVEVARS_WARSOWBUNNY_ACCEL, s)
 
#define PHYS_WARSOWBUNNY_AIRFORWARDACCEL(s)   STAT(MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL, s)
 
#define PHYS_WARSOWBUNNY_BACKTOSIDERATIO(s)   STAT(MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO, s)
 
#define PHYS_WARSOWBUNNY_TOPSPEED(s)   STAT(MOVEVARS_WARSOWBUNNY_TOPSPEED, s)
 
#define PHYS_WARSOWBUNNY_TURNACCEL(s)   STAT(MOVEVARS_WARSOWBUNNY_TURNACCEL, s)
 
#define SET_DUCKED(s)   ((s).flags |= FL_DUCKED)
 
#define SET_JUMP_HELD(s)   ((s).flags &= ~FL_JUMPRELEASED)
 
#define UNSET_DUCKED(s)   ((s).flags &= ~FL_DUCKED)
 
#define UNSET_JUMP_HELD(s)   ((s).flags |= FL_JUMPRELEASED)
 
#define WAS_ONGROUND(s)   boolean((s).lastflags & FL_ONGROUND)
 
#define WAS_ONSLICK(s)   boolean((s).lastflags & FL_ONSLICK)
 

Functions

float AdjustAirAccelQW (float accelqw, float factor)
 
 float (entity, float) PlayerPhysplug = #628
 
bool IsFlying (entity a)
 

Variables

int buttons_old
 
entity conveyor
 
float gravity
 
string lastclassname
 
float lastflags
 
float lastground
 
vector movement_old
 
float race_penalty
 
float swamp_slowdown
 
float teleport_time
 
vector v_angle_old
 
bool wasFlying
 

Macro Definition Documentation

◆ IS_DUCKED

◆ IS_JUMP_HELD

#define IS_JUMP_HELD (   s)    (!((s).flags & FL_JUMPRELEASED))

Definition at line 199 of file player.qh.

Referenced by CSQCPlayer_Physics(), and PlayerJump().

◆ ITEMS_STAT

#define ITEMS_STAT (   s)    ((s).items)

Definition at line 210 of file player.qh.

Referenced by CheckPlayerJump(), IsFlying(), PM_jetpack(), and sys_phys_update().

◆ PHYS_ACCELERATE

#define PHYS_ACCELERATE (   s)    STAT(MOVEVARS_ACCELERATE, s)

Definition at line 91 of file player.qh.

Referenced by sys_phys_simulate(), and sys_phys_update().

◆ PHYS_AIRACCEL_QW

#define PHYS_AIRACCEL_QW (   s)    STAT(MOVEVARS_AIRACCEL_QW, s)

Definition at line 93 of file player.qh.

Referenced by sys_phys_simulate().

◆ PHYS_AIRACCEL_QW_STRETCHFACTOR

#define PHYS_AIRACCEL_QW_STRETCHFACTOR (   s)    STAT(MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, s)

Definition at line 94 of file player.qh.

Referenced by sys_phys_simulate().

◆ PHYS_AIRACCEL_SIDEWAYS_FRICTION

#define PHYS_AIRACCEL_SIDEWAYS_FRICTION (   s)    STAT(MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, s)

Definition at line 95 of file player.qh.

Referenced by sys_phys_simulate().

◆ PHYS_AIRACCELERATE

#define PHYS_AIRACCELERATE (   s)    STAT(MOVEVARS_AIRACCELERATE, s)

Definition at line 92 of file player.qh.

Referenced by sys_phys_update().

◆ PHYS_AIRCONTROL

#define PHYS_AIRCONTROL (   s)    STAT(MOVEVARS_AIRCONTROL, s)

Definition at line 96 of file player.qh.

Referenced by CPM_PM_Aircontrol(), and sys_phys_simulate().

◆ PHYS_AIRCONTROL_BACKWARDS

#define PHYS_AIRCONTROL_BACKWARDS (   s)    STAT(MOVEVARS_AIRCONTROL_BACKWARDS, s)

Definition at line 99 of file player.qh.

Referenced by CPM_PM_Aircontrol().

◆ PHYS_AIRCONTROL_PENALTY

#define PHYS_AIRCONTROL_PENALTY (   s)    STAT(MOVEVARS_AIRCONTROL_PENALTY, s)

Definition at line 97 of file player.qh.

Referenced by CPM_PM_Aircontrol().

◆ PHYS_AIRCONTROL_POWER

#define PHYS_AIRCONTROL_POWER (   s)    STAT(MOVEVARS_AIRCONTROL_POWER, s)

Definition at line 98 of file player.qh.

Referenced by CPM_PM_Aircontrol().

◆ PHYS_AIRCONTROL_SIDEWARDS

#define PHYS_AIRCONTROL_SIDEWARDS (   s)    STAT(MOVEVARS_AIRCONTROL_SIDEWARDS, s)

Definition at line 100 of file player.qh.

Referenced by CPM_PM_Aircontrol().

◆ PHYS_AIRSPEEDLIMIT_NONQW

#define PHYS_AIRSPEEDLIMIT_NONQW (   s)    STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, s)

Definition at line 101 of file player.qh.

Referenced by sys_phys_simulate().

◆ PHYS_AIRSTOPACCELERATE

#define PHYS_AIRSTOPACCELERATE (   s)    STAT(MOVEVARS_AIRSTOPACCELERATE, s)

Definition at line 102 of file player.qh.

Referenced by sys_phys_simulate(), and sys_phys_update().

◆ PHYS_AIRSTRAFEACCEL_QW

#define PHYS_AIRSTRAFEACCEL_QW (   s)    STAT(MOVEVARS_AIRSTRAFEACCEL_QW, s)

Definition at line 104 of file player.qh.

Referenced by sys_phys_simulate().

◆ PHYS_AIRSTRAFEACCELERATE

#define PHYS_AIRSTRAFEACCELERATE (   s)    STAT(MOVEVARS_AIRSTRAFEACCELERATE, s)

Definition at line 103 of file player.qh.

Referenced by sys_phys_simulate(), and sys_phys_update().

◆ PHYS_AMMO_FUEL

#define PHYS_AMMO_FUEL (   s)    STAT(FUEL, s)

Definition at line 106 of file player.qh.

Referenced by CheckPlayerJump(), and PM_jetpack().

◆ PHYS_DODGING_FROZEN

#define PHYS_DODGING_FROZEN (   s)    STAT(DODGING_FROZEN, s)

Definition at line 108 of file player.qh.

Referenced by PM_check_frozen(), PM_dodging(), and PM_dodging_checkpressedkeys().

◆ PHYS_FRICTION

#define PHYS_FRICTION (   s)    STAT(MOVEVARS_FRICTION, s)

Definition at line 110 of file player.qh.

Referenced by sys_phys_simulate(), and sys_phys_update().

◆ PHYS_FRICTION_ONLAND

#define PHYS_FRICTION_ONLAND (   s)    STAT(MOVEVARS_FRICTION_ONLAND, s)

Definition at line 111 of file player.qh.

Referenced by PlayerJump(), and sys_phys_update().

◆ PHYS_FRICTION_SLICK

#define PHYS_FRICTION_SLICK (   s)    STAT(MOVEVARS_FRICTION_SLICK, s)

Definition at line 112 of file player.qh.

Referenced by sys_phys_simulate().

◆ PHYS_FROZEN

#define PHYS_FROZEN (   s)    STAT(FROZEN, s)

◆ PHYS_HEALTH

#define PHYS_HEALTH (   s)    STAT(HEALTH, s)

Definition at line 89 of file player.qh.

Referenced by CSQCPlayer_SetCamera().

◆ PHYS_HIGHSPEED

#define PHYS_HIGHSPEED (   s)    STAT(MOVEVARS_HIGHSPEED, s)

Definition at line 116 of file player.qh.

◆ PHYS_INPUT_BUTTON_ATCK

◆ PHYS_INPUT_BUTTON_ATCK2

◆ PHYS_INPUT_BUTTON_BACKWARD

#define PHYS_INPUT_BUTTON_BACKWARD (   s)    (PHYS_INPUT_MOVEVALUES(s).x < 0)

Definition at line 178 of file player.qh.

◆ PHYS_INPUT_BUTTON_CHAT

◆ PHYS_INPUT_BUTTON_CROUCH

◆ PHYS_INPUT_BUTTON_DODGE

#define PHYS_INPUT_BUTTON_DODGE (   s)    PHYS_INPUT_BUTTON_BUTTON11(s)

Definition at line 159 of file player.qh.

◆ PHYS_INPUT_BUTTON_DRAG

#define PHYS_INPUT_BUTTON_DRAG (   s)    PHYS_INPUT_BUTTON_BUTTON8(s)

Definition at line 153 of file player.qh.

Referenced by bot_cmd_pause(), bot_think(), and Drag().

◆ PHYS_INPUT_BUTTON_FORWARD

#define PHYS_INPUT_BUTTON_FORWARD (   s)    (PHYS_INPUT_MOVEVALUES(s).x > 0)

Definition at line 179 of file player.qh.

◆ PHYS_INPUT_BUTTON_HOOK

#define PHYS_INPUT_BUTTON_HOOK (   s)    PHYS_INPUT_BUTTON_BUTTON6(s)

◆ PHYS_INPUT_BUTTON_INFO

#define PHYS_INPUT_BUTTON_INFO (   s)    PHYS_INPUT_BUTTON_BUTTON7(s)

Definition at line 152 of file player.qh.

Referenced by bot_think(), and PrintWelcomeMessage().

◆ PHYS_INPUT_BUTTON_JETPACK

#define PHYS_INPUT_BUTTON_JETPACK (   s)    PHYS_INPUT_BUTTON_BUTTON10(s)

Definition at line 158 of file player.qh.

Referenced by CheckPlayerJump(), and havocbot_movetogoal().

◆ PHYS_INPUT_BUTTON_JUMP

◆ PHYS_INPUT_BUTTON_LEFT

#define PHYS_INPUT_BUTTON_LEFT (   s)    (PHYS_INPUT_MOVEVALUES(s).y < 0)

Definition at line 180 of file player.qh.

◆ PHYS_INPUT_BUTTON_MASK

#define PHYS_INPUT_BUTTON_MASK (   s)
Value:
( \
| (BIT(6) * PHYS_INPUT_BUTTON_USE(s)) \
)
#define PHYS_INPUT_BUTTON_ATCK2(s)
Definition: player.qh:148
#define PHYS_INPUT_BUTTON_JUMP(s)
Definition: player.qh:147
#define PHYS_INPUT_BUTTON_CROUCH(s)
Definition: player.qh:150
#define PHYS_INPUT_BUTTON_LEFT(s)
Definition: player.qh:180
#define PHYS_INPUT_BUTTON_HOOK(s)
Definition: player.qh:151
#define PHYS_INPUT_BUTTON_ZOOM(s)
Definition: player.qh:149
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition: bits.qh:8
#define PHYS_INPUT_BUTTON_USE(s)
Definition: player.qh:154
#define PHYS_INPUT_BUTTON_FORWARD(s)
Definition: player.qh:179
#define PHYS_INPUT_BUTTON_ATCK(s)
Definition: player.qh:146
#define PHYS_INPUT_BUTTON_BACKWARD(s)
Definition: player.qh:178
#define PHYS_INPUT_BUTTON_RIGHT(s)
Definition: player.qh:181

Definition at line 185 of file player.qh.

Referenced by sys_phys_monitor(), sys_phys_override(), and sys_phys_update().

◆ PHYS_INPUT_BUTTON_MINIGAME

#define PHYS_INPUT_BUTTON_MINIGAME (   s)    PHYS_INPUT_BUTTON_BUTTON12(s)

Definition at line 160 of file player.qh.

Referenced by ChatBubbleThink(), PlayerJump(), and PM_check_blocked().

◆ PHYS_INPUT_BUTTON_PRYDON

#define PHYS_INPUT_BUTTON_PRYDON (   s)    PHYS_INPUT_BUTTON_BUTTON_PRYDON(s)

Definition at line 156 of file player.qh.

◆ PHYS_INPUT_BUTTON_RIGHT

#define PHYS_INPUT_BUTTON_RIGHT (   s)    (PHYS_INPUT_MOVEVALUES(s).y > 0)

Definition at line 181 of file player.qh.

◆ PHYS_INPUT_BUTTON_USE

#define PHYS_INPUT_BUTTON_USE (   s)    PHYS_INPUT_BUTTON_BUTTON_USE(s)

◆ PHYS_INPUT_BUTTON_ZOOM

#define PHYS_INPUT_BUTTON_ZOOM (   s)    PHYS_INPUT_BUTTON_BUTTON4(s)

Definition at line 149 of file player.qh.

Referenced by bot_think(), CSQC_UpdateView(), PlayerPreThink(), and PM_check_nickspam().

◆ PHYS_INPUT_BUTTON_ZOOMSCRIPT

#define PHYS_INPUT_BUTTON_ZOOMSCRIPT (   s)    PHYS_INPUT_BUTTON_BUTTON9(s)

Definition at line 157 of file player.qh.

Referenced by PlayerPreThink().

◆ PHYS_JETPACK_ACCEL_SIDE

#define PHYS_JETPACK_ACCEL_SIDE (   s)    STAT(JETPACK_ACCEL_SIDE, s)

Definition at line 118 of file player.qh.

Referenced by PM_jetpack().

◆ PHYS_JETPACK_ACCEL_UP

#define PHYS_JETPACK_ACCEL_UP (   s)    STAT(JETPACK_ACCEL_UP, s)

Definition at line 119 of file player.qh.

Referenced by PM_jetpack().

◆ PHYS_JETPACK_ANTIGRAVITY

#define PHYS_JETPACK_ANTIGRAVITY (   s)    STAT(JETPACK_ANTIGRAVITY, s)

Definition at line 120 of file player.qh.

Referenced by PM_jetpack().

◆ PHYS_JETPACK_FUEL

#define PHYS_JETPACK_FUEL (   s)    STAT(JETPACK_FUEL, s)

Definition at line 121 of file player.qh.

Referenced by CheckPlayerJump(), and PM_jetpack().

◆ PHYS_JETPACK_MAXSPEED_SIDE

#define PHYS_JETPACK_MAXSPEED_SIDE (   s)    STAT(JETPACK_MAXSPEED_SIDE, s)

Definition at line 122 of file player.qh.

Referenced by PM_jetpack().

◆ PHYS_JETPACK_MAXSPEED_UP

#define PHYS_JETPACK_MAXSPEED_UP (   s)    STAT(JETPACK_MAXSPEED_UP, s)

Definition at line 123 of file player.qh.

Referenced by PM_jetpack().

◆ PHYS_JETPACK_REVERSE_THRUST

#define PHYS_JETPACK_REVERSE_THRUST (   s)    STAT(JETPACK_REVERSE_THRUST, s)

Definition at line 124 of file player.qh.

Referenced by PM_jetpack().

◆ PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS

#define PHYS_JUMPSPEEDCAP_DISABLE_ONRAMPS (   s)    STAT(MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS)

Definition at line 126 of file player.qh.

Referenced by PlayerJump().

◆ PHYS_JUMPVELOCITY

#define PHYS_JUMPVELOCITY (   s)    STAT(MOVEVARS_JUMPVELOCITY, s)

Definition at line 127 of file player.qh.

Referenced by PlayerJump().

◆ PHYS_JUMPVELOCITY_CROUCH

#define PHYS_JUMPVELOCITY_CROUCH (   s)    STAT(MOVEVARS_JUMPVELOCITY_CROUCH, s)

Definition at line 128 of file player.qh.

Referenced by PlayerJump().

◆ PHYS_MAXAIRSPEED

#define PHYS_MAXAIRSPEED (   s)    STAT(MOVEVARS_MAXAIRSPEED, s)

◆ PHYS_MAXAIRSTRAFESPEED

#define PHYS_MAXAIRSTRAFESPEED (   s)    STAT(MOVEVARS_MAXAIRSTRAFESPEED, s)

Definition at line 131 of file player.qh.

Referenced by HUD_StrafeHUD(), sys_phys_simulate(), and sys_phys_update().

◆ PHYS_MAXSPEED

#define PHYS_MAXSPEED (   s)    STAT(MOVEVARS_MAXSPEED, s)

◆ PHYS_PL_CROUCH_MAX

#define PHYS_PL_CROUCH_MAX (   s)    STAT(PL_CROUCH_MAX, s)

Definition at line 82 of file player.qh.

Referenced by CSQCPlayer_SetMinsMaxs().

◆ PHYS_PL_CROUCH_MIN

#define PHYS_PL_CROUCH_MIN (   s)    STAT(PL_CROUCH_MIN, s)

Definition at line 83 of file player.qh.

Referenced by CSQCPlayer_SetMinsMaxs().

◆ PHYS_PL_CROUCH_VIEWOFS

#define PHYS_PL_CROUCH_VIEWOFS (   s)    STAT(PL_CROUCH_VIEW_OFS, s)

Definition at line 86 of file player.qh.

Referenced by CSQCPlayer_SetCamera(), and CSQCPlayer_SetMinsMaxs().

◆ PHYS_PL_MAX

#define PHYS_PL_MAX (   s)    STAT(PL_MAX, s)

Definition at line 80 of file player.qh.

Referenced by CSQCPlayer_SetMinsMaxs().

◆ PHYS_PL_MIN

#define PHYS_PL_MIN (   s)    STAT(PL_MIN, s)

Definition at line 81 of file player.qh.

Referenced by CSQCPlayer_SetMinsMaxs().

◆ PHYS_PL_VIEWOFS

#define PHYS_PL_VIEWOFS (   s)    STAT(PL_VIEW_OFS, s)

Definition at line 85 of file player.qh.

Referenced by CSQCPlayer_SetCamera(), and CSQCPlayer_SetMinsMaxs().

◆ PHYS_SLICK_APPLYGRAVITY

#define PHYS_SLICK_APPLYGRAVITY (   s)    STAT(SLICK_APPLYGRAVITY)

Definition at line 144 of file player.qh.

Referenced by sys_phys_update().

◆ PHYS_STOPSPEED

#define PHYS_STOPSPEED (   s)    STAT(MOVEVARS_STOPSPEED, s)

Definition at line 134 of file player.qh.

Referenced by sys_phys_simulate().

◆ PHYS_TRACK_CANJUMP

#define PHYS_TRACK_CANJUMP (   s)    STAT(MOVEVARS_TRACK_CANJUMP, s)

Definition at line 136 of file player.qh.

Referenced by PlayerJump().

◆ PHYS_VIEWHEIGHT

#define PHYS_VIEWHEIGHT (   s)    STAT(VIEWHEIGHT, s)

Definition at line 88 of file player.qh.

Referenced by CSQCPlayer_SetCamera().

◆ PHYS_WARSOWBUNNY_ACCEL

#define PHYS_WARSOWBUNNY_ACCEL (   s)    STAT(MOVEVARS_WARSOWBUNNY_ACCEL, s)

Definition at line 138 of file player.qh.

Referenced by PM_AirAccelerate().

◆ PHYS_WARSOWBUNNY_AIRFORWARDACCEL

#define PHYS_WARSOWBUNNY_AIRFORWARDACCEL (   s)    STAT(MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL, s)

Definition at line 139 of file player.qh.

Referenced by PM_AirAccelerate().

◆ PHYS_WARSOWBUNNY_BACKTOSIDERATIO

#define PHYS_WARSOWBUNNY_BACKTOSIDERATIO (   s)    STAT(MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO, s)

Definition at line 140 of file player.qh.

Referenced by PM_AirAccelerate().

◆ PHYS_WARSOWBUNNY_TOPSPEED

#define PHYS_WARSOWBUNNY_TOPSPEED (   s)    STAT(MOVEVARS_WARSOWBUNNY_TOPSPEED, s)

Definition at line 141 of file player.qh.

Referenced by PM_AirAccelerate().

◆ PHYS_WARSOWBUNNY_TURNACCEL

#define PHYS_WARSOWBUNNY_TURNACCEL (   s)    STAT(MOVEVARS_WARSOWBUNNY_TURNACCEL, s)

Definition at line 142 of file player.qh.

Referenced by PM_AirAccelerate(), and sys_phys_simulate().

◆ SET_DUCKED

#define SET_DUCKED (   s)    ((s).flags |= FL_DUCKED)

Definition at line 207 of file player.qh.

Referenced by PM_ClientMovement_UpdateStatus().

◆ SET_JUMP_HELD

#define SET_JUMP_HELD (   s)    ((s).flags &= ~FL_JUMPRELEASED)

Definition at line 200 of file player.qh.

Referenced by CheckWaterJump(), PlayerJump(), and sys_phys_simulate().

◆ UNSET_DUCKED

#define UNSET_DUCKED (   s)    ((s).flags &= ~FL_DUCKED)

◆ UNSET_JUMP_HELD

#define UNSET_JUMP_HELD (   s)    ((s).flags |= FL_JUMPRELEASED)

Definition at line 201 of file player.qh.

Referenced by CheckPlayerJump(), and sys_phys_fix().

◆ WAS_ONGROUND

#define WAS_ONGROUND (   s)    boolean((s).lastflags & FL_ONGROUND)

Definition at line 203 of file player.qh.

Referenced by PlayerJump(), and sys_phys_update().

◆ WAS_ONSLICK

#define WAS_ONSLICK (   s)    boolean((s).lastflags & FL_ONSLICK)

Definition at line 204 of file player.qh.

Referenced by PlayerJump().

Function Documentation

◆ AdjustAirAccelQW()

float AdjustAirAccelQW ( float  accelqw,
float  factor 
)

Definition at line 213 of file player.qc.

References bound(), copysign(), and fabs().

Referenced by PM_Accelerate().

214 {
215  return copysign(bound(0.000001, 1 - (1 - fabs(accelqw)) * factor, 1), accelqw);
216 }
float copysign(float e, float f)
Definition: mathlib.qc:225
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ float()

float ( entity  ,
float   
) = #628

Referenced by _StartItem(), Local_Notification(), and Local_Notification_WOVA().

+ Here is the caller graph for this function:

◆ IsFlying()

bool IsFlying ( entity  a)

Definition at line 804 of file player.qc.

805 {
806  if(IS_ONGROUND(this))
807  return false;
808  if(this.waterlevel >= WATERLEVEL_SWIMMING)
809  return false;
810  tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 24', MOVE_NORMAL, this);
811  //traceline(this.origin, this.origin - '0 0 48', MOVE_NORMAL, this);
812  if(trace_fraction < 1)
813  return false;
814  return true;
815 }
float waterlevel
Definition: progsdefs.qc:181
const float MOVE_NORMAL
Definition: csprogsdefs.qc:252
#define IS_ONGROUND(s)
Definition: movetypes.qh:16
vector maxs
Definition: csprogsdefs.qc:113
origin
Definition: ent_cs.qc:114
vector mins
Definition: csprogsdefs.qc:113
const int WATERLEVEL_SWIMMING
Definition: movetypes.qh:13
float trace_fraction
Definition: csprogsdefs.qc:36

Variable Documentation

◆ buttons_old

int buttons_old

Definition at line 64 of file player.qh.

Referenced by sys_phys_monitor().

◆ conveyor

entity conveyor

Definition at line 54 of file player.qh.

Referenced by PutPlayerInServer(), sys_phys_postupdate(), and sys_phys_update().

◆ gravity

float gravity

Definition at line 58 of file player.qh.

◆ lastclassname

string lastclassname

Definition at line 67 of file player.qh.

Referenced by sys_phys_postupdate(), and sys_phys_spectator_control().

◆ lastflags

float lastflags

Definition at line 60 of file player.qh.

Referenced by sys_phys_postupdate().

◆ lastground

float lastground

◆ movement_old

vector movement_old

Definition at line 65 of file player.qh.

Referenced by sys_phys_monitor().

◆ race_penalty

float race_penalty

Definition at line 56 of file player.qh.

◆ swamp_slowdown

float swamp_slowdown

Definition at line 59 of file player.qh.

◆ teleport_time

float teleport_time

Definition at line 212 of file player.qh.

Referenced by CheckWaterJump(), and sys_phys_update().

◆ v_angle_old

vector v_angle_old

Definition at line 66 of file player.qh.

Referenced by sys_phys_monitor().

◆ wasFlying

bool wasFlying

Definition at line 62 of file player.qh.

Referenced by PM_check_hitground(), and sys_phys_update().