Skip to content

Commit 0396e4a

Browse files
committedApr 10, 2020
Fix compile
whoops
1 parent 1492548 commit 0396e4a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎codemp/cgame/cg_draw.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -11513,28 +11513,28 @@ static void CG_DrawShowPos(void)
1151311513
static void CG_MovementKeys(centity_t *cent)
1151411514
{
1151511515
usercmd_t cmd = { 0 };
11516+
playerState_t *ps = NULL;
1151611517
int moveDir;
1151711518
float w, h, x, y, xOffset, yOffset;
1151811519

1151911520
if (!cg.snap)
1152011521
return;
1152111522

11522-
moveDir = cg.snap->ps.movementDir;
11523-
11524-
//if (!pm)
11525-
//return;//idk
11523+
ps = &cg.predictedPlayerState; //&cg.snap->ps;
11524+
moveDir = ps->movementDir;
1152611525

11527-
if (cg.clientNum == cg.predictedPlayerState.clientNum && !cg.demoPlayback)
11526+
if (cg.clientNum == cg.predictedPlayerState.clientNum && !cg.demoPlayback) {
1152811527
trap->GetUserCmd( trap->GetCurrentCmdNumber(), &cmd );
11528+
}
1152911529
else
1153011530
{
11531-
float xyspeed = sqrtf( cg.snap->ps.velocity[0]*cg.snap->ps.velocity[0] + cg.snap->ps.velocity[1]*cg.snap->ps.velocity[1] );
11532-
float zspeed = cg.snap->ps.velocity[2];
11531+
float xyspeed = sqrtf( ps->velocity[0] * ps->velocity[0] + ps->velocity[1] * ps->velocity[1] );
11532+
float zspeed = ps->velocity[2];
1153311533
static float lastZSpeed = 0.0f;
1153411534

1153511535
if ((PM_GroundDistance2() > 1 && zspeed > 8 && zspeed > lastZSpeed && !cg.snap->ps.fd.forceGripCripple) || (cg.snap->ps.pm_flags & PMF_JUMP_HELD))
1153611536
cmd.upmove = 1;
11537-
else if ( (cg.snap->ps.pm_flags & PMF_DUCKED) || CG_InRollAnim(cent) )
11537+
else if ( (ps->pm_flags & PMF_DUCKED) || CG_InRollAnim(cent) )
1153811538
cmd.upmove = -1;
1153911539

1154011540
if ( xyspeed < 9 )

0 commit comments

Comments
 (0)
Please sign in to comment.