Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
cl_player.qc File Reference
#include "cl_player.qh"
#include "cl_model.qh"
#include "common.qh"
#include "interpolate.qh"
Include dependency graph for cl_player.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void CSQC_ClientMovement_PlayerMove_Frame (entity this)
vector CSQCModel_ApplyStairSmoothing (entity this, bool isonground, vector v)
vector CSQCPlayer_ApplyBobbing (entity this, vector v)
vector CSQCPlayer_ApplyChase (entity this, vector v)
void CSQCPlayer_ApplyDeathTilt (entity this)
void CSQCPlayer_ApplyIdleScaling (entity this)
vector CSQCPlayer_ApplySmoothing (entity this, vector v)
void CSQCPlayer_CalcRefdef (entity this)
float CSQCPlayer_CalcRoll (entity this)
vector CSQCPlayer_GetPredictionErrorO ()
vector CSQCPlayer_GetPredictionErrorV ()
bool CSQCPlayer_IsLocalPlayer (entity this)
void CSQCPlayer_Physics (entity this)
bool CSQCPlayer_PostUpdate (entity this)
void CSQCPlayer_PredictTo (entity this, float endframe, bool apply_error)
bool CSQCPlayer_PreUpdate (entity this)
void CSQCPlayer_Remove (entity this)
void CSQCPlayer_SavePrediction (entity this)
void CSQCPlayer_SetCamera ()
 Called once per CSQC_UpdateView()
void CSQCPlayer_SetMinsMaxs (entity this)
void CSQCPlayer_SetPredictionError (vector o, vector v, float onground_diff)
void CSQCPlayer_Unpredict (entity this)

Variables

float autocvar_chase_back
bool autocvar_chase_overhead
float autocvar_chase_pitchangle
float autocvar_chase_up
float autocvar_cl_bob = 0
float autocvar_cl_bob2 = 0
float autocvar_cl_bob2cycle = 1
float autocvar_cl_bob2smooth = 0.05
float autocvar_cl_bob_limit = 7
float autocvar_cl_bob_limit_heightcheck = 0
float autocvar_cl_bob_velocity_limit = 400
float autocvar_cl_bobcycle = 0.5
float autocvar_cl_bobfall = 0.05
float autocvar_cl_bobfallcycle = 3
float autocvar_cl_bobfallminspeed = 200
float autocvar_cl_bobup = 0.5
float autocvar_cl_movement_errorcompensation = 0
bool autocvar_cl_movement_intermissionrunning = false
float autocvar_cl_rollangle
float autocvar_cl_rollspeed
float autocvar_cl_smoothviewheight = 0.05
float autocvar_cl_stairsmoothspeed = 200
bool autocvar_v_deathtilt
float autocvar_v_deathtiltangle
float autocvar_v_idlescale
float autocvar_v_ipitch_cycle
float autocvar_v_ipitch_level
float autocvar_v_iroll_cycle
float autocvar_v_iroll_level
float autocvar_v_iyaw_cycle
float autocvar_v_iyaw_level
float bob2_smooth
float bobfall_speed
float bobfall_swing
float csqcplayer_moveframe
vector csqcplayer_origin
float csqcplayer_predictionerrorfactor
vector csqcplayer_predictionerroro
float csqcplayer_predictionerrortime
vector csqcplayer_predictionerrorv
float csqcplayer_sequence
vector csqcplayer_velocity
int player_pmflags
float pmove_onground
float smooth_prevtime
float stairsmooth_drawtime
float stairsmooth_offset
float stairsmooth_prevtime
float stairsmoothz
float viewheightavg

Function Documentation

◆ CSQC_ClientMovement_PlayerMove_Frame()

void CSQC_ClientMovement_PlayerMove_Frame ( entity this)

References entity().

Referenced by CSQCPlayer_Physics().

◆ CSQCModel_ApplyStairSmoothing()

vector CSQCModel_ApplyStairSmoothing ( entity this,
bool isonground,
vector v )

Definition at line 248 of file cl_player.qc.

249{
250 float smoothtime = bound(0, time - this.stairsmooth_prevtime, 0.1);
251 this.stairsmooth_prevtime = max(this.stairsmooth_prevtime, this.stairsmooth_drawtime); // stairsmooth_drawtime is the previous frame's time at this point
252
253 if(this.csqcmodel_teleported || !isonground || autocvar_cl_stairsmoothspeed <= 0 || this.ground_networkentity)
254 this.stairsmooth_offset = v.z;
255 else
256 {
257 if(this.stairsmooth_offset < v.z)
258 v.z = this.stairsmooth_offset = bound(v.z - PHYS_STEPHEIGHT(this), this.stairsmooth_offset + smoothtime * autocvar_cl_stairsmoothspeed, v.z);
259 else if(this.stairsmooth_offset > v.z)
260 v.z = this.stairsmooth_offset = bound(v.z, this.stairsmooth_offset - smoothtime * autocvar_cl_stairsmoothspeed, v.z + PHYS_STEPHEIGHT(this));
261 }
262
265
266 return v;
267}
float csqcmodel_teleported
Definition cl_model.qh:39
float stairsmooth_prevtime
Definition cl_player.qc:246
float autocvar_cl_stairsmoothspeed
Definition cl_player.qc:216
float stairsmooth_drawtime
Definition cl_player.qc:247
float stairsmooth_offset
Definition cl_player.qc:245
float time
float ground_networkentity
float bound(float min, float value, float max)
float max(float f,...)
#define PHYS_STEPHEIGHT(s)
Definition movetypes.qh:38
float drawtime
Definition view.qh:119

References autocvar_cl_stairsmoothspeed, bound(), csqcmodel_teleported, drawtime, entity(), ground_networkentity, max(), PHYS_STEPHEIGHT, stairsmooth_drawtime, stairsmooth_offset, stairsmooth_prevtime, time, and vector.

Referenced by CSQCModel_Hook_PreDraw(), and CSQCPlayer_SetCamera().

◆ CSQCPlayer_ApplyBobbing()

vector CSQCPlayer_ApplyBobbing ( entity this,
vector v )

Definition at line 314 of file cl_player.qc.

315{
316 if(this.csqcmodel_isdead || PHYS_INVEHICLE(this) || !(this.isplayermodel & ISPLAYER_PLAYER))
317 return v;
318
319 // bounded XY speed, used by several effects below
320 float bob, cycle;
321
322 // vertical view bobbing code
324 {
325 float bob_limit = autocvar_cl_bob_limit;
326
328 {
329 // use traces to determine what range the view can bob in, and scale down the bob as needed
330 vector bob_height_check_dest = v;
331 bob_height_check_dest.z += autocvar_cl_bob_limit * 1.1;
332 traceline(v, bob_height_check_dest, MOVE_NOMONSTERS, NULL);
333 float trace1fraction = trace_fraction;
334
335 bob_height_check_dest = v;
336 bob_height_check_dest.z += autocvar_cl_bob_limit * -0.5;
337 traceline(v, bob_height_check_dest, MOVE_NOMONSTERS, NULL);
338 float trace2fraction = trace_fraction;
339
340 bob_limit *= min(trace1fraction, trace2fraction);
341 }
342
343 // LordHavoc: figured out bobup: the time at which the sin is at 180
344 // degrees (which allows lengthening or squishing the peak or valley)
345 cycle = time / autocvar_cl_bobcycle;
346 cycle -= rint(cycle);
347 if(cycle < autocvar_cl_bobup)
348 cycle = sin(M_PI * cycle / autocvar_cl_bobup);
349 else
350 cycle = sin(M_PI + M_PI * (cycle - autocvar_cl_bobup) / (1.0 - autocvar_cl_bobup));
351 // bob is proportional to velocity in the xy plane
352 // (don't count Z, or jumping messes it up)
353 float xyspeed = bound(0, sqrt(this.velocity.x * this.velocity.x + this.velocity.y * this.velocity.y), autocvar_cl_bob_velocity_limit);
354 bob = xyspeed * autocvar_cl_bob;
355 bob = bound(0, bob, bob_limit);
356 bob = bob * 0.3 + bob * 0.7 * cycle;
357 v.z += bob;
358 }
359
360 // horizontal view bobbing code
362 {
363 cycle = time / autocvar_cl_bob2cycle;
364 cycle -= rint(cycle);
365 if(cycle < 0.5)
366 cycle = cos(M_PI * cycle / 0.5); // cos looks better here with the other view bobbing using sin
367 else
368 cycle = cos(M_PI + M_PI * (cycle - 0.5) / 0.5);
369 bob = autocvar_cl_bob2 * cycle;
370
371 // this value slowly decreases from 1 to 0 when we stop touching the ground.
372 // The cycle is later multiplied with it so the view smooths back to normal
373 if(IS_ONGROUND(this) && !(input_buttons & BIT(1))) // also block the effect while the jump button is pressed, to avoid twitches when bunny-hopping
374 bob2_smooth = 1;
375 else
376 {
377 if(bob2_smooth > 0)
379 else
380 bob2_smooth = 0;
381 }
382
383 // calculate the front and side of the player between the X and Y axes
385 // now get the speed based on those angles. The bounds should match the same value as xyspeed's
388 v_forward = v_forward * bob;
389 v_right = v_right * bob;
390 // we use side with forward and front with right, so the bobbing goes
391 // to the side when we walk forward and to the front when we strafe
392 vector bob2vel;
393 bob2vel.x = side * v_forward.x + front * v_right.x + 0 * v_up.x;
394 bob2vel.y = side * v_forward.y + front * v_right.y + 0 * v_up.y;
395 bob2vel.z = side * v_forward.z + front * v_right.z + 0 * v_up.z;
396 v.x += bob2vel.x;
397 v.y += bob2vel.y;
398 }
399
400 // fall bobbing code
401 // causes the view to swing down and back up when touching the ground
403 {
404 if(!IS_ONGROUND(this))
405 {
406 bobfall_speed = bound(-400, this.velocity.z, 0) * bound(0, autocvar_cl_bobfall, 0.1);
408 bobfall_swing = 1;
409 else
410 bobfall_swing = 0; // really?
411 }
412 else
413 {
415 float bobfall = sin(M_PI * bobfall_swing) * bobfall_speed;
416 v.z += bobfall;
417 }
418 }
419
420 return v;
421}
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition bits.qh:8
float autocvar_cl_bob_limit
Definition cl_player.qc:301
float autocvar_cl_bobcycle
Definition cl_player.qc:300
float autocvar_cl_bob2smooth
Definition cl_player.qc:310
float autocvar_cl_bob_limit_heightcheck
Definition cl_player.qc:302
float autocvar_cl_bob2cycle
Definition cl_player.qc:309
float autocvar_cl_bobup
Definition cl_player.qc:304
float bobfall_speed
Definition cl_player.qc:312
float autocvar_cl_bobfall
Definition cl_player.qc:305
float autocvar_cl_bob
Definition cl_player.qc:299
float bobfall_swing
Definition cl_player.qc:311
float autocvar_cl_bob2
Definition cl_player.qc:308
float bob2_smooth
Definition cl_player.qc:313
float autocvar_cl_bobfallcycle
Definition cl_player.qc:306
float autocvar_cl_bob_velocity_limit
Definition cl_player.qc:303
float autocvar_cl_bobfallminspeed
Definition cl_player.qc:307
#define PHYS_INVEHICLE(s)
Definition player.qh:280
vector v_up
const float MOVE_NOMONSTERS
float frametime
vector velocity
vector view_angles
vector v_right
float input_buttons
vector v_forward
float trace_fraction
bool csqcmodel_isdead
int isplayermodel
const int ISPLAYER_PLAYER
Definition common.qh:59
#define M_PI
Definition mathlib.qh:108
float cos(float f)
float sqrt(float f)
float sin(float f)
float min(float f,...)
float rint(float f)
#define IS_ONGROUND(s)
Definition movetypes.qh:16
#define NULL
Definition post.qh:14
#define makevectors
Definition post.qh:21
vector
Definition self.qh:92

References autocvar_cl_bob, autocvar_cl_bob2, autocvar_cl_bob2cycle, autocvar_cl_bob2smooth, autocvar_cl_bob_limit, autocvar_cl_bob_limit_heightcheck, autocvar_cl_bob_velocity_limit, autocvar_cl_bobcycle, autocvar_cl_bobfall, autocvar_cl_bobfallcycle, autocvar_cl_bobfallminspeed, autocvar_cl_bobup, BIT, bob2_smooth, bobfall_speed, bobfall_swing, bound(), cos(), csqcmodel_isdead, entity(), frametime, input_buttons, IS_ONGROUND, ISPLAYER_PLAYER, isplayermodel, M_PI, makevectors, max(), min(), MOVE_NOMONSTERS, NULL, PHYS_INVEHICLE, rint(), sin(), sqrt(), time, trace_fraction, v_forward, v_right, v_up, vector, velocity, and view_angles.

Referenced by CSQCPlayer_CalcRefdef().

◆ CSQCPlayer_ApplyChase()

vector CSQCPlayer_ApplyChase ( entity this,
vector v )

Definition at line 446 of file cl_player.qc.

447{
448 vector forward;
449 vector chase_dest;
450
452 {
453 view_angles.x = 0;
455 forward = v_forward;
456 vector up = v_up;
457 // trace a little further so it hits a surface more consistently (to avoid 'snapping' on the edge of the range)
458 chase_dest.x = v.x - forward.x * autocvar_chase_back + up.x * autocvar_chase_up;
459 chase_dest.y = v.y - forward.y * autocvar_chase_back + up.y * autocvar_chase_up;
460 chase_dest.z = v.z - forward.z * autocvar_chase_back + up.z * autocvar_chase_up;
461
462 // trace from first person view location to our chosen third person view location
463 traceline(v, chase_dest, MOVE_NOMONSTERS, NULL);
464
465 vector bestvieworg = trace_endpos;
466 vector offset = '0 0 0';
467 for(offset.x = -16; offset.x <= 16; offset.x += 8)
468 {
469 for(offset.y = -16; offset.y <= 16; offset.y += 8)
470 {
472 up = v_up;
473 chase_dest.x = v.x - forward.x * autocvar_chase_back + up.x * autocvar_chase_up + offset.x;
474 chase_dest.y = v.y - forward.y * autocvar_chase_back + up.y * autocvar_chase_up + offset.y;
475 chase_dest.z = v.z - forward.z * autocvar_chase_back + up.z * autocvar_chase_up + offset.z;
476 traceline(v, chase_dest, MOVE_NOMONSTERS, NULL);
477 if(bestvieworg.z > trace_endpos.z)
478 bestvieworg.z = trace_endpos.z;
479 }
480 }
481 bestvieworg.z -= 8;
482 v = bestvieworg;
483
485 //setproperty(VF_CL_VIEWANGLES, view_angles); // update view angles as well so we can aim
486 }
487 else
488 {
490 forward = v_forward;
492 forward = normalize(forward * -1);
493 // trace a little further so it hits a surface more consistently (to avoid 'snapping' on the edge of the range)
494 float cdist = -autocvar_chase_back - 8;
495 chase_dest.x = v.x + forward.x * cdist;
496 chase_dest.y = v.y + forward.y * cdist;
497 chase_dest.z = v.z + forward.z * cdist + autocvar_chase_up;
498 if (this.move_movetype == MOVETYPE_NOCLIP)
499 {
500 // as if traceline hasn't hit anything
501 trace_endpos = chase_dest;
502 trace_plane_normal = '0 0 0';
503 }
504 else
505 {
506 traceline(v, chase_dest, MOVE_NOMONSTERS, NULL);
507 }
508 v.x = 1 * trace_endpos.x + 8 * forward.x + 4 * trace_plane_normal.x;
509 v.y = 1 * trace_endpos.y + 8 * forward.y + 4 * trace_plane_normal.y;
510 v.z = 1 * trace_endpos.z + 8 * forward.z + 4 * trace_plane_normal.z;
511
513 {
514 // now flip the view so the player is looking at themselves
515 vector newang = vectoangles(forward);
516 view_angles.x = view_angles.x * -1; // inverse up-down looking direction
517 view_angles.y = newang.y;
518 }
519 }
520
521#if 0
522 tracebox(v, '-4 -4 -4', '4 4 4', v - v_forward * autocvar_chase_back, MOVE_NORMAL, this);
523 v = trace_endpos;
524 tracebox(v, '-4 -4 -4', '4 4 4', v + v_up * autocvar_chase_up, MOVE_NORMAL, this);
525 v = trace_endpos;
526#endif
527 return v;
528}
float autocvar_chase_pitchangle
Definition cl_player.qc:445
float autocvar_chase_back
Definition cl_player.qc:442
bool autocvar_chase_overhead
Definition cl_player.qc:444
float autocvar_chase_up
Definition cl_player.qc:443
int spectatee_status
the -1 disables HUD panels before CSQC receives necessary data
Definition main.qh:197
const float MOVE_NORMAL
vector trace_endpos
vector trace_plane_normal
vector vectoangles(vector v)
vector normalize(vector v)
float move_movetype
Definition movetypes.qh:76
const int MOVETYPE_NOCLIP
Definition movetypes.qh:137
bool autocvar_chase_front
Definition view.qh:18

References autocvar_chase_back, autocvar_chase_front, autocvar_chase_overhead, autocvar_chase_pitchangle, autocvar_chase_up, entity(), makevectors, move_movetype, MOVE_NOMONSTERS, MOVE_NORMAL, MOVETYPE_NOCLIP, normalize(), NULL, spectatee_status, trace_endpos, trace_plane_normal, v_forward, v_up, vectoangles(), vector, and view_angles.

Referenced by CSQCPlayer_CalcRefdef().

◆ CSQCPlayer_ApplyDeathTilt()

void CSQCPlayer_ApplyDeathTilt ( entity this)

Definition at line 271 of file cl_player.qc.

272{
274 return;
275 // incompatible with cl_eventchase_death 2 because tilting is applied while the corpse is
276 // in the air and immediately turned off when it touches the ground
278 return;
280}
float autocvar_v_deathtiltangle
Definition cl_player.qc:270
bool autocvar_v_deathtilt
Definition cl_player.qc:269
float death_time
int autocvar_cl_eventchase_death
Definition view.qh:88

References autocvar_cl_eventchase_death, autocvar_v_deathtilt, autocvar_v_deathtiltangle, csqcmodel_isdead, death_time, entity(), min(), time, and view_angles.

Referenced by CSQCPlayer_CalcRefdef().

◆ CSQCPlayer_ApplyIdleScaling()

void CSQCPlayer_ApplyIdleScaling ( entity this)

Definition at line 289 of file cl_player.qc.

290{
292 return;
296 //setproperty(VF_CL_VIEWANGLES, view_angles); // update view angles as well so we can aim
297}
float autocvar_v_idlescale
Definition cl_player.qc:282
float autocvar_v_ipitch_cycle
Definition cl_player.qc:283
float autocvar_v_ipitch_level
Definition cl_player.qc:286
float autocvar_v_iyaw_level
Definition cl_player.qc:287
float autocvar_v_iyaw_cycle
Definition cl_player.qc:284
float autocvar_v_iroll_cycle
Definition cl_player.qc:285
float autocvar_v_iroll_level
Definition cl_player.qc:288

References autocvar_v_idlescale, autocvar_v_ipitch_cycle, autocvar_v_ipitch_level, autocvar_v_iroll_cycle, autocvar_v_iroll_level, autocvar_v_iyaw_cycle, autocvar_v_iyaw_level, entity(), sin(), time, and view_angles.

Referenced by CSQCPlayer_CalcRefdef().

◆ CSQCPlayer_ApplySmoothing()

vector CSQCPlayer_ApplySmoothing ( entity this,
vector v )

Definition at line 220 of file cl_player.qc.

221{
222 float smoothtime = bound(0, time - smooth_prevtime, 0.1);
223 smooth_prevtime = max(smooth_prevtime, drawtime); // drawtime is the previous frame's time at this point
224
226 stairsmoothz = v.z;
227 else
228 {
229 if(stairsmoothz < v.z)
230 v.z = stairsmoothz = bound(v.z - PHYS_STEPHEIGHT(this), stairsmoothz + smoothtime * autocvar_cl_stairsmoothspeed, v.z);
231 else if(stairsmoothz > v.z)
232 v.z = stairsmoothz = bound(v.z, stairsmoothz - smoothtime * autocvar_cl_stairsmoothspeed, v.z + PHYS_STEPHEIGHT(this));
233 }
234
235 float viewheight = bound(0, (time - smooth_prevtime) / max(0.0001, autocvar_cl_smoothviewheight), 1);
236 viewheightavg = viewheightavg * (1 - viewheight) + this.view_ofs.z * viewheight;
237 v.z += viewheightavg;
238
240
241 return v;
242}
float autocvar_cl_smoothviewheight
Definition cl_player.qc:217
float stairsmoothz
Definition cl_player.qc:215
float viewheightavg
Definition cl_player.qc:219
float smooth_prevtime
Definition cl_player.qc:218
int pmove_flags
Definition cl_player.qh:35
float PMF_ONGROUND
vector view_ofs
Definition progsdefs.qc:151

References autocvar_cl_smoothviewheight, autocvar_cl_stairsmoothspeed, bound(), csqcmodel_teleported, drawtime, entity(), ground_networkentity, max(), PHYS_STEPHEIGHT, PMF_ONGROUND, pmove_flags, smooth_prevtime, stairsmoothz, time, vector, view_ofs, and viewheightavg.

Referenced by CSQCPlayer_CalcRefdef().

◆ CSQCPlayer_CalcRefdef()

void CSQCPlayer_CalcRefdef ( entity this)

Definition at line 530 of file cl_player.qc.

531{
533 {
534 int refdefflags = 0;
535 if (this.csqcmodel_teleported) refdefflags |= REFDEFFLAG_TELEPORTED;
536 if (input_buttons & BIT(1)) refdefflags |= REFDEFFLAG_JUMPING;
537 // note: these two only work in WIP2, but are harmless in WIP1
538 if (PHYS_HEALTH(NULL) <= 0 && PHYS_HEALTH(NULL) != -666 && PHYS_HEALTH(NULL) != -2342) refdefflags |= REFDEFFLAG_DEAD;
539 if (intermission) refdefflags |= REFDEFFLAG_INTERMISSION;
540 V_CalcRefdef(this, refdefflags); // TODO? uses .health stat in the engine when this isn't called here, may be broken!
541 return;
542 }
543
544 vector vieworg = this.origin;
545 if(intermission)
546 {
547 // just update view offset, don't need to do anything else
548 vieworg.z += this.view_ofs.z;
549 }
550 else
551 {
552 vieworg = CSQCPlayer_ApplySmoothing(this, vieworg);
554 vieworg = CSQCPlayer_ApplyChase(this, vieworg);
555 else
556 {
557 // angles
561 // TODO? we don't have damage time accessible here
562 // origin
563 vieworg = vieworg + view_punchvector;
564 vieworg = CSQCPlayer_ApplyBobbing(this, vieworg);
565 }
567 }
568 setproperty(VF_ORIGIN, vieworg);
569 setproperty(VF_ANGLES, view_angles);
570}
vector CSQCPlayer_ApplySmoothing(entity this, vector v)
Definition cl_player.qc:220
float CSQCPlayer_CalcRoll(entity this)
Definition cl_player.qc:425
void CSQCPlayer_ApplyIdleScaling(entity this)
Definition cl_player.qc:289
vector CSQCPlayer_ApplyChase(entity this, vector v)
Definition cl_player.qc:446
vector CSQCPlayer_ApplyBobbing(entity this, vector v)
Definition cl_player.qc:314
void CSQCPlayer_ApplyDeathTilt(entity this)
Definition cl_player.qc:271
bool use_engine_refdef
Definition cl_player.qh:32
#define PHYS_HEALTH(s)
Definition player.qh:92
float REFDEFFLAG_JUMPING
float REFDEFFLAG_DEAD
const float VF_ORIGIN
vector view_punchangle
float REFDEFFLAG_INTERMISSION
float REFDEFFLAG_TELEPORTED
const float VF_ANGLES
float intermission
vector origin
vector view_punchvector
int autocvar_chase_active
Definition view.qh:17

References autocvar_chase_active, BIT, csqcmodel_teleported, CSQCPlayer_ApplyBobbing(), CSQCPlayer_ApplyChase(), CSQCPlayer_ApplyDeathTilt(), CSQCPlayer_ApplyIdleScaling(), CSQCPlayer_ApplySmoothing(), CSQCPlayer_CalcRoll(), entity(), input_buttons, intermission, NULL, origin, PHYS_HEALTH, REFDEFFLAG_DEAD, REFDEFFLAG_INTERMISSION, REFDEFFLAG_JUMPING, REFDEFFLAG_TELEPORTED, use_engine_refdef, vector, VF_ANGLES, VF_ORIGIN, view_angles, view_ofs, view_punchangle, and view_punchvector.

Referenced by CSQCPlayer_SetCamera().

◆ CSQCPlayer_CalcRoll()

float CSQCPlayer_CalcRoll ( entity this)

Definition at line 425 of file cl_player.qc.

426{
427 if (!autocvar_cl_rollangle) return 0;
428
430 float side = (this.velocity * v_right);
431 float sign = (side < 0) ? -1 : 1;
432 side = fabs(side);
433
434 if(side < autocvar_cl_rollspeed)
436 else
438
439 return side * sign;
440}
float autocvar_cl_rollangle
Definition cl_player.qc:423
float autocvar_cl_rollspeed
Definition cl_player.qc:424
float fabs(float f)

References autocvar_cl_rollangle, autocvar_cl_rollspeed, entity(), fabs(), makevectors, v_right, velocity, and view_angles.

Referenced by CSQCPlayer_CalcRefdef().

◆ CSQCPlayer_GetPredictionErrorO()

vector CSQCPlayer_GetPredictionErrorO ( )

◆ CSQCPlayer_GetPredictionErrorV()

◆ CSQCPlayer_IsLocalPlayer()

bool CSQCPlayer_IsLocalPlayer ( entity this)

Definition at line 210 of file cl_player.qc.

211{
212 return (this == csqcplayer);
213}
entity csqcplayer
Definition cl_player.qh:26

References csqcplayer, and entity().

Referenced by CSQCModel_Draw().

◆ CSQCPlayer_Physics()

void CSQCPlayer_Physics ( entity this)

Definition at line 131 of file cl_player.qc.

132{
133 if(!autocvar_cl_movement) { return; }
134
135 //_Movetype_CheckWater(this); // we apparently need to check water *before* physics so it can use this for water jump
136
137 vector oldv_angle = this.v_angle;
138 vector oldangles = this.angles; // we need to save these, as they're abused by other code
139 this.v_angle = PHYS_INPUT_ANGLES(this);
140 this.angles = PHYS_WORLD_ANGLES(this);
141
143
145
146 view_angles = this.v_angle;
147 input_angles = this.angles;
148 this.v_angle = oldv_angle;
149 this.angles = oldangles;
150
151 this.pmove_flags =
152 ((IS_DUCKED(this)) ? PMF_DUCKED : 0) |
153 ((IS_JUMP_HELD(this)) ? PMF_JUMP_HELD : 0) |
154 ((IS_ONGROUND(this)) ? PMF_ONGROUND : 0);
155}
void CSQC_ClientMovement_PlayerMove_Frame(entity this)
const int PMF_JUMP_HELD
Definition cl_player.qh:36
bool autocvar_cl_movement
Definition cl_player.qh:24
#define PHYS_INPUT_TIMELENGTH
Definition player.qh:254
#define PHYS_WORLD_ANGLES(s)
Definition player.qh:252
vector v_angle
Definition player.qh:237
#define PHYS_INPUT_ANGLES(s)
Definition player.qh:250
#define IS_JUMP_HELD(s)
Definition player.qh:203
#define IS_DUCKED(s)
Definition player.qh:210
vector input_angles
float PMF_DUCKED
ent angles
Definition ent_cs.qc:121
void Movetype_Physics_NoMatchTicrate(entity this, float movedt, bool isclient)
Definition movetypes.qc:779

References angles, autocvar_cl_movement, CSQC_ClientMovement_PlayerMove_Frame(), entity(), input_angles, IS_DUCKED, IS_JUMP_HELD, IS_ONGROUND, Movetype_Physics_NoMatchTicrate(), PHYS_INPUT_ANGLES, PHYS_INPUT_TIMELENGTH, PHYS_WORLD_ANGLES, PMF_DUCKED, PMF_JUMP_HELD, PMF_ONGROUND, pmove_flags, v_angle, vector, and view_angles.

Referenced by CSQCPlayer_PredictTo().

◆ CSQCPlayer_PostUpdate()

bool CSQCPlayer_PostUpdate ( entity this)

Definition at line 680 of file cl_player.qc.

681{
682 if (this.entnum != player_localnum + 1) return false;
683 csqcplayer = this;
685 if (cvar("cl_movement_replay"))
686 cvar_settemp("cl_movement_replay", "0");
687 this.entremove = CSQCPlayer_Remove;
688 return true;
689}
void CSQCPlayer_Remove(entity this)
Definition cl_player.qc:667
const int CSQCPLAYERSTATUS_FROMSERVER
Definition cl_player.qh:29
float csqcplayer_status
Definition cl_player.qh:27
float cvar_settemp(string tmp_cvar, string tmp_value)
Definition util.qc:811
float player_localnum
float entnum
float cvar(string name)

References csqcplayer, CSQCPlayer_Remove(), csqcplayer_status, CSQCPLAYERSTATUS_FROMSERVER, cvar(), cvar_settemp(), entity(), entnum, and player_localnum.

Referenced by NET_HANDLE().

◆ CSQCPlayer_PredictTo()

void CSQCPlayer_PredictTo ( entity this,
float endframe,
bool apply_error )

Definition at line 157 of file cl_player.qc.

158{
160 if (apply_error)
161 {
164 }
166
168
169#if 0
170 // we don't need this
171 // darkplaces makes servercommandframe == 0 in these cases anyway
172 if (STAT(HEALTH) <= 0)
173 {
175 getinputstate(csqcplayer_moveframe-1);
176 LOG_INFO("the Weird code path got hit");
177 return;
178 }
179#endif
180
181 if (csqcplayer_moveframe >= endframe)
182 {
183 getinputstate(csqcplayer_moveframe - 1);
184 }
185 else
186 {
187 do
188 {
189 if (!getinputstate(csqcplayer_moveframe)) break;
190 /*if (input_timelength > 0.0005)
191 {
192 if (input_timelength > 0.05)
193 {
194 input_timelength /= 2;
195 CSQCPlayer_Physics(this);
196 }
197 CSQCPlayer_Physics(this);
198 }*/
199 CSQCPlayer_Physics(this);
202 }
203 while (csqcplayer_moveframe < endframe);
204 }
205
206 // add in anything that was applied after (for low packet rate protocols)
208}
vector CSQCPlayer_GetPredictionErrorO()
Definition cl_player.qc:44
void CSQCPlayer_Physics(entity this)
Definition cl_player.qc:131
float csqcplayer_moveframe
Definition cl_player.qc:38
void CSQCPlayer_Unpredict(entity this)
Definition cl_player.qc:89
vector CSQCPlayer_GetPredictionErrorV()
Definition cl_player.qc:50
void CSQCPlayer_SetMinsMaxs(entity this)
Definition cl_player.qc:99
const int CSQCPLAYERSTATUS_PREDICTED
Definition cl_player.qh:30
float clientcommandframe
#define STAT(...)
Definition stats.qh:82
#define LOG_INFO(...)
Definition log.qh:65

References clientcommandframe, CSQCPlayer_GetPredictionErrorO(), CSQCPlayer_GetPredictionErrorV(), csqcplayer_moveframe, CSQCPlayer_Physics(), CSQCPlayer_SetMinsMaxs(), csqcplayer_status, CSQCPlayer_Unpredict(), CSQCPLAYERSTATUS_PREDICTED, entity(), input_angles, LOG_INFO, origin, STAT, velocity, and view_angles.

Referenced by CSQCPlayer_SetCamera().

◆ CSQCPlayer_PreUpdate()

bool CSQCPlayer_PreUpdate ( entity this)

Definition at line 673 of file cl_player.qc.

674{
675 if (this != csqcplayer) return false;
677 return true;
678}

References csqcplayer, csqcplayer_status, CSQCPlayer_Unpredict(), CSQCPLAYERSTATUS_FROMSERVER, and entity().

Referenced by NET_HANDLE().

◆ CSQCPlayer_Remove()

void CSQCPlayer_Remove ( entity this)

Definition at line 667 of file cl_player.qc.

668{
670 cvar_settemp("cl_movement_replay", "1");
671}

References csqcplayer, cvar_settemp(), entity(), and NULL.

Referenced by CSQCPlayer_PostUpdate().

◆ CSQCPlayer_SavePrediction()

void CSQCPlayer_SavePrediction ( entity this)

Definition at line 120 of file cl_player.qc.

121{
122 player_pmflags = this.flags;
127}
float csqcplayer_sequence
Definition cl_player.qc:36
vector csqcplayer_origin
Definition cl_player.qc:35
int player_pmflags
Definition cl_player.qc:37
vector csqcplayer_velocity
Definition cl_player.qc:35
float flags
float servercommandframe

References csqcplayer_origin, csqcplayer_sequence, csqcplayer_status, csqcplayer_velocity, CSQCPLAYERSTATUS_PREDICTED, entity(), flags, origin, player_pmflags, servercommandframe, and velocity.

Referenced by CSQCPlayer_SetCamera().

◆ CSQCPlayer_SetCamera()

void CSQCPlayer_SetCamera ( )

Called once per CSQC_UpdateView()

Definition at line 573 of file cl_player.qc.

574{
575 vector v0 = ((intermission && !autocvar_cl_movement_intermissionrunning) ? '0 0 0' : pmove_vel); // TRICK: pmove_vel is set by the engine when we get here. No need to network velocity
576 float vh = PHYS_VIEWHEIGHT(NULL);
577 vector pl_viewofs = PHYS_PL_VIEWOFS(NULL);
578 vector pl_viewofs_crouch = PHYS_PL_CROUCH_VIEWOFS(NULL);
579 entity e = csqcplayer;
580 if (e)
581 {
582 if (servercommandframe == 0 || clientcommandframe == 0)
583 {
585 e.view_ofs = '0 0 1' * vh;
586
587 // get crouch state from the server
588 if (vh == pl_viewofs.z) e.flags &= ~FL_DUCKED;
589 else if (vh == pl_viewofs_crouch.z) e.flags |= FL_DUCKED;
590
591 // get onground state from the server
592 e.flags = BITSET(e.flags, FL_ONGROUND, pmove_onground);
593
595
596 // override it back just in case
597 e.view_ofs = '0 0 1' * vh;
598
599 // set velocity
600 e.velocity = v0;
601 }
602 else
603 {
604 int flg = e.iflags; e.iflags &= ~(IFLAG_ORIGIN | IFLAG_ANGLES);
606 e.iflags = flg;
607
609 {
610 vector o = e.origin;
613 CSQCPlayer_SetPredictionError(e.origin - o, e.velocity - v0, pmove_onground - IS_ONGROUND(e));
614 e.origin = o;
615 e.velocity = v0;
616
617 // get crouch state from the server
618 if (vh == pl_viewofs.z) e.flags &= ~FL_DUCKED;
619 else if(vh == pl_viewofs_crouch.z) e.flags |= FL_DUCKED;
620
621 // get onground state from the server
622 e.flags = BITSET(e.flags, FL_ONGROUND, pmove_onground);
623
625 }
627
628#ifdef CSQCMODEL_SERVERSIDE_CROUCH
629 // get crouch state from the server (LAG)
630 if (vh == pl_viewofs.z) e.flags &= ~FL_DUCKED;
631 else if (vh == pl_viewofs_crouch.z) e.flags |= FL_DUCKED;
632#endif
634
635 if (!IS_DEAD(e))
636 e.angles.y = input_angles.y;
637 }
638
639 // relink
640 e.stairsmooth_drawtime = drawtime; // since drawtime is a frame old at this point, copy it now to avoid using a drawtime 2 frames old!
641 e.origin = CSQCModel_ApplyStairSmoothing(e, (e.pmove_flags & PMF_ONGROUND), e.origin);
642 setorigin(e, e.origin);
643 }
644
646 if (view)
647 {
648 if (view != csqcplayer)
649 {
651 view.view_ofs = '0 0 1' * vh;
652 }
654 }
655 else
656 {
657 // FIXME by CSQC spec we have to do this:
658 // but it breaks chase cam
659 /*
660 setproperty(VF_ORIGIN, pmove_org + '0 0 1' * vh);
661 setproperty(VF_ANGLES, view_angles);
662 */
663 }
665}
#define BITSET(var, mask, flag)
Definition bits.qh:11
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float pmove_onground
Definition cl_player.qc:33
void CSQCPlayer_SetPredictionError(vector o, vector v, float onground_diff)
Definition cl_player.qc:56
bool autocvar_cl_movement_intermissionrunning
Definition cl_player.qc:30
vector CSQCModel_ApplyStairSmoothing(entity this, bool isonground, vector v)
Definition cl_player.qc:248
void CSQCPlayer_CalcRefdef(entity this)
Definition cl_player.qc:530
void CSQCPlayer_PredictTo(entity this, float endframe, bool apply_error)
Definition cl_player.qc:157
void CSQCPlayer_SavePrediction(entity this)
Definition cl_player.qc:120
#define PHYS_PL_CROUCH_VIEWOFS(s)
Definition player.qh:89
#define IS_DEAD(s)
Definition player.qh:245
#define PHYS_PL_VIEWOFS(s)
Definition player.qh:88
#define PHYS_VIEWHEIGHT(s)
Definition player.qh:91
const int FL_ONGROUND
Definition constants.qh:78
const int FL_DUCKED
Definition constants.qh:89
vector pmove_vel
float player_localentnum
#define CSQCPLAYER_HOOK_POSTCAMERASETUP()
entity CSQCModel_server2csqc(int i)
Definition cl_model.qc:314
void InterpolateOrigin_Do(entity this)
set origin based on iorigin1 (old pos), iorigin2 (desired pos), and time
const int IFLAG_ANGLES
const int IFLAG_ORIGIN

References autocvar_cl_movement_intermissionrunning, BITSET, clientcommandframe, CSQCModel_ApplyStairSmoothing(), CSQCModel_server2csqc(), csqcplayer, CSQCPlayer_CalcRefdef(), CSQCPLAYER_HOOK_POSTCAMERASETUP, CSQCPlayer_PredictTo(), CSQCPlayer_SavePrediction(), CSQCPlayer_SetMinsMaxs(), CSQCPlayer_SetPredictionError(), csqcplayer_status, CSQCPLAYERSTATUS_FROMSERVER, CSQCPLAYERSTATUS_PREDICTED, drawtime, entity(), FL_DUCKED, FL_ONGROUND, IFLAG_ANGLES, IFLAG_ORIGIN, input_angles, intermission, InterpolateOrigin_Do(), IS_DEAD, IS_ONGROUND, NULL, PHYS_PL_CROUCH_VIEWOFS, PHYS_PL_VIEWOFS, PHYS_VIEWHEIGHT, player_localentnum, PMF_ONGROUND, pmove_onground, pmove_vel, servercommandframe, and vector.

Referenced by CSQC_UpdateView().

◆ CSQCPlayer_SetMinsMaxs()

void CSQCPlayer_SetMinsMaxs ( entity this)

Definition at line 99 of file cl_player.qc.

100{
101 if (IS_DUCKED(this) || !(this.isplayermodel & ISPLAYER_PLAYER))
102 {
103 this.mins = PHYS_PL_CROUCH_MIN(this);
104 this.maxs = PHYS_PL_CROUCH_MAX(this);
105 this.view_ofs = PHYS_PL_CROUCH_VIEWOFS(this);
106 }
107 else
108 {
109 this.mins = PHYS_PL_MIN(this);
110 this.maxs = PHYS_PL_MAX(this);
111 if(IS_DEAD(this))
112 {
113 float h = ceil((this.mins.z + this.maxs.z) * PL_CORPSE_SCALE * 10) / 10;
114 this.maxs.z = max(h, this.mins.z + 1);
115 }
116 this.view_ofs = PHYS_PL_VIEWOFS(this);
117 }
118}
#define PHYS_PL_CROUCH_MAX(s)
Definition player.qh:85
#define PHYS_PL_MIN(s)
Definition player.qh:84
#define PHYS_PL_CROUCH_MIN(s)
Definition player.qh:86
#define PHYS_PL_MAX(s)
Definition player.qh:83
const float PL_CORPSE_SCALE
Definition constants.qh:60
vector mins
vector maxs
float ceil(float f)

References ceil(), entity(), IS_DEAD, IS_DUCKED, ISPLAYER_PLAYER, isplayermodel, max(), maxs, mins, PHYS_PL_CROUCH_MAX, PHYS_PL_CROUCH_MIN, PHYS_PL_CROUCH_VIEWOFS, PHYS_PL_MAX, PHYS_PL_MIN, PHYS_PL_VIEWOFS, PL_CORPSE_SCALE, and view_ofs.

Referenced by CSQCPlayer_PredictTo(), and CSQCPlayer_SetCamera().

◆ CSQCPlayer_SetPredictionError()

void CSQCPlayer_SetPredictionError ( vector o,
vector v,
float onground_diff )

Definition at line 56 of file cl_player.qc.

57{
58 // error too big to compensate, we LIKELY hit a teleport or a
59 // jumppad, or it's a jump time disagreement that'll get fixed
60 // next frame
61
62 // FIXME we sometimes have disagreement in order of jump velocity. Do not act on them!
63 /*
64 // commented out as this one did not help
65 if(onground_diff)
66 {
67 printf("ONGROUND MISMATCH: %d x=%v v=%v\n", onground_diff, o, v);
68 return;
69 }
70 */
71 if(vdist(o, >, 32) || vdist(v, >, 192))
72 {
73 //printf("TOO BIG: x=%v v=%v\n", o, v);
74 return;
75 }
76
78 {
80 return;
81 }
82
87}
float autocvar_cl_movement_errorcompensation
Definition cl_player.qc:29
float ticrate
Definition main.qh:209
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
Definition vector.qh:8

References autocvar_cl_movement_errorcompensation, CSQCPlayer_GetPredictionErrorO(), CSQCPlayer_GetPredictionErrorV(), csqcplayer_predictionerrorfactor, csqcplayer_predictionerroro, csqcplayer_predictionerrortime, csqcplayer_predictionerrorv, ticrate, time, vdist, and vector.

Referenced by CSQCPlayer_SetCamera().

◆ CSQCPlayer_Unpredict()

void CSQCPlayer_Unpredict ( entity this)

Definition at line 89 of file cl_player.qc.

90{
92 if (csqcplayer_status != CSQCPLAYERSTATUS_PREDICTED) LOG_FATALF("Cannot unpredict in current status (%d)", csqcplayer_status);
95 csqcplayer_moveframe = csqcplayer_sequence + 1; // + 1 because the recieved frame has the move already done (server side)
96 this.flags = player_pmflags;
97}
const int CSQCPLAYERSTATUS_UNPREDICTED
Definition cl_player.qh:28
#define LOG_FATALF(...)
Definition log.qh:54

References csqcplayer_moveframe, csqcplayer_origin, csqcplayer_sequence, csqcplayer_status, csqcplayer_velocity, CSQCPLAYERSTATUS_PREDICTED, CSQCPLAYERSTATUS_UNPREDICTED, entity(), flags, LOG_FATALF, origin, player_pmflags, and velocity.

Referenced by CSQCPlayer_PredictTo(), and CSQCPlayer_PreUpdate().

Variable Documentation

◆ autocvar_chase_back

float autocvar_chase_back

Definition at line 442 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyChase().

◆ autocvar_chase_overhead

bool autocvar_chase_overhead

Definition at line 444 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyChase().

◆ autocvar_chase_pitchangle

float autocvar_chase_pitchangle

Definition at line 445 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyChase().

◆ autocvar_chase_up

float autocvar_chase_up

Definition at line 443 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyChase().

◆ autocvar_cl_bob

float autocvar_cl_bob = 0

Definition at line 299 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bob2

float autocvar_cl_bob2 = 0

Definition at line 308 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bob2cycle

float autocvar_cl_bob2cycle = 1

Definition at line 309 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bob2smooth

float autocvar_cl_bob2smooth = 0.05

Definition at line 310 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bob_limit

float autocvar_cl_bob_limit = 7

Definition at line 301 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bob_limit_heightcheck

float autocvar_cl_bob_limit_heightcheck = 0

Definition at line 302 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bob_velocity_limit

float autocvar_cl_bob_velocity_limit = 400

Definition at line 303 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bobcycle

float autocvar_cl_bobcycle = 0.5

Definition at line 300 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bobfall

float autocvar_cl_bobfall = 0.05

Definition at line 305 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bobfallcycle

float autocvar_cl_bobfallcycle = 3

Definition at line 306 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bobfallminspeed

float autocvar_cl_bobfallminspeed = 200

Definition at line 307 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_bobup

float autocvar_cl_bobup = 0.5

Definition at line 304 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ autocvar_cl_movement_errorcompensation

float autocvar_cl_movement_errorcompensation = 0

Definition at line 29 of file cl_player.qc.

Referenced by CSQCPlayer_SetPredictionError().

◆ autocvar_cl_movement_intermissionrunning

bool autocvar_cl_movement_intermissionrunning = false

Definition at line 30 of file cl_player.qc.

Referenced by CSQCPlayer_SetCamera().

◆ autocvar_cl_rollangle

float autocvar_cl_rollangle

Definition at line 423 of file cl_player.qc.

Referenced by CSQCPlayer_CalcRoll().

◆ autocvar_cl_rollspeed

float autocvar_cl_rollspeed

Definition at line 424 of file cl_player.qc.

Referenced by CSQCPlayer_CalcRoll().

◆ autocvar_cl_smoothviewheight

float autocvar_cl_smoothviewheight = 0.05

Definition at line 217 of file cl_player.qc.

Referenced by CSQCPlayer_ApplySmoothing().

◆ autocvar_cl_stairsmoothspeed

float autocvar_cl_stairsmoothspeed = 200

Definition at line 216 of file cl_player.qc.

Referenced by CSQCModel_ApplyStairSmoothing(), and CSQCPlayer_ApplySmoothing().

◆ autocvar_v_deathtilt

bool autocvar_v_deathtilt

Definition at line 269 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyDeathTilt().

◆ autocvar_v_deathtiltangle

float autocvar_v_deathtiltangle

Definition at line 270 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyDeathTilt().

◆ autocvar_v_idlescale

float autocvar_v_idlescale

Definition at line 282 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyIdleScaling().

◆ autocvar_v_ipitch_cycle

float autocvar_v_ipitch_cycle

Definition at line 283 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyIdleScaling().

◆ autocvar_v_ipitch_level

float autocvar_v_ipitch_level

Definition at line 286 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyIdleScaling().

◆ autocvar_v_iroll_cycle

float autocvar_v_iroll_cycle

Definition at line 285 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyIdleScaling().

◆ autocvar_v_iroll_level

float autocvar_v_iroll_level

Definition at line 288 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyIdleScaling().

◆ autocvar_v_iyaw_cycle

float autocvar_v_iyaw_cycle

Definition at line 284 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyIdleScaling().

◆ autocvar_v_iyaw_level

float autocvar_v_iyaw_level

Definition at line 287 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyIdleScaling().

◆ bob2_smooth

float bob2_smooth

Definition at line 313 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ bobfall_speed

float bobfall_speed

Definition at line 312 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ bobfall_swing

float bobfall_swing

Definition at line 311 of file cl_player.qc.

Referenced by CSQCPlayer_ApplyBobbing().

◆ csqcplayer_moveframe

float csqcplayer_moveframe

Definition at line 38 of file cl_player.qc.

Referenced by CSQCPlayer_PredictTo(), and CSQCPlayer_Unpredict().

◆ csqcplayer_origin

vector csqcplayer_origin

Definition at line 35 of file cl_player.qc.

Referenced by CSQCPlayer_SavePrediction(), and CSQCPlayer_Unpredict().

◆ csqcplayer_predictionerrorfactor

float csqcplayer_predictionerrorfactor

◆ csqcplayer_predictionerroro

vector csqcplayer_predictionerroro

Definition at line 39 of file cl_player.qc.

Referenced by CSQCPlayer_GetPredictionErrorO(), and CSQCPlayer_SetPredictionError().

◆ csqcplayer_predictionerrortime

float csqcplayer_predictionerrortime

◆ csqcplayer_predictionerrorv

vector csqcplayer_predictionerrorv

Definition at line 40 of file cl_player.qc.

Referenced by CSQCPlayer_GetPredictionErrorV(), and CSQCPlayer_SetPredictionError().

◆ csqcplayer_sequence

float csqcplayer_sequence

Definition at line 36 of file cl_player.qc.

Referenced by CSQCPlayer_SavePrediction(), and CSQCPlayer_Unpredict().

◆ csqcplayer_velocity

vector csqcplayer_velocity

Definition at line 35 of file cl_player.qc.

Referenced by CSQCPlayer_SavePrediction(), and CSQCPlayer_Unpredict().

◆ player_pmflags

int player_pmflags

Definition at line 37 of file cl_player.qc.

Referenced by CSQCPlayer_SavePrediction(), and CSQCPlayer_Unpredict().

◆ pmove_onground

float pmove_onground

Definition at line 33 of file cl_player.qc.

Referenced by CSQCPlayer_SetCamera().

◆ smooth_prevtime

float smooth_prevtime

Definition at line 218 of file cl_player.qc.

Referenced by CSQCPlayer_ApplySmoothing().

◆ stairsmooth_drawtime

float stairsmooth_drawtime

Definition at line 247 of file cl_player.qc.

Referenced by CSQCModel_ApplyStairSmoothing().

◆ stairsmooth_offset

float stairsmooth_offset

Definition at line 245 of file cl_player.qc.

Referenced by CSQCModel_ApplyStairSmoothing().

◆ stairsmooth_prevtime

float stairsmooth_prevtime

Definition at line 246 of file cl_player.qc.

Referenced by CSQCModel_ApplyStairSmoothing().

◆ stairsmoothz

float stairsmoothz

Definition at line 215 of file cl_player.qc.

Referenced by CSQCPlayer_ApplySmoothing().

◆ viewheightavg

float viewheightavg

Definition at line 219 of file cl_player.qc.

Referenced by CSQCPlayer_ApplySmoothing().