105 if (!Estimates(packetTime, curTime)) {
108 this->lastPacketPos = pos;
109 this->lastPacketTime = packetTime;
110 this->ReadValue(curTime, this->snapPos);
111 this->aimTime = curTime + this->updateTime;
112 float dt = (float)(this->aimTime - packetTime);
113 this->snapTime = curTime;
114 this->aimPos = pos + vel * dt;
128 float dt = (float)(1.0 / (this->aimTime - this->snapTime));
129 this->snapVel = (this->aimPos - this->snapPos) * dt;
151 this->lastPacketTime = packetTime;
152 this->lastPacketPos = pos;
153 this->snapTime = curTime;
155 this->updateTime = curTime - packetTime;
156 this->latency = this->updateTime;
157 this->aimTime = curTime + this->updateTime;
159 this->aimPos = this->snapPos + this->snapVel * (float)this->updateTime;
181 if (forTime < this->snapTime)
183 forTime = this->snapTime;
188 Timing::Time maxRange = this->aimTime + this->updateTime;
189 if (forTime > maxRange)
196 oVel = this->snapVel;
197 oPos = this->snapPos + oVel * (float)(forTime - this->snapTime);
226 if (packet <= this->lastPacketTime)
236 if (lat < 0) lat = 0;
237 if (lat > this->latency)
239 this->latency = (this->latency + lat) * 0.5;
243 this->latency = (this->latency * 7 + lat) * 0.125;
250 if (tick > this->updateTime)
252 this->updateTime = (this->updateTime + tick) * 0.5;
256 this->updateTime = (this->updateTime * 7 + tick) * 0.125;