Skip to content

Commit

Permalink
Implement VEHICLE_FLAG_FIXED_POSITION
Browse files Browse the repository at this point in the history
Inspired from TrinityCore/TrinityCore@cdb16c5

Close unified-db/Database#79

(based on cmangos/mangos-wotlk@a4b04f4)

Signed-off-by: Xfurry <xfurry@cmangos.net>
  • Loading branch information
xfurry committed May 21, 2016
1 parent f2c03d5 commit 76108bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/DBCEnums.h
Expand Up @@ -585,7 +585,7 @@ enum VehicleFlags
VEHICLE_FLAG_UNK11 = 0x00040000,
VEHICLE_FLAG_UNK12 = 0x00080000,
VEHICLE_FLAG_UNK13 = 0x00100000,
VEHICLE_FLAG_UNK14 = 0x00200000,
VEHICLE_FLAG_FIXED_POSITION = 0x00200000, // Used for vehicles that have a fixed position, such as cannons
VEHICLE_FLAG_DISABLE_SWITCH = 0x00400000, // Can't change seats, VEHICLE_ID = 335 chopper
VEHICLE_FLAG_UNK15 = 0x00800000,
VEHICLE_FLAG_UNK16 = 0x01000000,
Expand Down
3 changes: 3 additions & 0 deletions src/game/Vehicle.cpp
Expand Up @@ -156,6 +156,9 @@ void VehicleInfo::Initialize()
if (vehicleFlags & VEHICLE_FLAG_FULLSPEEDPITCHING)
pVehicle->m_movementInfo.AddMovementFlags2(MOVEFLAG2_FULLSPEEDPITCHING);

if (vehicleFlags & VEHICLE_FLAG_FIXED_POSITION)
pVehicle->SetRoot(true);

// Initialize power type based on DBC values (creatures only)
if (pVehicle->GetTypeId() == TYPEID_UNIT)
{
Expand Down

0 comments on commit 76108bb

Please sign in to comment.