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:
@@ -16423,7 +16423,7 @@ bool Unit::CheckPlayerCondition(Player* pPlayer)
|
||||
|
||||
void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const * aurApp)
|
||||
{
|
||||
if (!isAlive() || GetVehicleKit() == vehicle)
|
||||
if (!isAlive() || GetVehicleKit() == vehicle || vehicle->GetBase()->IsOnVehicle(this))
|
||||
return;
|
||||
|
||||
if (m_vehicle)
|
||||
|
||||
Reference in New Issue
Block a user