From ffca6ec384419fab9b9217fc39e922f47c5d65ba Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 27 May 2009 12:42:38 -0500 Subject: *Change vehicle faction the same as the driver's when driver enters it. *Fix 3593 sql. --HG-- branch : trunk --- src/game/Vehicle.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/game/Vehicle.cpp') diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp index bfc87011761..0bcdf088bc2 100644 --- a/src/game/Vehicle.cpp +++ b/src/game/Vehicle.cpp @@ -245,6 +245,7 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId) if(seat->first == 0 && seat->second.seatInfo->IsUsable()) // not right { + setFaction(unit->getFaction()); ((Player*)unit)->SetCharm(this, true); ((Player*)unit)->SetViewpoint(this, true); ((Player*)unit)->VehicleSpellInitialize(); @@ -289,6 +290,7 @@ void Vehicle::RemovePassenger(Unit *unit) if(unit->GetTypeId() == TYPEID_PLAYER && seat->first == 0 && seat->second.seatInfo->IsUsable()) { + RestoreFaction(); ((Player*)unit)->SetCharm(this, false); ((Player*)unit)->SetViewpoint(this, false); ((Player*)unit)->SendRemoveControlBar(); -- cgit v1.2.3