Core/Vehicles: Do not allow Unit A to enter vehicle of unit B, when unit B is already on vehicle of unit A.

Fixes a core deadlock and stack overflow as well as client crash in the event of improper scripts.
This commit is contained in:
Machiavelli
2011-02-23 17:41:33 +01:00
parent 4e9cd1e490
commit 550f59e05f
+1 -1
View File
@@ -16423,7 +16423,7 @@ bool Unit::CheckPlayerCondition(Player* pPlayer)
void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const * aurApp) void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const * aurApp)
{ {
if (!isAlive() || GetVehicleKit() == vehicle) if (!isAlive() || GetVehicleKit() == vehicle || vehicle->GetBase()->IsOnVehicle(this))
return; return;
if (m_vehicle) if (m_vehicle)