if(vlen(o) > 32 || vlen(v) > 128)
return;
- csqcplayer_predictionerrorfactor = autocvar_cl_predictionerrorcompensation / ticrate;
csqcplayer_predictionerroro = CSQCPlayer_GetPredictionErrorO() + o;
csqcplayer_predictionerrorv = CSQCPlayer_GetPredictionErrorV() + v;
+ csqcplayer_predictionerrorfactor = autocvar_cl_predictionerrorcompensation / ticrate;
csqcplayer_predictionerrortime = time + 1.0 / csqcplayer_predictionerrorfactor;
}
CSQCPlayer_Unpredict();
if(apply_error)
{
- self.origin -= CSQCPlayer_GetPredictionErrorO();
- self.velocity -= CSQCPlayer_GetPredictionErrorV();
+ self.origin += CSQCPlayer_GetPredictionErrorO();
+ self.velocity += CSQCPlayer_GetPredictionErrorV();
}
CSQCPlayer_SetMinsMaxs();
v = v0;
csqcplayer_status = CSQCPLAYERSTATUS_PREDICTED;
CSQCPlayer_PredictTo(servercommandframe + 1, FALSE);
- CSQCPlayer_SetPredictionError(o - self.origin, v0 - self.velocity);
+ CSQCPlayer_SetPredictionError(self.origin - o, self.velocity - v);
self.origin = o;
self.velocity = v;