Skip to content

Commit b5fa888

Browse files
committed
saferish
1 parent 7b811e8 commit b5fa888

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/server/game/Entities/Unit/Unit.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12694,6 +12694,9 @@ void Unit::_ExitVehicle(Position const* exitPosition)
1269412694
SetControlled(false, UNIT_STATE_ROOT); // SMSG_MOVE_FORCE_UNROOT, ~MOVEMENTFLAG_ROOT
1269512695

1269612696
AddUnitState(UNIT_STATE_MOVE);
12697+
bool wasEvading = HasUnitState(UNIT_STATE_EVADE);
12698+
if (wasEvading)
12699+
ClearUnitState(UNIT_STATE_EVADE);
1269712700

1269812701
if (player)
1269912702
player->SetFallInformation(0, GetPositionZ());
@@ -12754,10 +12757,9 @@ void Unit::_ExitVehicle(Position const* exitPosition)
1275412757
else
1275512758
ToTempSummon()->UnSummon(2000); // Approximation
1275612759
}
12757-
else if (HasUnitState(UNIT_STATE_EVADE) && GetTypeId() == TYPEID_UNIT)
12760+
else if (wasEvading && GetTypeId() == TYPEID_UNIT)
1275812761
{
1275912762
Creature* toCreature = ToCreature();
12760-
toCreature->ClearUnitState(UNIT_STATE_EVADE);
1276112763
toCreature->SetSpawnHealth();
1276212764
toCreature->LoadCreaturesAddon();
1276312765
if (toCreature->IsVehicle())

0 commit comments

Comments
 (0)