Add inverted math for special instances
This commit is contained in:
parent
d1a6f4e8df
commit
734832aef6
@ -546,7 +546,7 @@ std::pair<Vector, Vector> ProjectilePrediction_Engine(CachedEntity *ent, int hb,
|
||||
float rockettime = g_pLocalPlayer->v_Eye.DistTo(current) / speed;
|
||||
// Compensate for ping
|
||||
rockettime += g_IEngine->GetNetChannelInfo()->GetLatency(FLOW_OUTGOING) + cl_interp->GetFloat();
|
||||
float timedelta = fabs(currenttime - rockettime);
|
||||
float timedelta = fabs(currenttime > rockettime ? currenttime - rockettime : rockettime - currenttime);
|
||||
if (timedelta < mindelta)
|
||||
{
|
||||
besttime = currenttime;
|
||||
@ -650,7 +650,7 @@ std::pair<Vector, Vector> ProjectilePrediction(CachedEntity *ent, int hb, float
|
||||
float rockettime = g_pLocalPlayer->v_Eye.DistTo(current) / speed;
|
||||
// Compensate for ping
|
||||
rockettime += g_IEngine->GetNetChannelInfo()->GetLatency(FLOW_OUTGOING) + cl_interp->GetFloat();
|
||||
if (fabs(currenttime - rockettime) < mindelta)
|
||||
if (fabs(currenttime > rockettime ? currenttime - rockettime : rockettime - currenttime) < mindelta)
|
||||
{
|
||||
besttime = currenttime;
|
||||
bestpos = current;
|
||||
|
Reference in New Issue
Block a user