fix: pingfaker overwrites pings for real players (resolves #572)
fix: crash bug introduced in #569
This commit is contained in:
parent
747eb569c1
commit
ee964e0c9a
14 changed files with 322 additions and 188 deletions
|
|
@ -90,6 +90,9 @@ void Game::levelInitialize (edict_t *entities, int max) {
|
|||
// set the global timer function
|
||||
timerStorage.setTimeAddress (&globals->time);
|
||||
|
||||
// reset timer
|
||||
fakeping.restartTimer ();
|
||||
|
||||
// go thru the all entities on map, and do whatever we're want
|
||||
for (int i = 0; i < max; ++i) {
|
||||
auto ent = entities + i;
|
||||
|
|
@ -1007,9 +1010,6 @@ void Game::slowFrame () {
|
|||
// refresh bomb origin in case some plugin moved it out
|
||||
graph.setBombOrigin ();
|
||||
|
||||
// update client pings
|
||||
util.calculatePings ();
|
||||
|
||||
// update next update time
|
||||
m_halfSecondFrame = nextUpdate * 0.25f + time ();
|
||||
}
|
||||
|
|
@ -1049,6 +1049,9 @@ void Game::slowFrame () {
|
|||
// refresh bot infection (creature) status
|
||||
bots.refreshCreatureStatus ();
|
||||
|
||||
// update client pings
|
||||
fakeping.calculate ();
|
||||
|
||||
// update next update time
|
||||
m_oneSecondFrame = nextUpdate + time ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue