51 float maxspeed_mod = 1;
61 maxspeed_mod =
STAT(SPECTATORSPEED,
this);
69 int cont = pointcontents(midpoint);
100 this.velocity_x = this.
movedir.x;
101 this.velocity_y = this.
movedir.y;
152 emit(phys_land,
this);
212 this.velocity_z += grav / 2;
214 this.velocity_z += grav / 2;
224 && this.velocity_z >= -180
229 vector forward, right, up;
241 this.velocity_z = 310;
249 vector forward, right, up;
254 + right *
PHYS_CS(
this).movement.y
271 else if (wishvel ==
'0 0 0')
278 wishvel.z =
PHYS_CS(
this).movement_old.x;
282 float f =
vlen(wishvel);
288 if ((this.origin_z + this.view_ofs_z) < f)
290 else if ((this.origin_z + (this.mins_z + this.maxs_z) * 0.5) < f)
292 else if ((this.origin_z + this.mins_z + 1) < f)
303 float wishspeed =
vlen(wishvel);
306 const vector wishdir = wishspeed ? wishvel * (1 / wishspeed) :
'0 0 0';
313 float wishspeed0 = wishspeed;
315 wishspeed =
min(wishspeed, maxairspd);
321 float accelerating = (this.
velocity * wishdir > 0);
322 float wishspeed2 = wishspeed;
365 PM_Accelerate(
this, dt, wishdir, wishspeed, wishspeed0, airaccel, airaccelqw,
387 f = wishspeed - this.
velocity * wishdir;
391 this.
velocity += accelspeed * wishdir;
405 this.velocity_z = 200;
410 const float addspeed = wishspeed - this.
velocity * wishdir;
414 this.
velocity += accelspeed * wishdir;
431 if (
f2 > 0 && realfriction > 0)
446 const float independent_geometric = (1 - realfriction * dt_r) ** (dt / dt_r);
448 if (S < f && f < S / independent_geometric)
451 f = S - S * realfriction * (dt - (dt_r *
log(S / f)) /
log(1 - realfriction * dt_r));
454 f = independent_geometric;
456 f = 1 - realfriction * dt * S / f;
461 const float addspeed = wishspeed - this.
velocity * wishdir;
467 const float accelspeed =
min(accel * dt * wishspeed, addspeed);
468 this.
velocity += accelspeed * wishdir;
498 for (
int i = 0; i < MAX_CLIP_PLANES && movetime > 0; ++i)
500 vector push = vel * movetime;
547 if (
this && ent && touched2 && ent.solid !=
SOLID_NOT)
#define MUTATOR_CALLHOOK(id,...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
bool sys_phys_override(entity this, float dt)
void sys_phys_monitor(entity this, float dt)
void sys_phys_ai(entity this)
void sys_phys_spectator_control(entity this)
void sys_phys_pregame_hold(entity this)
void sys_phys_fixspeed(entity this, float maxspeed_mod)
void sys_phys_fix(entity this, float dt)
const int IT_USING_JETPACK
void PM_check_hitground(entity this)
void PM_jetpack(entity this, float maxspd_mod, float dt)
void PM_check_blocked(entity this)
void PM_check_frozen(entity this)
void CPM_PM_Aircontrol(entity this, float dt, vector wishdir, float wishspeed)
void CheckPlayerJump(entity this)
float GeomLerp(float a, float _lerp, float b)
void PM_check_slick(entity this)
float IsMoveInDirection(vector mv, float ang)
bool IsFlying(entity this)
void PM_Accelerate(entity this, float dt, vector wishdir, float wishspeed, float wishspeed0, float accel, float accelqw, float stretchfactor, float sidefric, float speedlimit)
void PM_AirAccelerate(entity this, float dt, vector wishdir, float wishspeed)
void PM_Footsteps(entity this)
#define PHYS_INPUT_BUTTON_CROUCH(s)
#define PHYS_AIRSTRAFEACCEL_QW(s)
#define PHYS_FRICTION_SLICK(s)
#define PHYS_MAXAIRSTRAFESPEED(s)
#define PHYS_INPUT_BUTTON_JUMP(s)
#define PHYS_AIRACCELERATE(s)
#define PHYS_STOPSPEED(s)
#define PHYS_MAXAIRSPEED(s)
#define PHYS_AIRACCEL_QW(s)
#define PHYS_AIRSPEEDLIMIT_NONQW(s)
#define PHYS_AIRSTRAFEACCELERATE(s)
#define PHYS_SLICKACCELERATE(s)
#define PHYS_ACCELERATE(s)
#define PHYS_AIRACCEL_SIDEWAYS_FRICTION(s)
#define PHYS_AIRSTOPACCELERATE_FULL(s)
#define PHYS_AIRACCEL_QW_STRETCHFACTOR(s)
#define PHYS_FRICTION_REPLICA_DT
#define PHYS_AIRSTOPACCELERATE(s)
#define PHYS_WARSOWBUNNY_TURNACCEL(s)
#define PHYS_FRICTION_ONLAND(s)
#define PHYS_AIRCONTROL(s)
#define PHYS_SLICK_APPLYGRAVITY(s)
#define PHYS_INPUT_BUTTON_MASK(s)
const float MOVE_NOMONSTERS
float trace_dphitcontents
const float SOLID_TRIGGER
float trace_dpstartcontents
const float CONTENT_WATER
string trace_dphittexturename
float trace_dphitq3surfaceflags
const float CONTENT_EMPTY
vector trace_plane_normal
const float CONTENT_SLIME
#define MAKE_VECTORS(angles, forward, right, up)
Same as the makevectors builtin but uses the provided locals instead of the v_* globals.
float disableclientprediction
float com_phys_acc_rate_air_strafe
float com_phys_acc_rate_air
float com_phys_gravity_factor
float com_phys_vel_max_air
float com_phys_vel_max_air_strafe
float com_phys_acc_rate_air_stop
bool com_phys_friction_air
void sys_phys_update(entity this, float dt)
void sys_phys_update_single(entity this)
void sys_phys_simulate(entity this, float dt)
for players
void sys_phys_simulate_simple(entity this, float dt)
for other entities
void sys_phys_postupdate(entity this)
#define FOREACH_ENTITY_RADIUS_ORDERED(org, dist, cond, body)
const int WATERLEVEL_SWIMMING
const int WATERLEVEL_WETFEET
const int WATERLEVEL_SUBMERGED
const int MOVETYPE_FOLLOW
const int WATERLEVEL_NONE
const int MOVETYPE_FLY_WORLDONLY
#define UNSET_ONGROUND(s)
const int MOVETYPE_NOCLIP
#define PHYS_ENTGRAVITY(s)
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1points f2
#define ClipVelocity(in, normal, out, overbounce)
ERASEABLE float boxesoverlap(vector m1, vector m2, vector m3, vector m4)
requires that m2>m1 in all coordinates, and that m4>m3
void viewloc_PlayerPhysics(entity this)