angel island drift strat plus ketchup

This commit is contained in:
toaster 2018-09-14 00:19:23 +01:00
parent 32d64a8282
commit fadef55b1e
5 changed files with 97 additions and 8 deletions

View file

@ -305,6 +305,7 @@ typedef enum
k_accelboost, // Boost value smoothing for acceleration
k_boostcam, // Camera push forward on boost
k_destboostcam, // Ditto
k_aizdriftstrat, // Let go of your drift while boosting? Helper for the SICK STRATZ you have just unlocked
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
k_roulettetype, // Used for the roulette, for deciding type (currently only used for Battle, to give you better items from Karma items)

View file

@ -6271,6 +6271,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_KARTFIRE7",
"S_KARTFIRE8",
// Angel Island Drift Strat Dust (what a mouthful!)
"S_KARTAIZDRIFTSTRAT",
// Invincibility Sparks
"S_KARTINVULN_SMALL1",
"S_KARTINVULN_SMALL2",
@ -7220,6 +7223,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_BOOSTFLAME",
"MT_BOOSTSMOKE",
"MT_SNEAKERTRAIL",
"MT_AIZDRIFTSTRAT",
"MT_SPARKLETRAIL",
"MT_INVULNFLASH",
"MT_WIPEOUTTRAIL",

View file

@ -60,7 +60,7 @@ char sprnames[NUMSPRITES + 1][5] =
"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"
"ITMN","WANT","PBOM","RETI","AIDU","VIEW"
};
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
@ -2601,6 +2601,8 @@ state_t states[NUMSTATES] =
{SPR_KFRE, FF_FULLBRIGHT|5, 2, {NULL}, 0, 0, S_KARTFIRE8}, // S_KARTFIRE7
{SPR_KFRE, FF_FULLBRIGHT|6, 2, {NULL}, 0, 0, S_NULL}, // S_KARTFIRE8
{SPR_AIDU, FF_ANIMATE|FF_PAPERSPRITE, 5*2, {NULL}, 5, 2, S_NULL}, // S_KARTAIZDRIFTSTRAT
{SPR_KINV, FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_KARTINVULN_SMALL2}, // S_KARTINVULN_SMALL1
{SPR_KINV, FF_FULLBRIGHT|1, 1, {NULL}, 0, 0, S_KARTINVULN_SMALL3}, // S_KARTINVULN_SMALL2
{SPR_KINV, FF_FULLBRIGHT|2, 1, {NULL}, 0, 0, S_KARTINVULN_SMALL4}, // S_KARTINVULN_SMALL3
@ -14509,6 +14511,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_AIZDRIFTSTRAT
-1, // doomednum
S_KARTAIZDRIFTSTRAT,// spawnstate
1, // 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|MF_SCENERY, // flags
S_NULL // raisestate
},
{ // MT_SPARKLETRAIL
-1, // doomednum
S_KARTINVULN_SMALL1, // spawnstate

View file

@ -641,6 +641,8 @@ typedef enum sprite
SPR_PBOM, // player bomb
SPR_RETI, // player reticule
SPR_AIDU,
SPR_VIEW, // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw!
SPR_FIRSTFREESLOT,
@ -3118,6 +3120,9 @@ typedef enum state
S_KARTFIRE7,
S_KARTFIRE8,
// Angel Island Drift Strat Dust (what a mouthful!)
S_KARTAIZDRIFTSTRAT,
// Invincibility Sparks
S_KARTINVULN_SMALL1,
S_KARTINVULN_SMALL2,
@ -4084,6 +4089,7 @@ typedef enum mobj_type
MT_BOOSTFLAME,
MT_BOOSTSMOKE,
MT_SNEAKERTRAIL,
MT_AIZDRIFTSTRAT,
MT_SPARKLETRAIL,
MT_INVULNFLASH,
MT_WIPEOUTTRAIL,

View file

@ -2271,7 +2271,7 @@ static void K_SpawnDriftSparks(player_t *player)
if (player->kartstuff[k_driftcharge] <= (K_GetKartDriftSparkValue(player)*2)+(32*3))
spark->color = SKINCOLOR_DUSK; // transition
else
spark->color = SKINCOLOR_RUBY;
spark->color = SKINCOLOR_KETCHUP;
}
else
spark->color = SKINCOLOR_SAPPHIRE;
@ -2306,6 +2306,46 @@ static void K_SpawnDriftSparks(player_t *player)
}
}
static void K_SpawnAIZDust(player_t *player)
{
fixed_t newx;
fixed_t newy;
mobj_t *spark;
angle_t travelangle;
I_Assert(player != NULL);
I_Assert(player->mo != NULL);
I_Assert(!P_MobjWasRemoved(player->mo));
if (leveltime % 2 == 1)
return;
if (!P_IsObjectOnGround(player->mo))
return;
travelangle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy);
{
newx = player->mo->x + P_ReturnThrustX(player->mo, travelangle - (player->kartstuff[k_aizdriftstrat]*ANGLE_45), FixedMul(24*FRACUNIT, player->mo->scale));
newy = player->mo->y + P_ReturnThrustY(player->mo, travelangle - (player->kartstuff[k_aizdriftstrat]*ANGLE_45), FixedMul(24*FRACUNIT, player->mo->scale));
spark = P_SpawnMobj(newx, newy, player->mo->z, MT_AIZDRIFTSTRAT);
spark->angle = travelangle+(player->kartstuff[k_aizdriftstrat]*ANGLE_90);
P_SetScale(spark, (spark->destscale = (3*player->mo->scale)>>2));
spark->momx = (6*player->mo->momx)/5;
spark->momy = (6*player->mo->momy)/5;
//spark->momz = player->mo->momz/2;
spark->flags2 = (spark->flags2 & ~MF2_DONTDRAW)|(player->mo->eflags & MF2_DONTDRAW);
spark->eflags = (spark->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP);
spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP1)|(player->mo->eflags & MFE_DRAWONLYFORP1);
spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP2)|(player->mo->eflags & MFE_DRAWONLYFORP2);
spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP3)|(player->mo->eflags & MFE_DRAWONLYFORP3);
spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP4)|(player->mo->eflags & MFE_DRAWONLYFORP4);
}
}
void K_SpawnBoostTrail(player_t *player)
{
fixed_t newx;
@ -3947,16 +3987,14 @@ static void K_KartDrift(player_t *player, boolean onground)
{
// Starting left drift
player->kartstuff[k_drift] = 1;
player->kartstuff[k_driftend] = 0;
player->kartstuff[k_driftcharge] = 0;
player->kartstuff[k_driftend] = player->kartstuff[k_driftcharge] = 0;
}
else if ((player->cmd.driftturn < 0) && player->speed > FixedMul(10<<16, player->mo->scale) && player->kartstuff[k_jmp] == 1
&& (player->kartstuff[k_drift] == 0 || player->kartstuff[k_driftend] == 1)) // && player->kartstuff[k_drift] != -1)
{
// Starting right drift
player->kartstuff[k_drift] = -1;
player->kartstuff[k_driftend] = 0;
player->kartstuff[k_driftcharge] = 0;
player->kartstuff[k_driftend] = player->kartstuff[k_driftcharge] = 0;
}
else if (player->kartstuff[k_jmp] == 0) // || player->kartstuff[k_turndir] == 0)
{
@ -4015,9 +4053,20 @@ static void K_KartDrift(player_t *player, boolean onground)
if (player->kartstuff[k_spinouttimer] > 0 // banana peel
|| player->speed < FixedMul(10<<16, player->mo->scale)) // you're too slow!
{
player->kartstuff[k_drift] = 0;
player->kartstuff[k_driftcharge] = 0;
player->kartstuff[k_drift] = player->kartstuff[k_driftcharge] = player->kartstuff[k_aizdriftstrat] = 0;
}
if ((!player->kartstuff[k_sneakertimer])
|| (!player->cmd.driftturn)
|| (player->cmd.driftturn > 0) != (player->kartstuff[k_aizdriftstrat] > 0))
{
if (!player->kartstuff[k_drift])
player->kartstuff[k_aizdriftstrat] = 0;
else
player->kartstuff[k_aizdriftstrat] = ((player->kartstuff[k_drift] > 0) ? 1 : -1);
}
else if (player->kartstuff[k_aizdriftstrat] && !player->kartstuff[k_drift])
K_SpawnAIZDust(player);
}
//
// K_KartUpdatePosition