Revert "Core/Movement: Fix a crash on login"

This reverts commit 9941b4c2ed.
This commit is contained in:
jackpoz
2019-10-20 12:25:14 +02:00
parent 9941b4c2ed
commit 84937337da
2 changed files with 2 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ bool MovementGeneratorComparator::operator()(MovementGenerator const* a, Movemen
MovementGeneratorInformation::MovementGeneratorInformation(MovementGeneratorType type, ObjectGuid targetGUID, std::string const& targetName) : Type(type), TargetGUID(targetGUID), TargetName(targetName) { }
MotionMaster::MotionMaster(Unit* unit) : _owner(unit), _defaultGenerator(nullptr), _flags(MOTIONMASTER_FLAG_NONE), _defaultInitialized(false) { }
MotionMaster::MotionMaster(Unit* unit) : _owner(unit), _defaultGenerator(nullptr), _flags(MOTIONMASTER_FLAG_NONE) { }
MotionMaster::~MotionMaster()
{
@@ -110,7 +110,6 @@ void MotionMaster::Initialize()
void MotionMaster::InitializeDefault()
{
_defaultInitialized = true;
Add(FactorySelector::SelectMovementGenerator(_owner), MOTION_SLOT_DEFAULT);
}
@@ -323,7 +322,7 @@ void MotionMaster::Add(MovementGenerator* movement, MovementSlot slot/* = MOTION
return;
}
if (HasFlag(MOTIONMASTER_FLAG_UPDATE) || !_defaultInitialized)
if (HasFlag(MOTIONMASTER_FLAG_UPDATE))
{
DelayedActionDefine action = [this, movement, slot]()
{

View File

@@ -218,7 +218,6 @@ class TC_GAME_API MotionMaster
MotionMasterUnitStatesContainer _baseUnitStatesMap;
std::deque<DelayedAction> _delayedActions;
uint8 _flags;
bool _defaultInitialized;
};
#endif // MOTIONMASTER_H