Add fan sound

This commit is contained in:
Miloslav Ciz 2025-01-31 14:20:49 +01:00
parent 67e0814afb
commit 2ff43a0d1a
4 changed files with 38 additions and 8 deletions

View file

@ -42,6 +42,7 @@ typedef int32_t LCR_GameUnit; ///< abstract game unit
#define LCR_RACING_EVENT_CRASH_SMALL 0x0004
#define LCR_RACING_EVENT_CRASH_BIG 0x0008
#define LCR_RACING_EVENT_ACCELERATOR 0x0010
#define LCR_RACING_EVENT_FAN 0x0020
#define LCR_PHYSICS_UNIT 4096 ///< len. of square for phys. engine
@ -1202,7 +1203,10 @@ uint32_t LCR_racingStep(unsigned int input)
onAccel = LCR_mapBlockIsAccelerator(b);
if (LCR_mapBlockIsFan(b))
{
LCR_racing.fanForce = LCR_GRAVITY * LCR_FAN_FORCE;
result |= LCR_RACING_EVENT_FAN;
}
groundMat = LCR_mapBlockGetMaterial(
LCR_currentMap.blocks + groundBlockIndex * LCR_BLOCK_SIZE);