mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-04 04:36:21 +00:00
Merge branch 'rankpass-sfx' into 'master'
Rankpass SFX Closes #340 See merge request KartKrew/Kart!785
This commit is contained in:
commit
765bdab7f1
4 changed files with 53 additions and 5 deletions
11
src/k_hud.c
11
src/k_hud.c
|
|
@ -1574,8 +1574,8 @@ static fixed_t K_DrawKartPositionNumPatch(UINT8 num, UINT8 *color, fixed_t x, fi
|
|||
overlayFlags[1] = V_SUBTRACT;
|
||||
}
|
||||
|
||||
w = kp_positionnum[num][0][splitIndex]->width * scale;
|
||||
h = kp_positionnum[num][0][splitIndex]->height * scale;
|
||||
w = SHORT(kp_positionnum[num][0][splitIndex]->width) * scale;
|
||||
h = SHORT(kp_positionnum[num][0][splitIndex]->height) * scale;
|
||||
|
||||
if (flags & V_SNAPTORIGHT)
|
||||
{
|
||||
|
|
@ -1597,7 +1597,12 @@ static fixed_t K_DrawKartPositionNumPatch(UINT8 num, UINT8 *color, fixed_t x, fi
|
|||
);
|
||||
}
|
||||
|
||||
return (x - w);
|
||||
if (!(flags & V_SNAPTORIGHT))
|
||||
{
|
||||
x -= w;
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
static void K_DrawKartPositionNum(INT32 num)
|
||||
|
|
|
|||
11
src/k_kart.c
11
src/k_kart.c
|
|
@ -9916,10 +9916,17 @@ void K_KartUpdatePosition(player_t *player)
|
|||
|
||||
if (position != oldposition) // Changed places?
|
||||
{
|
||||
if (position < oldposition && P_IsDisplayPlayer(player) == true)
|
||||
if (player->positiondelay <= 0 && position < oldposition && P_IsDisplayPlayer(player) == true)
|
||||
{
|
||||
// Play sound when getting closer to 1st.
|
||||
S_StartSound(player->mo, sfx_mbs41);
|
||||
UINT32 soundpos = (max(0, position - 1) * MAXPLAYERS)/realplayers; // always 1-15 despite there being 16 players at max...
|
||||
#if MAXPLAYERS > 16
|
||||
if (soundpos < 15)
|
||||
{
|
||||
soundpos = 15;
|
||||
}
|
||||
#endif
|
||||
S_StartSound(player->mo, sfx_pass02 + soundpos); // ...which is why we can start at index 2 for a lower general pitch
|
||||
}
|
||||
|
||||
player->positiondelay = POS_DELAY_TIME + 4; // Position number growth
|
||||
|
|
|
|||
18
src/sounds.c
18
src/sounds.c
|
|
@ -1130,6 +1130,24 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"gate04", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gate05", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
|
||||
// Passing sounds
|
||||
{"pass01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass02", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass03", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass04", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass05", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass06", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass07", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass08", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass09", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass10", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass11", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass12", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass13", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass15", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"pass16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
|
||||
// SRB2Kart - Engine sounds
|
||||
// Engine class A
|
||||
{"krta00", false, 48, 65, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
|
|
|
|||
18
src/sounds.h
18
src/sounds.h
|
|
@ -1195,6 +1195,24 @@ typedef enum
|
|||
sfx_gate04,
|
||||
sfx_gate05,
|
||||
|
||||
// Passing sounds
|
||||
sfx_pass01,
|
||||
sfx_pass02,
|
||||
sfx_pass03,
|
||||
sfx_pass04,
|
||||
sfx_pass05,
|
||||
sfx_pass06,
|
||||
sfx_pass07,
|
||||
sfx_pass08,
|
||||
sfx_pass09,
|
||||
sfx_pass10,
|
||||
sfx_pass11,
|
||||
sfx_pass12,
|
||||
sfx_pass13,
|
||||
sfx_pass14,
|
||||
sfx_pass15,
|
||||
sfx_pass16,
|
||||
|
||||
// Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy...
|
||||
// Engine class A - Low Speed, Low Weight
|
||||
sfx_krta00,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue