Speed lines

This commit is contained in:
TehRealSalt 2018-09-13 20:26:43 -04:00
parent ec2b4e0dfc
commit 7d4d181715
4 changed files with 78 additions and 6 deletions

View file

@ -6247,6 +6247,16 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_DRIFTDUST3",
"S_DRIFTDUST4",
// Fast lines
"S_FASTLINE1",
"S_FASTLINE2",
"S_FASTLINE3",
"S_FASTLINE4",
"S_FASTLINE5",
"S_FASTLINE6",
"S_FASTLINE7",
"S_FASTLINE8",
// Thunder Shield Burst
// Sneaker boost effect
@ -7219,6 +7229,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_RANDOMITEM",
"MT_RANDOMITEMPOP",
"MT_FASTLINE",
"MT_BOOSTFLAME",
"MT_BOOSTSMOKE",
"MT_SNEAKERTRAIL",

View file

@ -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","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","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)
@ -2580,6 +2580,15 @@ state_t states[NUMSTATES] =
{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_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_FASTLINE2}, // S_FASTLINE1
{SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|1, 1, {NULL}, 0, 0, S_FASTLINE3}, // S_FASTLINE2
{SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|2, 1, {NULL}, 0, 0, S_FASTLINE4}, // S_FASTLINE3
{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_FASTLINE6}, // S_FASTLINE5
{SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|5, 1, {NULL}, 0, 0, S_FASTLINE7}, // S_FASTLINE6
{SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|6, 1, {NULL}, 0, 0, S_FASTLINE8}, // S_FASTLINE7
{SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|7, 1, {NULL}, 0, 0, S_NULL}, // S_FASTLINE8
{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
@ -14402,6 +14411,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_FASTLINE
-1, // doomednum
S_FASTLINE1, // 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

View file

@ -582,6 +582,7 @@ typedef enum sprite
SPR_RNDM, // Random Item Box
SPR_RPOP, // Random Item Box Pop
SPR_FAST, // Speed boost trail
SPR_BOST, // Sneaker booster flame
SPR_BOSM, // Sneaker booster smoke
SPR_KFRE, // Sneaker fire trail
@ -3094,6 +3095,16 @@ typedef enum state
S_DRIFTDUST3,
S_DRIFTDUST4,
// Fast lines
S_FASTLINE1,
S_FASTLINE2,
S_FASTLINE3,
S_FASTLINE4,
S_FASTLINE5,
S_FASTLINE6,
S_FASTLINE7,
S_FASTLINE8,
// Magnet Burst
// Sneaker boost effect
@ -4083,6 +4094,7 @@ typedef enum mobj_type
MT_RANDOMITEM,
MT_RANDOMITEMPOP,
MT_FASTLINE,
MT_BOOSTFLAME,
MT_BOOSTSMOKE,
MT_SNEAKERTRAIL,

View file

@ -3309,6 +3309,19 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
K_UpdateOffroad(player);
K_GetKartBoostPower(player);
// Speed lines
if (player->kartstuff[k_speedboost] > FRACUNIT/8 && (leveltime & 1))
{
mobj_t *fast = P_SpawnMobj(player->mo->x + (P_RandomRange(-32,32)<<FRACBITS),
player->mo->y + (P_RandomRange(-32,32)<<FRACBITS),
player->mo->z + (player->mo->height/2) + (P_RandomRange(-24,24)<<FRACBITS),
MT_FASTLINE);
fast->angle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy);
fast->momx = player->mo->momx/2;
fast->momy = player->mo->momy/2;
fast->momz = player->mo->momz/2;
}
if (player->kartstuff[k_eggmanexplode]) // You're gonna diiiiie
{
const INT32 flashtime = 4<<(player->kartstuff[k_eggmanexplode]/TICRATE);