mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 15:32:10 +00:00
Spindash boost dust, pogo spring sfx
This commit is contained in:
parent
f207140791
commit
f425ba4423
6 changed files with 129 additions and 13 deletions
|
@ -6254,6 +6254,15 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_FASTLINE4",
|
||||
"S_FASTLINE5",
|
||||
|
||||
// Fast dust release
|
||||
"S_FASTDUST1",
|
||||
"S_FASTDUST2",
|
||||
"S_FASTDUST3",
|
||||
"S_FASTDUST4",
|
||||
"S_FASTDUST5",
|
||||
"S_FASTDUST6",
|
||||
"S_FASTDUST7",
|
||||
|
||||
// Thunder Shield Burst
|
||||
|
||||
// Sneaker boost effect
|
||||
|
@ -7227,6 +7236,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_RANDOMITEMPOP",
|
||||
|
||||
"MT_FASTLINE",
|
||||
"MT_FASTDUST",
|
||||
"MT_BOOSTFLAME",
|
||||
"MT_BOOSTSMOKE",
|
||||
"MT_SNEAKERTRAIL",
|
||||
|
|
47
src/info.c
47
src/info.c
|
@ -55,12 +55,12 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI",
|
||||
"SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO",
|
||||
//SRB2kart Sprites
|
||||
"SPRG","BSPR","RNDM","RPOP","FAST","BOST","BOSM","KFRE","KINV","KINF",
|
||||
"WIPD","DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN","KRBM","BHOG",
|
||||
"BHBM","BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL","POKE","AUDI",
|
||||
"DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO","CRAB","SHAD",
|
||||
"BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO","ITEM","ITMO",
|
||||
"ITMI","ITMN","WANT","PBOM","RETI","VIEW"
|
||||
"SPRG","BSPR","RNDM","RPOP","FAST","DSHR","BOST","BOSM","KFRE","KINV",
|
||||
"KINF","WIPD","DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN","KRBM",
|
||||
"BHOG","BHBM","BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL","POKE",
|
||||
"AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO","CRAB",
|
||||
"SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO","ITEM",
|
||||
"ITMO","ITMI","ITMN","WANT","PBOM","RETI","VIEW"
|
||||
};
|
||||
|
||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||
|
@ -2586,6 +2586,14 @@ state_t states[NUMSTATES] =
|
|||
{SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|3, 1, {NULL}, 0, 0, S_FASTLINE5}, // S_FASTLINE4
|
||||
{SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|4, 1, {NULL}, 0, 0, S_NULL}, // S_FASTLINE5
|
||||
|
||||
{SPR_DSHR, FF_PAPERSPRITE, 1, {NULL}, 0, 0, S_FASTDUST2}, // S_FASTDUST1
|
||||
{SPR_DSHR, FF_PAPERSPRITE|1, 1, {NULL}, 0, 0, S_FASTDUST3}, // S_FASTDUST2
|
||||
{SPR_DSHR, FF_PAPERSPRITE|2, 1, {NULL}, 0, 0, S_FASTDUST4}, // S_FASTDUST3
|
||||
{SPR_DSHR, FF_PAPERSPRITE|3, 1, {NULL}, 0, 0, S_FASTDUST5}, // S_FASTDUST4
|
||||
{SPR_DSHR, FF_PAPERSPRITE|4, 1, {NULL}, 0, 0, S_FASTDUST6}, // S_FASTDUST5
|
||||
{SPR_DSHR, FF_PAPERSPRITE|5, 1, {NULL}, 0, 0, S_FASTDUST7}, // S_FASTDUST6
|
||||
{SPR_DSHR, FF_PAPERSPRITE|6, 1, {NULL}, 0, 0, S_NULL}, // S_FASTDUST7
|
||||
|
||||
{SPR_BOST, FF_FULLBRIGHT|FF_ANIMATE, TICRATE, {NULL}, 6, 1, S_BOOSTSMOKESPAWNER}, // S_BOOSTFLAME
|
||||
{SPR_NULL, 0, TICRATE/2, {NULL}, 0, 0, S_NULL}, // S_BOOSTSMOKESPAWNER
|
||||
|
||||
|
@ -14435,6 +14443,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_FASTDUST
|
||||
-1, // doomednum
|
||||
S_FASTDUST1, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
8, // speed
|
||||
14*FRACUNIT, // radius
|
||||
14*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BOOSTFLAME
|
||||
-1, // doomednum
|
||||
S_BOOSTFLAME, // spawnstate
|
||||
|
|
11
src/info.h
11
src/info.h
|
@ -583,6 +583,7 @@ typedef enum sprite
|
|||
SPR_RNDM, // Random Item Box
|
||||
SPR_RPOP, // Random Item Box Pop
|
||||
SPR_FAST, // Speed boost trail
|
||||
SPR_DSHR, // Speed boost dust release
|
||||
SPR_BOST, // Sneaker booster flame
|
||||
SPR_BOSM, // Sneaker booster smoke
|
||||
SPR_KFRE, // Sneaker fire trail
|
||||
|
@ -3102,6 +3103,15 @@ typedef enum state
|
|||
S_FASTLINE4,
|
||||
S_FASTLINE5,
|
||||
|
||||
// Fast dust release
|
||||
S_FASTDUST1,
|
||||
S_FASTDUST2,
|
||||
S_FASTDUST3,
|
||||
S_FASTDUST4,
|
||||
S_FASTDUST5,
|
||||
S_FASTDUST6,
|
||||
S_FASTDUST7,
|
||||
|
||||
// Magnet Burst
|
||||
|
||||
// Sneaker boost effect
|
||||
|
@ -4092,6 +4102,7 @@ typedef enum mobj_type
|
|||
MT_RANDOMITEMPOP,
|
||||
|
||||
MT_FASTLINE,
|
||||
MT_FASTDUST,
|
||||
MT_BOOSTFLAME,
|
||||
MT_BOOSTSMOKE,
|
||||
MT_SNEAKERTRAIL,
|
||||
|
|
72
src/k_kart.c
72
src/k_kart.c
|
@ -1247,6 +1247,55 @@ static void K_UpdateOffroad(player_t *player)
|
|||
player->kartstuff[k_offroad] = 0;
|
||||
}
|
||||
|
||||
|
||||
// This has to go earlier than its sisters because of K_RespawnChecker...
|
||||
static void K_SpawnDashDustRelease(player_t *player)
|
||||
{
|
||||
fixed_t newx;
|
||||
fixed_t newy;
|
||||
mobj_t *dust;
|
||||
angle_t travelangle;
|
||||
INT32 i;
|
||||
|
||||
I_Assert(player != NULL);
|
||||
I_Assert(player->mo != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(player->mo));
|
||||
|
||||
if (!P_IsObjectOnGround(player->mo))
|
||||
return;
|
||||
|
||||
if (player->speed == 0)
|
||||
return;
|
||||
|
||||
travelangle = player->mo->angle;
|
||||
|
||||
if (player->kartstuff[k_drift] || player->kartstuff[k_driftend])
|
||||
travelangle -= (ANGLE_45/5)*player->kartstuff[k_drift];
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
newx = player->mo->x + P_ReturnThrustX(player->mo, travelangle + ((i&1) ? -1 : 1)*ANGLE_90, FixedMul(48*FRACUNIT, player->mo->scale));
|
||||
newy = player->mo->y + P_ReturnThrustY(player->mo, travelangle + ((i&1) ? -1 : 1)*ANGLE_90, FixedMul(48*FRACUNIT, player->mo->scale));
|
||||
dust = P_SpawnMobj(newx, newy, player->mo->z, MT_FASTDUST);
|
||||
|
||||
P_SetTarget(&dust->target, player->mo);
|
||||
dust->angle = travelangle - ((i&1) ? -1 : 1)*ANGLE_45;
|
||||
dust->destscale = player->mo->scale;
|
||||
P_SetScale(dust, player->mo->scale);
|
||||
|
||||
dust->momx = 3*player->mo->momx/5;
|
||||
dust->momy = 3*player->mo->momy/5;
|
||||
//dust->momz = 3*player->mo->momz/5;
|
||||
|
||||
dust->flags2 = (dust->flags2 & ~MF2_DONTDRAW)|(player->mo->flags2 & MF2_DONTDRAW);
|
||||
dust->eflags = (dust->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP);
|
||||
dust->eflags = (dust->eflags & ~MFE_DRAWONLYFORP1)|(player->mo->eflags & MFE_DRAWONLYFORP1);
|
||||
dust->eflags = (dust->eflags & ~MFE_DRAWONLYFORP2)|(player->mo->eflags & MFE_DRAWONLYFORP2);
|
||||
dust->eflags = (dust->eflags & ~MFE_DRAWONLYFORP3)|(player->mo->eflags & MFE_DRAWONLYFORP3);
|
||||
dust->eflags = (dust->eflags & ~MFE_DRAWONLYFORP4)|(player->mo->eflags & MFE_DRAWONLYFORP4);
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Calculates the respawn timer and drop-boosting
|
||||
|
||||
\param player player object passed from K_KartPlayerThink
|
||||
|
@ -1327,6 +1376,7 @@ void K_RespawnChecker(player_t *player)
|
|||
{
|
||||
S_StartSound(player->mo, sfx_s23c);
|
||||
player->kartstuff[k_startboost] = 50;
|
||||
K_SpawnDashDustRelease(player);
|
||||
}
|
||||
player->mo->colorized = false;
|
||||
player->kartstuff[k_dropdash] = 0;
|
||||
|
@ -2836,6 +2886,7 @@ void K_DoSneaker(player_t *player, boolean doPFlag)
|
|||
}
|
||||
|
||||
player->kartstuff[k_sneakertimer] = sneakertime;
|
||||
K_SpawnDashDustRelease(player);
|
||||
|
||||
if (doPFlag)
|
||||
{
|
||||
|
@ -2936,7 +2987,7 @@ void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, boolean mute)
|
|||
mo->momz = FixedMul(vertispeed, vscale);
|
||||
|
||||
if (!mute)
|
||||
S_StartSound(mo, sfx_kc2f);
|
||||
S_StartSound(mo, sfx_kpogos);
|
||||
}
|
||||
|
||||
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source)
|
||||
|
@ -3821,6 +3872,7 @@ static void K_KartDrift(player_t *player, boolean onground)
|
|||
{
|
||||
player->kartstuff[k_driftboost] = 20;
|
||||
S_StartSound(player->mo, sfx_s23c);
|
||||
//K_SpawnDashDustRelease(player);
|
||||
player->kartstuff[k_driftcharge] = 0;
|
||||
}
|
||||
else if ((player->kartstuff[k_drift] != -5 && player->kartstuff[k_drift] != 5)
|
||||
|
@ -3830,6 +3882,7 @@ static void K_KartDrift(player_t *player, boolean onground)
|
|||
{
|
||||
player->kartstuff[k_driftboost] = 50;
|
||||
S_StartSound(player->mo, sfx_s23c);
|
||||
//K_SpawnDashDustRelease(player);
|
||||
player->kartstuff[k_driftcharge] = 0;
|
||||
}
|
||||
else if ((player->kartstuff[k_drift] != -5 && player->kartstuff[k_drift] != 5)
|
||||
|
@ -3839,6 +3892,7 @@ static void K_KartDrift(player_t *player, boolean onground)
|
|||
{
|
||||
player->kartstuff[k_driftboost] = 125;
|
||||
S_StartSound(player->mo, sfx_s23c);
|
||||
//K_SpawnDashDustRelease(player);
|
||||
player->kartstuff[k_driftcharge] = 0;
|
||||
}
|
||||
|
||||
|
@ -4681,13 +4735,17 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) // Let everyone hear this one
|
||||
S_StartSound(player->mo, sfx_s25f);
|
||||
}
|
||||
else if ((!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) && P_IsLocalPlayer(player))
|
||||
else
|
||||
{
|
||||
if (player->kartstuff[k_boostcharge] <= 40)
|
||||
S_StartSound(player->mo, sfx_cdfm01); // You were almost there!
|
||||
else
|
||||
S_StartSound(player->mo, sfx_s23c); // Nope, better luck next time.
|
||||
}
|
||||
K_SpawnDashDustRelease(player); // already handled for perfect boosts by K_DoSneaker
|
||||
if ((!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) && P_IsLocalPlayer(player))
|
||||
{
|
||||
if (player->kartstuff[k_boostcharge] <= 40)
|
||||
S_StartSound(player->mo, sfx_cdfm01); // You were almost there!
|
||||
else
|
||||
S_StartSound(player->mo, sfx_s23c); // Nope, better luck next time.
|
||||
}
|
||||
}
|
||||
}
|
||||
// You overcharged your engine? Those things are expensive!!!
|
||||
else if (player->kartstuff[k_boostcharge] > 50)
|
||||
|
|
|
@ -811,6 +811,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"noooo1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"noooo2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"hogbom", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"kpogos", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"ddash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
||||
|
|
|
@ -883,6 +883,7 @@ typedef enum
|
|||
sfx_noooo1,
|
||||
sfx_noooo2,
|
||||
sfx_hogbom,
|
||||
sfx_kpogos,
|
||||
sfx_ddash,
|
||||
sfx_dbgsal,
|
||||
|
||||
|
|
Loading…
Reference in a new issue