Rooted vehicle movement (#13342 for example)

Corrects issue where certain combinations of actions would cause vehicles (usually cannons/artillary) that should be rooted, to be fully movable
This commit is contained in:
pete318 committed 2015-10-06 22:05:11 +02:00
1 parent 5d2cee1c2e
commit cdb16c5181
4 files changed
+37 -4

No files matched your search

+6
View File
@@ -16975,6 +16975,12 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
}
}
// If vehicle flag for fixed position set (cannons), or if the following hardcoded units, then set state rooted
// 30236 | Argent Cannon
// 39759 | Tankbuster Cannon
if ((vehicle->GetVehicleInfo()->m_flags & VEHICLE_FLAG_FIXED_POSITION) || vehicle->GetBase()->GetEntry() == 30236 || vehicle->GetBase()->GetEntry() == 39759)
SetControlled(true, UNIT_STATE_ROOT);
ASSERT(!m_vehicle);
(void)vehicle->AddPassenger(this, seatId);
}