feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)

i.e. world update start
This commit is contained in:
Viste(Кирилл) 2019-02-14 21:22:17 +03:00 committed by Francesco Borzì
parent 1b7522ff0e
commit 51b8773528
108 changed files with 933 additions and 509 deletions

View file

@ -9,6 +9,7 @@
#include "ObjectMgr.h"
#include "World.h"
#include "Transport.h"
#include "GameTime.h"
//Flightmaster grid preloading
#include "MapManager.h"
//Creature-specific headers
@ -317,7 +318,7 @@ void FlightPathMovementGenerator::DoFinalize(Player* player)
// this prevent cheating with landing point at lags
// when client side flight end early in comparison server side
player->StopMoving();
player->SetFallInformation(time(NULL), player->GetPositionZ());
player->SetFallInformation(GameTime::GetGameTime(), player->GetPositionZ());
}
player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK);
@ -406,7 +407,7 @@ bool FlightPathMovementGenerator::DoUpdate(Player* player, uint32 /*diff*/)
if (i_currentNode >= i_path.size() - 1)
{
player->CleanupAfterTaxiFlight();
player->SetFallInformation(time(NULL), player->GetPositionZ());
player->SetFallInformation(GameTime::GetGameTime(), player->GetPositionZ());
if (player->pvpInfo.IsHostile)
player->CastSpell(player, 2479, true);