2019-06-17 10:30:02 +02:00
|
|
|
#pragma once
|
|
|
|
|
2019-06-19 23:41:43 +02:00
|
|
|
#include "Transmission.h"
|
|
|
|
|
|
|
|
enum eHandlingId
|
|
|
|
{
|
|
|
|
HANDLING_LANDSTAL,
|
|
|
|
HANDLING_IDAHO,
|
|
|
|
HANDLING_STINGER,
|
|
|
|
HANDLING_LINERUN,
|
|
|
|
HANDLING_PEREN,
|
|
|
|
HANDLING_SENTINEL,
|
|
|
|
HANDLING_PATRIOT,
|
|
|
|
HANDLING_FIRETRUK,
|
|
|
|
HANDLING_TRASH,
|
|
|
|
HANDLING_STRETCH,
|
|
|
|
HANDLING_MANANA,
|
|
|
|
HANDLING_INFERNUS,
|
|
|
|
HANDLING_PONY,
|
|
|
|
HANDLING_MULE,
|
|
|
|
HANDLING_CHEETAH,
|
|
|
|
HANDLING_AMBULAN,
|
|
|
|
HANDLING_FBICAR,
|
|
|
|
HANDLING_MOONBEAM,
|
|
|
|
HANDLING_ESPERANT,
|
|
|
|
HANDLING_TAXI,
|
|
|
|
HANDLING_KURUMA,
|
|
|
|
HANDLING_BOBCAT,
|
|
|
|
HANDLING_MRWHOOP,
|
|
|
|
HANDLING_BFINJECT,
|
|
|
|
HANDLING_POLICE,
|
|
|
|
HANDLING_ENFORCER,
|
|
|
|
HANDLING_SECURICA,
|
|
|
|
HANDLING_BANSHEE,
|
|
|
|
HANDLING_BUS,
|
|
|
|
HANDLING_RHINO,
|
|
|
|
HANDLING_BARRACKS,
|
|
|
|
HANDLING_TRAIN,
|
|
|
|
HANDLING_HELI,
|
|
|
|
HANDLING_DODO,
|
|
|
|
HANDLING_COACH,
|
|
|
|
HANDLING_CABBIE,
|
|
|
|
HANDLING_STALLION,
|
|
|
|
HANDLING_RUMPO,
|
|
|
|
HANDLING_RCBANDIT,
|
|
|
|
HANDLING_MAFIA,
|
|
|
|
HANDLING_AIRTRAIN,
|
|
|
|
HANDLING_DEADDODO,
|
|
|
|
HANDLING_FLATBED,
|
|
|
|
HANDLING_YANKEE,
|
2020-05-10 17:09:14 +02:00
|
|
|
HANDLING_GOLFCART,
|
|
|
|
HANDLING_VOODOO,
|
|
|
|
HANDLING_WASHING,
|
|
|
|
HANDLING_CUBAN,
|
|
|
|
HANDLING_ROMERO,
|
|
|
|
HANDLING_PACKER,
|
|
|
|
HANDLING_ADMIRAL,
|
|
|
|
HANDLING_GANGBUR,
|
|
|
|
HANDLING_ZEBRA,
|
|
|
|
HANDLING_TOPFUN,
|
|
|
|
HANDLING_GLENDALE,
|
|
|
|
HANDLING_OCEANIC,
|
|
|
|
HANDLING_HERMES,
|
|
|
|
HANDLING_SABRE1,
|
|
|
|
HANDLING_SABRETUR,
|
|
|
|
HANDLING_PHEONIX,
|
|
|
|
HANDLING_WALTON,
|
|
|
|
HANDLING_REGINA,
|
|
|
|
HANDLING_COMET,
|
|
|
|
HANDLING_DELUXO,
|
|
|
|
HANDLING_BURRITO,
|
|
|
|
HANDLING_SPAND,
|
|
|
|
HANDLING_BAGGAGE,
|
|
|
|
HANDLING_KAUFMAN,
|
|
|
|
HANDLING_RANCHER,
|
|
|
|
HANDLING_FBIRANCH,
|
|
|
|
HANDLING_VIRGO,
|
|
|
|
HANDLING_GREENWOO,
|
|
|
|
HANDLING_HOTRING,
|
|
|
|
HANDLING_SANDKING,
|
|
|
|
HANDLING_BLISTAC,
|
|
|
|
HANDLING_BOXVILLE,
|
|
|
|
HANDLING_BENSON,
|
|
|
|
HANDLING_DESPERAD,
|
|
|
|
HANDLING_LOVEFIST,
|
|
|
|
HANDLING_BLOODRA,
|
|
|
|
HANDLING_BLOODRB,
|
|
|
|
HANDLING_BIKE,
|
|
|
|
HANDLING_MOPED,
|
|
|
|
HANDLING_DIRTBIKE,
|
|
|
|
HANDLING_ANGEL,
|
|
|
|
HANDLING_FREEWAY,
|
|
|
|
HANDLING_PREDATOR,
|
|
|
|
HANDLING_SPEEDER,
|
|
|
|
HANDLING_REEFER,
|
|
|
|
HANDLING_RIO,
|
|
|
|
HANDLING_SQUALO,
|
|
|
|
HANDLING_TROPIC,
|
|
|
|
HANDLING_COASTGRD,
|
|
|
|
HANDLING_DINGHY,
|
|
|
|
HANDLING_MARQUIS,
|
|
|
|
HANDLING_CUPBOAT,
|
|
|
|
HANDLING_SEAPLANE,
|
|
|
|
HANDLING_SPARROW,
|
|
|
|
HANDLING_SEASPAR,
|
|
|
|
HANDLING_MAVERICK,
|
|
|
|
HANDLING_COASTMAV,
|
|
|
|
HANDLING_POLMAV,
|
|
|
|
HANDLING_HUNTER,
|
|
|
|
HANDLING_RCBARON,
|
|
|
|
HANDLING_RCGOBLIN,
|
|
|
|
HANDLING_RCCOPTER
|
2019-06-19 23:41:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
HANDLING_1G_BOOST = 1,
|
|
|
|
HANDLING_2G_BOOST = 2,
|
|
|
|
HANDLING_REV_BONNET = 4,
|
|
|
|
HANDLING_HANGING_BOOT = 8,
|
|
|
|
HANDLING_NO_DOORS = 0x10,
|
|
|
|
HANDLING_IS_VAN = 0x20,
|
|
|
|
HANDLING_IS_BUS = 0x40,
|
|
|
|
HANDLING_IS_LOW = 0x80,
|
|
|
|
HANDLING_DBL_EXHAUST = 0x100,
|
|
|
|
HANDLING_TAILGATE_BOOT = 0x200,
|
|
|
|
HANDLING_NOSWING_BOOT = 0x400,
|
|
|
|
HANDLING_NONPLAYER_STABILISER = 0x800,
|
|
|
|
HANDLING_NEUTRALHANDLING = 0x1000,
|
|
|
|
HANDLING_HAS_NO_ROOF = 0x2000,
|
|
|
|
HANDLING_IS_BIG = 0x4000,
|
|
|
|
HANDLING_HALOGEN_LIGHTS = 0x8000,
|
2020-05-10 17:09:14 +02:00
|
|
|
HANDLING_IS_BIKE = 0x10000,
|
|
|
|
HANDLING_IS_HELI = 0x20000,
|
|
|
|
HANDLING_IS_PLANE = 0x40000,
|
|
|
|
HANDLING_IS_BOAT = 0x80000,
|
|
|
|
HANDLING_NO_EXHAUST = 0x100000,
|
|
|
|
HANDLING_REARWHEEL_1ST = 0x200000,
|
|
|
|
HANDLING_HANDBRAKE_TYRE = 0x400000,
|
|
|
|
HANDLING_SIT_IN_BOAT = 0x800000,
|
|
|
|
HANDLING_FAT_REARW = 0x1000000,
|
|
|
|
HANDLING_NARROW_FRONTW = 0x2000000,
|
|
|
|
HANDLING_GOOD_INSAND = 0x4000000,
|
2019-06-19 23:41:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct tHandlingData
|
|
|
|
{
|
2019-07-17 23:58:06 +02:00
|
|
|
eHandlingId nIdentifier;
|
2019-06-19 23:41:43 +02:00
|
|
|
float fMass;
|
|
|
|
float fInvMass;
|
|
|
|
float fTurnMass;
|
|
|
|
CVector Dimension;
|
|
|
|
CVector CentreOfMass;
|
|
|
|
int8 nPercentSubmerged;
|
|
|
|
float fBuoyancy;
|
|
|
|
float fTractionMultiplier;
|
2019-07-17 13:19:20 +02:00
|
|
|
cTransmission Transmission;
|
2019-06-19 23:41:43 +02:00
|
|
|
float fBrakeDeceleration;
|
|
|
|
float fBrakeBias;
|
|
|
|
int8 bABS;
|
|
|
|
float fSteeringLock;
|
|
|
|
float fTractionLoss;
|
|
|
|
float fTractionBias;
|
2020-04-19 06:14:13 +02:00
|
|
|
float fABS; // should be VC leftover
|
2019-06-19 23:41:43 +02:00
|
|
|
float fSuspensionForceLevel;
|
|
|
|
float fSuspensionDampingLevel;
|
|
|
|
float fSuspensionUpperLimit;
|
|
|
|
float fSuspensionLowerLimit;
|
|
|
|
float fSuspensionBias;
|
|
|
|
float fCollisionDamageMultiplier;
|
|
|
|
uint32 Flags;
|
|
|
|
float fSeatOffsetDistance;
|
|
|
|
int32 nMonetaryValue;
|
|
|
|
int8 FrontLights;
|
|
|
|
int8 RearLights;
|
|
|
|
};
|
|
|
|
VALIDATE_SIZE(tHandlingData, 0xD8);
|
|
|
|
|
2019-06-17 10:30:02 +02:00
|
|
|
class cHandlingDataMgr
|
|
|
|
{
|
2019-06-19 23:41:43 +02:00
|
|
|
float field_0; // unused it seems
|
2019-07-10 11:05:49 +02:00
|
|
|
public:
|
2019-06-19 23:41:43 +02:00
|
|
|
float field_4; // wheel related
|
2019-07-10 11:05:49 +02:00
|
|
|
private:
|
2019-06-19 23:41:43 +02:00
|
|
|
float field_8; //
|
|
|
|
float field_C; // unused it seems
|
|
|
|
float field_10; //
|
|
|
|
tHandlingData HandlingData[NUMHANDLINGS];
|
2020-04-19 06:14:13 +02:00
|
|
|
uint32 field_302C; // unused it seems
|
2019-06-19 23:41:43 +02:00
|
|
|
|
2019-06-17 10:30:02 +02:00
|
|
|
public:
|
2019-06-19 23:41:43 +02:00
|
|
|
cHandlingDataMgr(void);
|
|
|
|
void Initialise(void);
|
|
|
|
void LoadHandlingData(void);
|
|
|
|
int FindExactWord(const char *word, const char *words, int wordLen, int numWords);
|
|
|
|
void ConvertDataToGameUnits(tHandlingData *handling);
|
2019-06-17 10:30:02 +02:00
|
|
|
int32 GetHandlingId(const char *name);
|
2019-06-20 01:07:57 +02:00
|
|
|
tHandlingData *GetHandlingData(eHandlingId id) { return &HandlingData[id]; }
|
2019-07-17 23:58:06 +02:00
|
|
|
bool HasRearWheelDrive(eHandlingId id) { return HandlingData[id].Transmission.nDriveType == 'R'; }
|
|
|
|
bool HasFrontWheelDrive(eHandlingId id) { return HandlingData[id].Transmission.nDriveType == 'F'; }
|
2019-06-17 10:30:02 +02:00
|
|
|
};
|
2020-04-16 14:30:47 +02:00
|
|
|
extern cHandlingDataMgr mod_HandlingManager;
|