Skip to content

Commit

Permalink
[10552] Add some vehicle flags, thanks to zergtmn and community
Browse files Browse the repository at this point in the history
  • Loading branch information
Laise committed Sep 27, 2010
1 parent 2770811 commit e6ca533
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
17 changes: 17 additions & 0 deletions src/game/DBCEnums.h
Expand Up @@ -428,4 +428,21 @@ enum SpellEffectIndex

#define MAX_EFFECT_INDEX 3

enum VehicleFlags
{
VEHICLE_FLAG_ADJUST_AIM_ANGLE = 0x00000400, // Lua_IsVehicleAimAngleAdjustable
VEHICLE_FLAG_ADJUST_AIM_POWER = 0x00000800, // Lua_IsVehicleAimPowerAdjustable
VEHICLE_FLAG_CUSTOM_PITCH = 0x00000040, // If set use pitchMin and pitchMax from DBC, otherwise pitchMin = -pi/2, pitchMax = pi/2
};

enum VehicleSeatFlags
{
SEAT_FLAG_HIDE_PASSENGER = 0x00000200, // Passenger is hidden
SEAT_FLAG_CAN_CONTROL = 0x00000800, // Lua_UnitInVehicleControlSeat
SEAT_FLAG_CAN_ATTACK = 0x00004000, // Can attack, cast spells and use items from vehicle?
SEAT_FLAG_USABLE = 0x02000000, // Lua_CanExitVehicle
SEAT_FLAG_CAN_SWITCH = 0x04000000, // Lua_CanSwitchVehicleSeats
SEAT_FLAG_CAN_CAST = 0x20000000, // Lua_UnitHasVehicleUI
};

#endif
6 changes: 4 additions & 2 deletions src/game/DBCStructure.h
Expand Up @@ -1704,6 +1704,8 @@ struct TotemCategoryEntry
uint32 categoryMask; // 19 (compatibility mask for same type: different for totems, compatible from high to low for rods)
};

#define MAX_VEHICLE_SEAT 8

struct VehicleEntry
{
uint32 m_ID; // 0
Expand All @@ -1712,7 +1714,7 @@ struct VehicleEntry
float m_pitchSpeed; // 3
float m_pitchMin; // 4
float m_pitchMax; // 5
uint32 m_seatID[8]; // 6-13
uint32 m_seatID[MAX_VEHICLE_SEAT]; // 6-13
float m_mouseLookOffsetPitch; // 14
float m_cameraFadeDistScalarMin; // 15
float m_cameraFadeDistScalarMax; // 16
Expand All @@ -1736,7 +1738,7 @@ struct VehicleEntry
uint32 m_uiLocomotionType; // 34
float m_msslTrgtImpactTexRadius; // 35
uint32 m_uiSeatIndicatorType; // 36
// 37, new in 3.1
// 37, new in 3.1 - powerType
// 38, new in 3.1
// 39, new in 3.1
};
Expand Down
2 changes: 1 addition & 1 deletion src/game/Opcodes.h
Expand Up @@ -1226,7 +1226,7 @@ enum Opcodes
UMSG_UNKNOWN_1189 = 0x4A5, // not found, old SMSG_PET_GUIDS
SMSG_BATTLEGROUND_INFO_THROTTLED = 0x4A6, // empty, "You can't do that yet"
SMSG_PLAYER_VEHICLE_DATA = 0x4A7, // smsg guid+uint32 (vehicle) EVENT_PLAYER_GAINS_VEHICLE_DATA/EVENT_PLAYER_LOSES_VEHICLE_DATA
CMSG_UNKNOWN_1192 = 0x4A8, // cmsg uint64
CMSG_PLAYER_VEHICLE_ENTER = 0x4A8, // cmsg uint64
CMSG_EJECT_PASSENGER = 0x4A9, // cmsg uint64
SMSG_PET_GUIDS = 0x4AA, // shifted+5
SMSG_CLIENTCACHE_VERSION = 0x4AB, // shifted+5
Expand Down
4 changes: 2 additions & 2 deletions src/game/Unit.h
Expand Up @@ -669,8 +669,8 @@ MovementFlags const movementOrTurningFlagsMask = MovementFlags(
enum MovementFlags2
{
MOVEFLAG2_NONE = 0x0000,
MOVEFLAG2_UNK1 = 0x0001,
MOVEFLAG2_UNK2 = 0x0002,
MOVEFLAG2_NO_STRAFE = 0x0001,
MOVEFLAG2_NO_JUMPING = 0x0002,
MOVEFLAG2_UNK3 = 0x0004,
MOVEFLAG2_FULLSPEEDTURNING = 0x0008,
MOVEFLAG2_FULLSPEEDPITCHING = 0x0010,
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10551"
#define REVISION_NR "10552"
#endif // __REVISION_NR_H__

2 comments on commit e6ca533

@roby10
Copy link

@roby10 roby10 commented on e6ca533 Sep 27, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:D taking shape :)

@Forusim
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant believe it Oo
Please keep track on vehicles.
Thank you!

Please sign in to comment.