1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-06-16 21:33:12 +00:00
re3/src/vehicles/Transmission.h
2021-01-02 20:30:12 +01:00

29 lines
600 B
C++

#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 fMaxCruiseVelocity;
float fMaxReverseVelocity;
float fCurVelocity;
void InitGearRatios(void);
void CalculateGearForSimpleCar(float speed, uint8 &gear);
float CalculateDriveAcceleration(const float &gasPedal, uint8 &gear, float &time, const float &velocity, bool cheat);
};