mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Use old Ring Sting noise
This commit is contained in:
parent
3af24b8606
commit
a280ccb7de
6 changed files with 20 additions and 3 deletions
|
|
@ -993,6 +993,7 @@ struct player_t
|
||||||
|
|
||||||
boolean markedfordeath;
|
boolean markedfordeath;
|
||||||
boolean dotrickfx;
|
boolean dotrickfx;
|
||||||
|
boolean stingfx;
|
||||||
UINT8 bumperinflate;
|
UINT8 bumperinflate;
|
||||||
|
|
||||||
UINT8 ringboxdelay; // Delay until Ring Box auto-activates
|
UINT8 ringboxdelay; // Delay until Ring Box auto-activates
|
||||||
|
|
|
||||||
10
src/k_kart.c
10
src/k_kart.c
|
|
@ -4820,9 +4820,7 @@ void K_DebtStingPlayer(player_t *player, mobj_t *source)
|
||||||
player->wipeoutslow = min(length-1, wipeoutslowtime+1);
|
player->wipeoutslow = min(length-1, wipeoutslowtime+1);
|
||||||
|
|
||||||
player->ringvisualwarning = TICRATE*2;
|
player->ringvisualwarning = TICRATE*2;
|
||||||
|
player->stingfx = true;
|
||||||
if (P_IsDisplayPlayer(player))
|
|
||||||
S_StartSoundAtVolume(NULL, sfx_sting0, 170);
|
|
||||||
|
|
||||||
P_SetPlayerMobjState(player->mo, S_KART_SPINOUT);
|
P_SetPlayerMobjState(player->mo, S_KART_SPINOUT);
|
||||||
}
|
}
|
||||||
|
|
@ -8979,6 +8977,12 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
player->dotrickfx = false;
|
player->dotrickfx = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player->stingfx && !player->mo->hitlag)
|
||||||
|
{
|
||||||
|
S_StartSound(player->mo, sfx_s226l);
|
||||||
|
player->stingfx = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Don't screw up chain ring pickup/usage with instawhip charge.
|
// Don't screw up chain ring pickup/usage with instawhip charge.
|
||||||
// If the button stays held, delay charge a bit.
|
// If the button stays held, delay charge a bit.
|
||||||
if (player->instaWhipChargeLockout)
|
if (player->instaWhipChargeLockout)
|
||||||
|
|
|
||||||
|
|
@ -267,6 +267,8 @@ static int player_get(lua_State *L)
|
||||||
lua_pushboolean(L, plr->ringvisualwarning);
|
lua_pushboolean(L, plr->ringvisualwarning);
|
||||||
else if (fastcmp(field,"dotrickfx"))
|
else if (fastcmp(field,"dotrickfx"))
|
||||||
lua_pushboolean(L, plr->dotrickfx);
|
lua_pushboolean(L, plr->dotrickfx);
|
||||||
|
else if (fastcmp(field,"stingfx"))
|
||||||
|
lua_pushboolean(L, plr->stingfx);
|
||||||
else if (fastcmp(field,"bumperinflate"))
|
else if (fastcmp(field,"bumperinflate"))
|
||||||
lua_pushboolean(L, plr->bumperinflate);
|
lua_pushboolean(L, plr->bumperinflate);
|
||||||
else if (fastcmp(field,"ringboxdelay"))
|
else if (fastcmp(field,"ringboxdelay"))
|
||||||
|
|
@ -811,6 +813,8 @@ static int player_set(lua_State *L)
|
||||||
plr->markedfordeath = luaL_checkboolean(L, 3);
|
plr->markedfordeath = luaL_checkboolean(L, 3);
|
||||||
else if (fastcmp(field,"dotrickfx"))
|
else if (fastcmp(field,"dotrickfx"))
|
||||||
plr->dotrickfx = luaL_checkboolean(L, 3);
|
plr->dotrickfx = luaL_checkboolean(L, 3);
|
||||||
|
else if (fastcmp(field,"stingfx"))
|
||||||
|
plr->stingfx = luaL_checkboolean(L, 3);
|
||||||
else if (fastcmp(field,"bumperinflate"))
|
else if (fastcmp(field,"bumperinflate"))
|
||||||
plr->bumperinflate = luaL_checkboolean(L, 3);
|
plr->bumperinflate = luaL_checkboolean(L, 3);
|
||||||
else if (fastcmp(field,"ringboxdelay"))
|
else if (fastcmp(field,"ringboxdelay"))
|
||||||
|
|
|
||||||
|
|
@ -604,6 +604,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
||||||
|
|
||||||
WRITEUINT8(save->p, players[i].markedfordeath);
|
WRITEUINT8(save->p, players[i].markedfordeath);
|
||||||
WRITEUINT8(save->p, players[i].dotrickfx);
|
WRITEUINT8(save->p, players[i].dotrickfx);
|
||||||
|
WRITEUINT8(save->p, players[i].stingfx);
|
||||||
WRITEUINT8(save->p, players[i].bumperinflate);
|
WRITEUINT8(save->p, players[i].bumperinflate);
|
||||||
|
|
||||||
WRITEUINT8(save->p, players[i].ringboxdelay);
|
WRITEUINT8(save->p, players[i].ringboxdelay);
|
||||||
|
|
@ -1191,6 +1192,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
||||||
|
|
||||||
players[i].markedfordeath = READUINT8(save->p);
|
players[i].markedfordeath = READUINT8(save->p);
|
||||||
players[i].dotrickfx = READUINT8(save->p);
|
players[i].dotrickfx = READUINT8(save->p);
|
||||||
|
players[i].stingfx = READUINT8(save->p);
|
||||||
players[i].bumperinflate = READUINT8(save->p);
|
players[i].bumperinflate = READUINT8(save->p);
|
||||||
|
|
||||||
players[i].ringboxdelay = READUINT8(save->p);
|
players[i].ringboxdelay = READUINT8(save->p);
|
||||||
|
|
|
||||||
|
|
@ -1523,6 +1523,9 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
// SMS
|
// SMS
|
||||||
{"sting0", false, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Ring loss
|
{"sting0", false, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Ring loss
|
||||||
|
|
||||||
|
// Patching up base sounds
|
||||||
|
{"s226l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // s2 spikes LOUD
|
||||||
|
|
||||||
// SRB2kart - Skin sounds
|
// SRB2kart - Skin sounds
|
||||||
{"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR, ""},
|
{"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR, ""},
|
||||||
{"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR, ""},
|
{"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR, ""},
|
||||||
|
|
|
||||||
|
|
@ -1599,6 +1599,9 @@ typedef enum
|
||||||
// SMS
|
// SMS
|
||||||
sfx_sting0,
|
sfx_sting0,
|
||||||
|
|
||||||
|
// Patch-up
|
||||||
|
sfx_s226l,
|
||||||
|
|
||||||
// And LASTLY, Kart's skin sounds.
|
// And LASTLY, Kart's skin sounds.
|
||||||
sfx_kwin,
|
sfx_kwin,
|
||||||
sfx_klose,
|
sfx_klose,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue