Fix bug, add input display
This commit is contained in:
parent
19a2aff2cc
commit
0bbbc26f2a
5 changed files with 41 additions and 11 deletions
8
racing.h
8
racing.h
|
@ -134,6 +134,7 @@ struct
|
|||
|
||||
LCR_GameUnit carSpeeds[2]; /**< Signed speed in game units per tick (negative
|
||||
if backwards) and its previous value. */
|
||||
uint8_t currentInputs; ///< Current input state (from player or replay).
|
||||
|
||||
uint8_t groundMaterial; ///< Material currently under car wheels.
|
||||
|
||||
|
@ -251,8 +252,8 @@ void LCR_replayOutputStr(void (*printChar)(char))
|
|||
the memory they point to will be filled with the map hash and name hash.
|
||||
Returns 1 on success, else 0.
|
||||
*/
|
||||
int LCR_replayLoadFromStr(char (*nextChar)(void),
|
||||
uint32_t *mapHash, uint16_t *nameHash)
|
||||
int LCR_replayLoadFromStr(char (*nextChar)(void), uint32_t *mapHash,
|
||||
uint16_t *nameHash)
|
||||
{
|
||||
char c;
|
||||
|
||||
|
@ -964,6 +965,7 @@ void LCR_racingRestart(uint8_t replay)
|
|||
LCR_racing.carSpeeds[1] = 0;
|
||||
LCR_racing.carDrifting = 0;
|
||||
LCR_racing.crashState = 0;
|
||||
LCR_racing.currentInputs = 0;
|
||||
|
||||
// make the car body:
|
||||
TPE_makeCenterRectFull(LCR_racing.carJoints,
|
||||
|
@ -1192,6 +1194,8 @@ uint32_t LCR_racingStep(unsigned int input)
|
|||
LCR_replayRecordEvent(LCR_racing.tick,input);
|
||||
}
|
||||
|
||||
LCR_racing.currentInputs = input;
|
||||
|
||||
carForw = TPE_vec3Normalized(TPE_vec3Plus(
|
||||
TPE_vec3Minus(LCR_racing.carBody.joints[0].position,
|
||||
LCR_racing.carBody.joints[2].position),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue