Skip to content

Commit

Permalink
Core/Vehicles: Treat entering other vehicles mounted on main vehicle …
Browse files Browse the repository at this point in the history
…as swapping seats
  • Loading branch information
Shauren committed Dec 28, 2020
1 parent 2e4609f commit 110564e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/game/Spells/Auras/SpellAuraEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3023,7 +3023,10 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m
caster->ToCreature()->DespawnOrUnsummon();
}

if (!(mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT))
bool seatChange = (mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT) // Seat change on the same direct vehicle
|| target->HasAuraType(SPELL_AURA_CONTROL_VEHICLE); // Seat change to a proxy vehicle (for example turret mounted on a siege engine)

if (!seatChange)
caster->_ExitVehicle();
else
target->GetVehicleKit()->RemovePassenger(caster); // Only remove passenger from vehicle without launching exit movement or despawning the vehicle
Expand Down

0 comments on commit 110564e

Please sign in to comment.