X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fcsqcmodel%2Fcl_player.qc;h=268b591264208458dcada567c028fbdf102be052;hb=7e5268799e95d0dd6f2b77ed4e097b0adc755f2b;hp=225c7307ded6c60a192056eafde3078912c4ae52;hpb=98b2c4213abe04f3ec96a95471ba5fe5fe57e008;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index 225c7307d..268b59126 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -210,11 +210,11 @@ bool CSQCPlayer_IsLocalPlayer(entity this) /** Called once per CSQC_UpdateView() */ void CSQCPlayer_SetCamera() { - const 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 - const float vh = PHYS_VIEWHEIGHT(NULL); - const vector pl_viewofs = PHYS_PL_VIEWOFS(NULL); - const vector pl_viewofs_crouch = PHYS_PL_CROUCH_VIEWOFS(NULL); - const entity e = csqcplayer; + 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 + float vh = PHYS_VIEWHEIGHT(NULL); + vector pl_viewofs = PHYS_PL_VIEWOFS(NULL); + vector pl_viewofs_crouch = PHYS_PL_CROUCH_VIEWOFS(NULL); + entity e = csqcplayer; if (e) { if (servercommandframe == 0 || clientcommandframe == 0) @@ -239,13 +239,13 @@ void CSQCPlayer_SetCamera() } else { - const int flg = e.iflags; e.iflags &= ~(IFLAG_ORIGIN | IFLAG_ANGLES); + int flg = e.iflags; e.iflags &= ~(IFLAG_ORIGIN | IFLAG_ANGLES); InterpolateOrigin_Do(e); e.iflags = flg; if (csqcplayer_status == CSQCPLAYERSTATUS_FROMSERVER) { - const vector o = e.origin; + vector o = e.origin; csqcplayer_status = CSQCPLAYERSTATUS_PREDICTED; CSQCPlayer_PredictTo(e, servercommandframe + 1, false); CSQCPlayer_SetPredictionError(e.origin - o, e.velocity - v0, pmove_onground - IS_ONGROUND(e)); @@ -291,7 +291,7 @@ void CSQCPlayer_SetCamera() // note: these two only work in WIP2, but are harmless in WIP1 if (PHYS_HEALTH(NULL) <= 0 && PHYS_HEALTH(NULL) != -666 && PHYS_HEALTH(NULL) != -2342) refdefflags |= REFDEFFLAG_DEAD; if (intermission) refdefflags |= REFDEFFLAG_INTERMISSION; - V_CalcRefdef(view, refdefflags); + V_CalcRefdef(view, refdefflags); // TODO? uses .health stat in the engine when this isn't called here, may be broken! } else {