2019-06-19 17:41:43 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
struct tGear
|
|
|
|
{
|
|
|
|
float fMaxVelocity;
|
|
|
|
float fShiftUpVelocity;
|
|
|
|
float fShiftDownVelocity;
|
|
|
|
};
|
|
|
|
|
|
|
|
class cTransmission
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Gear 0 is reverse, 1-5 are forward
|
|
|
|
tGear Gears[6];
|
|
|
|
char nDriveType;
|
|
|
|
char nEngineType;
|
|
|
|
int8 nNumberOfGears;
|
|
|
|
uint8 Flags;
|
|
|
|
float fEngineAcceleration;
|
|
|
|
float fMaxVelocity;
|
|
|
|
float fUnkMaxVelocity;
|
|
|
|
float fMaxReverseVelocity;
|
2019-07-17 07:19:20 -04:00
|
|
|
float fCurVelocity;
|
2019-06-19 17:41:43 -04:00
|
|
|
|
|
|
|
void InitGearRatios(void);
|
2019-07-17 07:19:20 -04:00
|
|
|
void CalculateGearForSimpleCar(float speed, uint8 &gear);
|
2019-07-17 17:58:06 -04:00
|
|
|
float CalculateDriveAcceleration(const float &gasPedal, uint8 &gear, float &time, const float &velocity, bool cheat);
|
2019-06-19 17:41:43 -04:00
|
|
|
};
|