mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add new gate sounds
This commit is contained in:
parent
0bd280a29c
commit
362bef7b3a
7 changed files with 71 additions and 7 deletions
|
|
@ -426,7 +426,9 @@ typedef struct player_s
|
|||
fixed_t driftcharge; // Charge your drift so you can release a burst of speed
|
||||
UINT8 driftboost; // (0 to 125) - Boost you get from drifting
|
||||
UINT8 strongdriftboost; // (0 to 125) - While active, boost from drifting gives a stronger speed increase
|
||||
|
||||
UINT16 gateBoost; // Juicebox Manta Ring boosts
|
||||
UINT8 gateSound; // Sound effect combo
|
||||
|
||||
SINT8 aizdriftstrat; // (-1 to 1) - Let go of your drift while boosting? Helper for the SICK STRATZ (sliptiding!) you have just unlocked
|
||||
INT32 aizdrifttilt;
|
||||
|
|
|
|||
|
|
@ -252,6 +252,8 @@ static int player_get(lua_State *L)
|
|||
lua_pushinteger(L, plr->strongdriftboost);
|
||||
else if (fastcmp(field,"gateBoost"))
|
||||
lua_pushinteger(L, plr->gateBoost);
|
||||
else if (fastcmp(field,"gateSound"))
|
||||
lua_pushinteger(L, plr->gateSound);
|
||||
else if (fastcmp(field,"aizdriftstraft"))
|
||||
lua_pushinteger(L, plr->aizdriftstrat);
|
||||
else if (fastcmp(field,"aizdrifttilt"))
|
||||
|
|
@ -618,6 +620,8 @@ static int player_set(lua_State *L)
|
|||
plr->strongdriftboost = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"gateBoost"))
|
||||
plr->gateBoost = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"gateSound"))
|
||||
plr->gateSound = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"aizdriftstraft"))
|
||||
plr->aizdriftstrat = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"aizdrifttilt"))
|
||||
|
|
|
|||
|
|
@ -81,6 +81,8 @@ static void Obj_MantaCollide(mobj_t *manta, mobj_t *other)
|
|||
INT32 addBoost = 0;
|
||||
INT32 touchFlag = 0;
|
||||
|
||||
size_t i;
|
||||
|
||||
distance = P_AproxDistance(P_AproxDistance(
|
||||
other->x - manta->x,
|
||||
other->y - manta->y),
|
||||
|
|
@ -117,10 +119,31 @@ static void Obj_MantaCollide(mobj_t *manta, mobj_t *other)
|
|||
addBoost = max(MANTA_MINPWR, addBoost);
|
||||
}
|
||||
|
||||
S_StartSound(other, sfx_gatefx);
|
||||
|
||||
if (other->player != NULL)
|
||||
{
|
||||
UINT8 snd = 0;
|
||||
|
||||
if (other->player->speedboost > FRACUNIT/4)
|
||||
{
|
||||
snd = other->player->gateSound;
|
||||
other->player->gateSound++;
|
||||
|
||||
if (other->player->gateSound > 4)
|
||||
{
|
||||
other->player->gateSound = 4;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
other->player->gateSound = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
S_StopSoundByID(other, sfx_gate01 + i);
|
||||
}
|
||||
|
||||
S_StartSound(other, sfx_gate01 + snd);
|
||||
other->player->gateBoost += addBoost/2;
|
||||
|
||||
if (P_IsDisplayPlayer(other->player) == true)
|
||||
|
|
|
|||
|
|
@ -360,9 +360,9 @@ static void SPBSeek(mobj_t *spb, player_t *bestPlayer)
|
|||
spb->fuse = 2*TICRATE;
|
||||
}
|
||||
}
|
||||
#ifndef SPB_SEEKTEST // Easy debug switch
|
||||
else
|
||||
{
|
||||
#ifndef SPB_SEEKTEST // Easy debug switch
|
||||
if (dist <= activeDist)
|
||||
{
|
||||
S_StopSound(spb);
|
||||
|
|
@ -377,8 +377,8 @@ static void SPBSeek(mobj_t *spb, player_t *bestPlayer)
|
|||
spb_speed(spb) = desiredSpeed;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (SPBSeekSoundPlaying(spb) == false)
|
||||
{
|
||||
|
|
@ -441,6 +441,24 @@ static void SPBSeek(mobj_t *spb, player_t *bestPlayer)
|
|||
|
||||
if (pathfindsuccess == true)
|
||||
{
|
||||
#ifdef SPB_SEEKTEST
|
||||
if (pathtoplayer.numnodes > 1)
|
||||
{
|
||||
// Go to the next waypoint.
|
||||
curWaypoint = (waypoint_t *)pathtoplayer.array[1].nodedata;
|
||||
}
|
||||
else if (destWaypoint->numnextwaypoints > 0)
|
||||
{
|
||||
// Run ahead.
|
||||
curWaypoint = destWaypoint->nextwaypoints[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Sort of wait at the player's dest waypoint.
|
||||
circling = true;
|
||||
curWaypoint = destWaypoint;
|
||||
}
|
||||
#else
|
||||
path_t reversepath = {0};
|
||||
boolean reversesuccess = false;
|
||||
|
||||
|
|
@ -457,7 +475,6 @@ static void SPBSeek(mobj_t *spb, player_t *bestPlayer)
|
|||
// It's faster to go backwards than to chase forward.
|
||||
// Keep curWaypoint the same, so the SPB waits around for them.
|
||||
circling = true;
|
||||
Z_Free(reversepath.array);
|
||||
}
|
||||
else if (pathtoplayer.numnodes > 1)
|
||||
{
|
||||
|
|
@ -476,6 +493,12 @@ static void SPBSeek(mobj_t *spb, player_t *bestPlayer)
|
|||
curWaypoint = destWaypoint;
|
||||
}
|
||||
|
||||
if (reversesuccess == true)
|
||||
{
|
||||
Z_Free(reversepath.array);
|
||||
}
|
||||
#endif
|
||||
|
||||
Z_Free(pathtoplayer.array);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,7 +268,9 @@ static void P_NetArchivePlayers(void)
|
|||
WRITEFIXED(save_p, players[i].driftcharge);
|
||||
WRITEUINT8(save_p, players[i].driftboost);
|
||||
WRITEUINT8(save_p, players[i].strongdriftboost);
|
||||
|
||||
WRITEUINT16(save_p, players[i].gateBoost);
|
||||
WRITEUINT8(save_p, players[i].gateSound);
|
||||
|
||||
WRITESINT8(save_p, players[i].aizdriftstrat);
|
||||
WRITEINT32(save_p, players[i].aizdrifttilt);
|
||||
|
|
@ -563,7 +565,9 @@ static void P_NetUnArchivePlayers(void)
|
|||
players[i].driftcharge = READFIXED(save_p);
|
||||
players[i].driftboost = READUINT8(save_p);
|
||||
players[i].strongdriftboost = READUINT8(save_p);
|
||||
|
||||
players[i].gateBoost = READUINT16(save_p);
|
||||
players[i].gateSound = READUINT8(save_p);
|
||||
|
||||
players[i].aizdriftstrat = READSINT8(save_p);
|
||||
players[i].aizdrifttilt = READINT32(save_p);
|
||||
|
|
|
|||
|
|
@ -1124,7 +1124,11 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"spbskc", false, 32, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
|
||||
// Juicebox for SPB
|
||||
{"gatefx", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gate01", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gate02", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gate03", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gate04", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
{"gate05", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
|
||||
|
||||
// SRB2Kart - Engine sounds
|
||||
// Engine class A
|
||||
|
|
|
|||
|
|
@ -1189,7 +1189,11 @@ typedef enum
|
|||
sfx_spbskc,
|
||||
|
||||
// Juicebox for SPB
|
||||
sfx_gatefx,
|
||||
sfx_gate01,
|
||||
sfx_gate02,
|
||||
sfx_gate03,
|
||||
sfx_gate04,
|
||||
sfx_gate05,
|
||||
|
||||
// Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy...
|
||||
// Engine class A - Low Speed, Low Weight
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue