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

This reverts commit 51b8773528.
This commit is contained in:
Nefertumm
2019-02-15 15:14:49 -03:00
committed by GitHub
parent 23e7ae6a2f
commit c15206fc15
108 changed files with 509 additions and 933 deletions

View File

@@ -13,7 +13,6 @@
#include "MoveSplineInit.h"
#include "MoveSpline.h"
#include "Player.h"
#include "GameTime.h"
#include "Spell.h"
#include "BattlegroundRV.h"
#include "VehicleDefines.h"
@@ -67,7 +66,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T* owner, bool ini
if (useMMaps && !inRange && (!isPlayerPet || i_target->GetPositionZ()-z > 50.0f))
{
//useMMaps = false;
owner->m_targetsNotAcceptable[i_target->GetGUID()] = MMapTargetData(GameTime::GetGameTime()+DISALLOW_TIME_AFTER_FAIL, owner, i_target.getTarget());
owner->m_targetsNotAcceptable[i_target->GetGUID()] = MMapTargetData(sWorld->GetGameTime()+DISALLOW_TIME_AFTER_FAIL, owner, i_target.getTarget());
return;
}
@@ -175,7 +174,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T* owner, bool ini
}
}
if (!forceDest && getMSTimeDiff(lastPathingFailMSTime, GameTime::GetGameTimeMS()) < 1000)
if (!forceDest && getMSTimeDiff(lastPathingFailMSTime, World::GetGameTimeMS()) < 1000)
{
lastOwnerXYZ.Relocate(-5000.0f, -5000.0f, -5000.0f);
return;
@@ -187,8 +186,8 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T* owner, bool ini
float maxDist = MELEE_RANGE + owner->GetMeleeReach() + i_target->GetMeleeReach();
if (!forceDest && (i_path->GetPathType() & PATHFIND_NOPATH || (!i_offset && !isPlayerPet && i_target->GetExactDistSq(i_path->GetActualEndPosition().x, i_path->GetActualEndPosition().y, i_path->GetActualEndPosition().z) > maxDist*maxDist)))
{
lastPathingFailMSTime = GameTime::GetGameTimeMS();
owner->m_targetsNotAcceptable[i_target->GetGUID()] = MMapTargetData(GameTime::GetGameTime()+DISALLOW_TIME_AFTER_FAIL, owner, i_target.getTarget());
lastPathingFailMSTime = World::GetGameTimeMS();
owner->m_targetsNotAcceptable[i_target->GetGUID()] = MMapTargetData(sWorld->GetGameTime()+DISALLOW_TIME_AFTER_FAIL, owner, i_target.getTarget());
return;
}
else

View File

@@ -9,7 +9,6 @@
#include "ObjectMgr.h"
#include "World.h"
#include "Transport.h"
#include "GameTime.h"
//Flightmaster grid preloading
#include "MapManager.h"
//Creature-specific headers
@@ -318,7 +317,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(GameTime::GetGameTime(), player->GetPositionZ());
player->SetFallInformation(time(NULL), player->GetPositionZ());
}
player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK);
@@ -407,7 +406,7 @@ bool FlightPathMovementGenerator::DoUpdate(Player* player, uint32 /*diff*/)
if (i_currentNode >= i_path.size() - 1)
{
player->CleanupAfterTaxiFlight();
player->SetFallInformation(GameTime::GetGameTime(), player->GetPositionZ());
player->SetFallInformation(time(NULL), player->GetPositionZ());
if (player->pvpInfo.IsHostile)
player->CastSpell(player, 2479, true);