Placeholder boost effect

This commit is contained in:
TehRealSalt 2018-09-06 23:49:51 -04:00
parent 7760c7030e
commit 52034646da
5 changed files with 137 additions and 6 deletions

View file

@ -6249,6 +6249,16 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
// Thunder Shield Burst // Thunder Shield Burst
// Sneaker boost effect
"S_BOOSTFLAME",
"S_BOOSTSMOKESPAWNER",
"S_BOOSTSMOKE1",
"S_BOOSTSMOKE2",
"S_BOOSTSMOKE3",
"S_BOOSTSMOKE4",
"S_BOOSTSMOKE5",
"S_BOOSTSMOKE6",
// Sneaker Fire Trail // Sneaker Fire Trail
"S_KARTFIRE1", "S_KARTFIRE1",
"S_KARTFIRE2", "S_KARTFIRE2",
@ -7209,6 +7219,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_RANDOMITEM", "MT_RANDOMITEM",
"MT_RANDOMITEMPOP", "MT_RANDOMITEMPOP",
"MT_BOOSTFLAME",
"MT_BOOSTSMOKE",
"MT_SNEAKERTRAIL", "MT_SNEAKERTRAIL",
"MT_SPARKLETRAIL", "MT_SPARKLETRAIL",
"MT_INVULNFLASH", "MT_INVULNFLASH",

View file

@ -55,12 +55,12 @@ char sprnames[NUMSPRITES + 1][5] =
"GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI", "GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI",
"SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO", "SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO",
//SRB2kart Sprites //SRB2kart Sprites
"SPRG","BSPR","RNDM","RPOP","KFRE","KINV","KINF","WIPD","DRIF","DUST", "SPRG","BSPR","RNDM","RPOP","BOST","BOSM","KFRE","KINV","KINF","WIPD",
"FITM","BANA","ORBN","JAWZ","SSMN","KRBM","BHOG","BHBM","BLIG","LIGH", "DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN","KRBM","BHOG","BHBM",
"THNS","SINK","SITR","KBLN","DEZL","POKE","AUDI","DECO","DOOD","SNES", "BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL","POKE","AUDI","DECO",
"GBAS","SPRS","BUZB","CHOM","SACO","CRAB","SHAD","BRNG","BUMP","FLEN", "DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO","CRAB","SHAD","BRNG",
"CLAS","PSHW","ISTA","ISTB","ARRO","ITEM","ITMO","ITMI","ITMN","WANT", "BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO","ITEM","ITMO","ITMI",
"PBOM","RETI","VIEW" "ITMN","WANT","PBOM","RETI","VIEW"
}; };
// Doesn't work with g++, needs actionf_p1 (don't modify this comment) // Doesn't work with g++, needs actionf_p1 (don't modify this comment)
@ -2578,6 +2578,16 @@ state_t states[NUMSTATES] =
{SPR_DUST, FF_TRANS20|2, 3, {NULL}, 0, 0, S_DRIFTDUST4}, // S_DRIFTDUST3 {SPR_DUST, FF_TRANS20|2, 3, {NULL}, 0, 0, S_DRIFTDUST4}, // S_DRIFTDUST3
{SPR_DUST, FF_TRANS20|3, 3, {NULL}, 0, 0, S_NULL}, // S_DRIFTDUST4 {SPR_DUST, FF_TRANS20|3, 3, {NULL}, 0, 0, S_NULL}, // S_DRIFTDUST4
{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
{SPR_BOSM, FF_TRANS50, 3, {NULL}, 0, 0, S_BOOSTSMOKE2}, // S_BOOSTSMOKE1
{SPR_BOSM, FF_TRANS50|1, 3, {NULL}, 0, 0, S_BOOSTSMOKE3}, // S_BOOSTSMOKE2
{SPR_BOSM, FF_TRANS50|2, 3, {NULL}, 0, 0, S_BOOSTSMOKE4}, // S_BOOSTSMOKE3
{SPR_BOSM, FF_TRANS50|3, 3, {NULL}, 0, 0, S_BOOSTSMOKE5}, // S_BOOSTSMOKE4
{SPR_BOSM, FF_TRANS50|4, 3, {NULL}, 0, 0, S_BOOSTSMOKE6}, // S_BOOSTSMOKE5
{SPR_BOSM, FF_TRANS50|5, 3, {NULL}, 0, 0, S_NULL}, // S_BOOSTSMOKE6
{SPR_NULL, 0, 10, {NULL}, 0, 0, S_KARTFIRE2}, // S_KARTFIRE1 {SPR_NULL, 0, 10, {NULL}, 0, 0, S_KARTFIRE2}, // S_KARTFIRE1
{SPR_KFRE, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARTFIRE3}, // S_KARTFIRE2 {SPR_KFRE, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_KARTFIRE3}, // S_KARTFIRE2
{SPR_KFRE, FF_FULLBRIGHT|1, 2, {NULL}, 0, 0, S_KARTFIRE4}, // S_KARTFIRE3 {SPR_KFRE, FF_FULLBRIGHT|1, 2, {NULL}, 0, 0, S_KARTFIRE4}, // S_KARTFIRE3
@ -14390,6 +14400,60 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate S_NULL // raisestate
}, },
{ // MT_BOOSTFLAME
-1, // doomednum
S_BOOSTFLAME, // 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
8*FRACUNIT, // radius
8*FRACUNIT, // height
1, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags
S_NULL // raisestate
},
{ // MT_BOOSTSMOKE
-1, // doomednum
S_BOOSTSMOKE1, // 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
8*FRACUNIT, // radius
8*FRACUNIT, // height
1, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOBLOCKMAP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
S_NULL // raisestate
},
{ // MT_SNEAKERTRAIL { // MT_SNEAKERTRAIL
-1, // doomednum -1, // doomednum
S_KARTFIRE1, // spawnstate S_KARTFIRE1, // spawnstate

View file

@ -582,6 +582,8 @@ typedef enum sprite
SPR_RNDM, // Random Item Box SPR_RNDM, // Random Item Box
SPR_RPOP, // Random Item Box Pop SPR_RPOP, // Random Item Box Pop
SPR_BOST, // Sneaker booster flame
SPR_BOSM, // Sneaker booster smoke
SPR_KFRE, // Sneaker fire trail SPR_KFRE, // Sneaker fire trail
SPR_KINV, // Invincibility sparkle trail SPR_KINV, // Invincibility sparkle trail
SPR_KINF, // Invincibility flash SPR_KINF, // Invincibility flash
@ -3094,6 +3096,16 @@ typedef enum state
// Magnet Burst // Magnet Burst
// Sneaker boost effect
S_BOOSTFLAME,
S_BOOSTSMOKESPAWNER,
S_BOOSTSMOKE1,
S_BOOSTSMOKE2,
S_BOOSTSMOKE3,
S_BOOSTSMOKE4,
S_BOOSTSMOKE5,
S_BOOSTSMOKE6,
// Sneaker Fire Trail // Sneaker Fire Trail
S_KARTFIRE1, S_KARTFIRE1,
S_KARTFIRE2, S_KARTFIRE2,
@ -4071,6 +4083,8 @@ typedef enum mobj_type
MT_RANDOMITEM, MT_RANDOMITEM,
MT_RANDOMITEMPOP, MT_RANDOMITEMPOP,
MT_BOOSTFLAME,
MT_BOOSTSMOKE,
MT_SNEAKERTRAIL, MT_SNEAKERTRAIL,
MT_SPARKLETRAIL, MT_SPARKLETRAIL,
MT_INVULNFLASH, MT_INVULNFLASH,

View file

@ -2689,6 +2689,14 @@ void K_DoSneaker(player_t *player, boolean doPFlag)
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3)
S_StartSound(player->mo, sfx_cdfm01); S_StartSound(player->mo, sfx_cdfm01);
if (!player->kartstuff[k_sneakertimer])
{
mobj_t *overlay = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BOOSTFLAME);
P_SetTarget(&overlay->target, player->mo);
overlay->destscale = player->mo->scale;
P_SetScale(overlay, player->mo->scale);
}
player->kartstuff[k_sneakertimer] = sneakertime; player->kartstuff[k_sneakertimer] = sneakertime;
if (doPFlag) if (doPFlag)

View file

@ -8229,6 +8229,39 @@ void P_MobjThinker(mobj_t *mobj)
S_StartSound(mobj, sfx_prloop); S_StartSound(mobj, sfx_prloop);
mobj->health--; mobj->health--;
break; break;
case MT_BOOSTFLAME:
if (!mobj->target || !mobj->target->health)
{
P_RemoveMobj(mobj);
return;
}
P_TeleportMove(mobj, mobj->target->x + P_ReturnThrustX(mobj, mobj->target->angle+ANGLE_180, mobj->target->radius),
mobj->target->y + P_ReturnThrustY(mobj, mobj->target->angle+ANGLE_180, mobj->target->radius), mobj->target->z);
mobj->angle = mobj->target->angle;
P_SetScale(mobj, mobj->target->scale);
if (mobj->target->player)
{
if (mobj->target->player->kartstuff[k_sneakertimer] > mobj->movecount)
P_SetMobjState(mobj, S_BOOSTFLAME);
mobj->movecount = mobj->target->player->kartstuff[k_sneakertimer];
}
if (mobj->state == &states[S_BOOSTSMOKESPAWNER])
{
mobj_t *smoke = P_SpawnMobj(mobj->x, mobj->y, mobj->z+(8<<FRACBITS), MT_BOOSTSMOKE);
P_SetScale(smoke, mobj->target->scale/2);
smoke->destscale = 3*mobj->target->scale/2;
smoke->momx = mobj->target->momx/2;
smoke->momy = mobj->target->momy/2;
smoke->momz = mobj->target->momz/2;
P_Thrust(smoke, mobj->target->angle+FixedAngle(P_RandomRange(135, 225)<<FRACBITS), P_RandomRange(0, 8) * mapheaderinfo[gamemap-1]->mobj_scale);
}
break;
case MT_SPARKLETRAIL: case MT_SPARKLETRAIL:
if (!mobj->target) if (!mobj->target)
{ {