Fix engine revving

This commit is contained in:
mateusfavarin 2024-06-28 21:14:39 -03:00
parent f4b1f9f265
commit 873e212f1a
3 changed files with 4 additions and 8 deletions

View File

@ -1,5 +1,3 @@
#ifdef USE_ONLINE
#include "OnlineCTR/lap.c"
int driverReserves;
#endif

View File

@ -5,7 +5,9 @@ void DECOMP_UI_DrawSpeedNeedle(short posX, short posY, struct Driver * driver)
int minScale = 0;
#ifdef USE_ONLINE
int maxScale = 100; // USF
int speed = MATH_FastSqrt((driver->xSpeed * driver->xSpeed) + (driver->zSpeed * driver->zSpeed), 0);
int speed = driver->kartState == KS_ENGINE_REVVING ?
driver->unk36E :
MATH_FastSqrt((driver->xSpeed * driver->xSpeed) + (driver->zSpeed * driver->zSpeed), 0);
#else
int maxScale = FP8_INT(driver->const_AccelSpeed_ClassStat) + FP8_INT(driver->const_SacredFireSpeed);
int speed = driver->unk36E; // is this actually speed?

View File

@ -16,7 +16,7 @@
//#define USE_BIGQUEUE // Requires RAMEX: Extended loading queue
//#define USE_HIGH1P // Requires BIGQUEUE: All high model drivers
//#define USE_RANDOM // Requires HIGH1P: Character Randomizer
#define USE_ONLINE // Requires HIGH1P: Online Multiplayer
//#define USE_ONLINE // Requires HIGH1P: Online Multiplayer
//#define USE_HIGHMP // Requires RAMEX: Multiplayer Maxed mod
//#define USE_VR // Virtual Reality
@ -53,10 +53,6 @@
#define WIDE_PICK(x,y) (x)
#endif
#ifdef USE_ONLINE
extern int driverReserves;
#endif
#ifndef REBUILD_PC
#include <gccHeaders.h>
#endif