mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-31 06:07:37 +01:00
Revert "Core/Movement: Fix a crash on login"
This reverts commit 9941b4c2ed.
This commit is contained in:
@@ -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]()
|
||||
{
|
||||
|
||||
@@ -218,7 +218,6 @@ class TC_GAME_API MotionMaster
|
||||
MotionMasterUnitStatesContainer _baseUnitStatesMap;
|
||||
std::deque<DelayedAction> _delayedActions;
|
||||
uint8 _flags;
|
||||
bool _defaultInitialized;
|
||||
};
|
||||
|
||||
#endif // MOTIONMASTER_H
|
||||
|
||||
Reference in New Issue
Block a user