May not make it to R1, but oh well
This commit is contained in:
TehRealSalt 2018-10-18 04:43:50 -04:00
parent 1f1ba26aa7
commit 8d6e203bd2
15 changed files with 167 additions and 306 deletions

Binary file not shown.

View file

@ -327,7 +327,6 @@ typedef enum
k_squishedtimer, // Squished frame timer k_squishedtimer, // Squished frame timer
k_rocketsneakertimer, // Rocket Sneaker duration timer k_rocketsneakertimer, // Rocket Sneaker duration timer
k_invincibilitytimer, // Invincibility timer k_invincibilitytimer, // Invincibility timer
k_deathsentence, // 30 seconds to live... (SPB murder timer (not actually 30 sec, I just couldn't help the FF reference :p))
k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items
k_eggmanexplode, // Fake item recieved, explode in a few seconds k_eggmanexplode, // Fake item recieved, explode in a few seconds
k_eggmanblame, // Fake item recieved, who set this fake k_eggmanblame, // Fake item recieved, who set this fake

View file

@ -1835,6 +1835,7 @@ static actionpointer_t actionpointers[] =
{{A_ItemPop}, "A_ITEMPOP"}, // SRB2kart {{A_ItemPop}, "A_ITEMPOP"}, // SRB2kart
{{A_JawzChase}, "A_JAWZCHASE"}, // SRB2kart {{A_JawzChase}, "A_JAWZCHASE"}, // SRB2kart
{{A_JawzExplode}, "A_JAWZEXPLODE"}, // SRB2kart {{A_JawzExplode}, "A_JAWZEXPLODE"}, // SRB2kart
{{A_SPBChase}, "A_SPBCHASE"}, // SRB2kart
{{A_MineExplode}, "A_MINEEXPLODE"}, // SRB2kart {{A_MineExplode}, "A_MINEEXPLODE"}, // SRB2kart
{{A_BallhogExplode}, "A_BALLHOGEXPLODE"}, // SRB2kart {{A_BallhogExplode}, "A_BALLHOGEXPLODE"}, // SRB2kart
{{A_LightningFollowPlayer}, "A_LIGHTNINGFOLLOWPLAYER"}, //SRB2kart {{A_LightningFollowPlayer}, "A_LIGHTNINGFOLLOWPLAYER"}, //SRB2kart
@ -6467,17 +6468,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_BALLHOGBOOM16", "S_BALLHOGBOOM16",
// Self-Propelled Bomb - just an explosion for now... // Self-Propelled Bomb - just an explosion for now...
"S_BLUELIGHTNING1", "S_SPB",
"S_BLUELIGHTNING2", "S_SPB_DEAD",
"S_BLUELIGHTNING3",
"S_BLUELIGHTNING4",
"S_BLUEEXPLODE",
// Grow/shrink beams
"S_LIGHTNING1",
"S_LIGHTNING2",
"S_LIGHTNING3",
"S_LIGHTNING4",
// Thunder Shield // Thunder Shield
"S_THUNDERSHIELD1", "S_THUNDERSHIELD1",
@ -7321,9 +7313,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_BALLHOG", // Ballhog "MT_BALLHOG", // Ballhog
"MT_BALLHOGBOOM", "MT_BALLHOGBOOM",
"MT_BLUELIGHTNING", // Grow/shrink stuff "MT_SPB", // Self-Propelled Bomb
"MT_BLUEEXPLOSION", "MT_SPBEXPLOSION",
"MT_LIGHTNING",
"MT_THUNDERSHIELD", // Thunder Shield stuff "MT_THUNDERSHIELD", // Thunder Shield stuff
@ -7787,7 +7778,6 @@ static const char *const KARTSTUFF_LIST[] = {
"SQUISHEDTIMER", "SQUISHEDTIMER",
"ROCKETSNEAKERTIMER", "ROCKETSNEAKERTIMER",
"INVINCIBILITYTIMER", "INVINCIBILITYTIMER",
"DEATHSENTENCE",
"EGGMANHELD", "EGGMANHELD",
"EGGMANEXPLODE", "EGGMANEXPLODE",
"EGGMANBLAME", "EGGMANBLAME",

View file

@ -458,8 +458,6 @@ extern boolean comeback;
extern SINT8 battlewanted[4]; extern SINT8 battlewanted[4];
extern tic_t wantedcalcdelay; extern tic_t wantedcalcdelay;
extern tic_t indirectitemcooldown; extern tic_t indirectitemcooldown;
extern tic_t spbincoming;
extern UINT8 spbplayer;
extern tic_t mapreset; extern tic_t mapreset;
extern boolean legitimateexit; extern boolean legitimateexit;

View file

@ -264,8 +264,6 @@ SINT8 pickedvote; // What vote the host rolls
SINT8 battlewanted[4]; // WANTED players in battle, worth x2 points SINT8 battlewanted[4]; // WANTED players in battle, worth x2 points
tic_t wantedcalcdelay; // Time before it recalculates WANTED tic_t wantedcalcdelay; // Time before it recalculates WANTED
tic_t indirectitemcooldown; // Cooldown before any more Shrink, SPB, or any other item that works indirectly is awarded tic_t indirectitemcooldown; // Cooldown before any more Shrink, SPB, or any other item that works indirectly is awarded
tic_t spbincoming; // Timer before SPB hits, can switch targets at this point
UINT8 spbplayer; // Player num that used the last SPB
tic_t mapreset; // Map reset delay when enough players have joined an empty game tic_t mapreset; // Map reset delay when enough players have joined an empty game
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players) // Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)

View file

@ -57,11 +57,11 @@ char sprnames[NUMSPRITES + 1][5] =
//SRB2kart Sprites //SRB2kart Sprites
"SPRG","BSPR","RNDM","RPOP","SGNS","FAST","DSHR","BOST","BOSM","KFRE", "SPRG","BSPR","RNDM","RPOP","SGNS","FAST","DSHR","BOST","BOSM","KFRE",
"KINV","KINF","WIPD","DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN", "KINV","KINF","WIPD","DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN",
"KRBM","BHOG","BHBM","BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL", "KRBM","BHOG","BHBM","SPBM","THNS","SINK","SITR","KBLN","DEZL","POKE",
"POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO", "AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO","CRAB",
"CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO", "SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO","ITEM",
"ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK","LZI1", "ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK","LZI1","LZI2",
"LZI2","KLIT","VIEW" "KLIT","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)
@ -2772,16 +2772,8 @@ state_t states[NUMSTATES] =
{SPR_BHBM, FF_FULLBRIGHT|14, 1, {NULL}, 0, 0, S_BALLHOGBOOM16}, // S_BALLHOGBOOM15 {SPR_BHBM, FF_FULLBRIGHT|14, 1, {NULL}, 0, 0, S_BALLHOGBOOM16}, // S_BALLHOGBOOM15
{SPR_BHBM, FF_FULLBRIGHT|15, 1, {NULL}, 0, 0, S_NULL}, // S_BALLHOGBOOM16 {SPR_BHBM, FF_FULLBRIGHT|15, 1, {NULL}, 0, 0, S_NULL}, // S_BALLHOGBOOM16
{SPR_BLIG, 0, 2, {NULL}, 0, 0, S_BLUELIGHTNING2}, // S_BLUELIGHTNING1 {SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB}, // S_SPB
{SPR_BLIG, 1, 2, {NULL}, 0, 0, S_BLUELIGHTNING3}, // S_BLUELIGHTNING2 {SPR_SPBM, 0, 175, {NULL}, 0, 0, S_NULL}, // S_SPB_DEAD
{SPR_BLIG, 2, 2, {NULL}, 0, 0, S_BLUELIGHTNING4}, // S_BLUELIGHTNING3
{SPR_BLIG, 3, 2, {NULL}, 0, 0, S_NULL}, // S_BLUELIGHTNING4
{SPR_SSMN, 0, 1, {A_MineExplode}, MT_BLUEEXPLOSION, 0, S_NULL}, // S_BLUEEXPLODE
{SPR_LIGH, 0, 2, {NULL}, 0, 0, S_LIGHTNING2}, // S_LIGHTNING1
{SPR_LIGH, 1, 2, {NULL}, 0, 0, S_LIGHTNING3}, // S_LIGHTNING2
{SPR_LIGH, 2, 2, {NULL}, 0, 0, S_LIGHTNING4}, // S_LIGHTNING3
{SPR_LIGH, 3, 2, {NULL}, 0, 0, S_NULL}, // S_LIGHTNING4
{SPR_THNS, FF_FULLBRIGHT|9, 2, {NULL}, 0, 0, S_THUNDERSHIELD2}, // S_THUNDERSHIELD1 {SPR_THNS, FF_FULLBRIGHT|9, 2, {NULL}, 0, 0, S_THUNDERSHIELD2}, // S_THUNDERSHIELD1
{SPR_THNS, FF_FULLBRIGHT|10, 2, {NULL}, 0, 0, S_THUNDERSHIELD3}, // S_THUNDERSHIELD2 {SPR_THNS, FF_FULLBRIGHT|10, 2, {NULL}, 0, 0, S_THUNDERSHIELD3}, // S_THUNDERSHIELD2
@ -15109,7 +15101,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
8, // reactiontime 8, // reactiontime
sfx_None, // attacksound sfx_None, // attacksound
S_NULL, // painstate S_NULL, // painstate
320*FRACUNIT, // painchance 288*FRACUNIT, // painchance
sfx_None, // painsound sfx_None, // painsound
S_NULL, // meleestate S_NULL, // meleestate
S_NULL, // missilestate S_NULL, // missilestate
@ -15316,34 +15308,34 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate S_NULL // raisestate
}, },
{ // MT_BLUELIGHTNING { // MT_SPB
-1, // doomednum -1, // doomednum
S_BLUELIGHTNING1, // spawnstate S_SPB, // spawnstate
1000, // spawnhealth 1, // spawnhealth
S_NULL, // seestate S_NULL, // seestate
sfx_None, // seesound sfx_tossed, // seesound
8, // reactiontime 8, // reactiontime
sfx_None, // attacksound sfx_kc57, // attacksound
S_NULL, // painstate S_NULL, // painstate
0, // painchance 0, // painchance
sfx_None, // painsound sfx_None, // painsound
S_NULL, // meleestate S_NULL, // meleestate
S_NULL, // missilestate S_NULL, // missilestate
S_NULL, // deathstate S_SPB_DEAD, // deathstate
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_None, // deathsound sfx_s3k5d, // deathsound
8, // speed 64*FRACUNIT, // speed
64*FRACUNIT, // radius 16*FRACUNIT, // radius
64*FRACUNIT, // height 32*FRACUNIT, // height
0, // display offset 0, // display offset
16, // mass 100, // mass
0, // damage 1, // damage
sfx_None, // activesound sfx_kc64, // activesound
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY|MF_DONTENCOREMAP, // flags MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_DONTENCOREMAP, // flags
S_NULL // raisestate S_NULL // raisestate
}, },
{ // MT_BLUEEXPLOSION { // MT_SPBEXPLOSION
-1, // doomednum -1, // doomednum
S_INVISIBLE, // spawnstate S_INVISIBLE, // spawnstate
1, // spawnhealth 1, // spawnhealth
@ -15352,7 +15344,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
8, // reactiontime 8, // reactiontime
sfx_None, // attacksound sfx_None, // attacksound
S_NULL, // painstate S_NULL, // painstate
256*FRACUNIT, // painchance 288*FRACUNIT, // painchance
sfx_None, // painsound sfx_None, // painsound
S_NULL, // meleestate S_NULL, // meleestate
S_NULL, // missilestate S_NULL, // missilestate
@ -15370,33 +15362,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate S_NULL // raisestate
}, },
{ // MT_LIGHTNING
-1, // doomednum
S_LIGHTNING1, // 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
64*FRACUNIT, // radius
64*FRACUNIT, // height
0, // display offset
16, // mass
0, // damage
sfx_None, // activesound
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY|MF_DONTENCOREMAP, // flags
S_NULL // raisestate
},
{ // MT_THUNDERSHIELD { // MT_THUNDERSHIELD
-1, // doomednum -1, // doomednum
S_THUNDERSHIELD1, // spawnstate S_THUNDERSHIELD1, // spawnstate

View file

@ -166,6 +166,7 @@ void A_ToggleFlameJet();
void A_ItemPop(); // SRB2kart void A_ItemPop(); // SRB2kart
void A_JawzChase(); // SRB2kart void A_JawzChase(); // SRB2kart
void A_JawzExplode(); // SRB2kart void A_JawzExplode(); // SRB2kart
void A_SPBChase(); // SRB2kart
void A_MineExplode(); // SRB2kart void A_MineExplode(); // SRB2kart
void A_BallhogExplode(); // SRB2kart void A_BallhogExplode(); // SRB2kart
void A_LightningFollowPlayer(); // SRB2kart: Lightning shield effect player chasing void A_LightningFollowPlayer(); // SRB2kart: Lightning shield effect player chasing
@ -604,8 +605,7 @@ typedef enum sprite
SPR_KRBM, // SS Mine BOOM SPR_KRBM, // SS Mine BOOM
SPR_BHOG, // Ballhog SPR_BHOG, // Ballhog
SPR_BHBM, // Ballhog BOOM SPR_BHBM, // Ballhog BOOM
SPR_BLIG, // Self-Propelled Bomb SPR_SPBM, // Self-Propelled Bomb
SPR_LIGH, // Grow/shrink beams (Metallic Maddness)
SPR_THNS, // Thunder Shield SPR_THNS, // Thunder Shield
SPR_SINK, // Kitchen Sink SPR_SINK, // Kitchen Sink
SPR_SITR, // Kitchen Sink Trail SPR_SITR, // Kitchen Sink Trail
@ -3310,18 +3310,9 @@ typedef enum state
S_BALLHOGBOOM15, S_BALLHOGBOOM15,
S_BALLHOGBOOM16, S_BALLHOGBOOM16,
// Self-Propelled Bomb - just an explosion for now... // Self-Propelled Bomb
S_BLUELIGHTNING1, S_SPB,
S_BLUELIGHTNING2, S_SPB_DEAD,
S_BLUELIGHTNING3,
S_BLUELIGHTNING4,
S_BLUEEXPLODE,
// Grow/Shrink
S_LIGHTNING1,
S_LIGHTNING2,
S_LIGHTNING3,
S_LIGHTNING4,
// Thunder Shield // Thunder Shield
S_THUNDERSHIELD1, S_THUNDERSHIELD1,
@ -4182,9 +4173,8 @@ typedef enum mobj_type
MT_BALLHOG, // Ballhog MT_BALLHOG, // Ballhog
MT_BALLHOGBOOM, MT_BALLHOGBOOM,
MT_BLUELIGHTNING, // Grow/shrink stuff MT_SPB, // SPB stuff
MT_BLUEEXPLOSION, MT_SPBEXPLOSION,
MT_LIGHTNING,
MT_THUNDERSHIELD, // Thunder Shield stuff MT_THUNDERSHIELD, // Thunder Shield stuff

View file

@ -28,8 +28,6 @@
// comeback is Battle Mode's karma comeback, also bool // comeback is Battle Mode's karma comeback, also bool
// battlewanted is an array of the WANTED player nums, -1 for no player in that slot // battlewanted is an array of the WANTED player nums, -1 for no player in that slot
// indirectitemcooldown is timer before anyone's allowed another Shrink/SPB // indirectitemcooldown is timer before anyone's allowed another Shrink/SPB
// spbincoming is the timer before k_deathsentence is cast on the player in 1st
// spbplayer is the last player who fired a SPB
// mapreset is set when enough players fill an empty server // mapreset is set when enough players fill an empty server
@ -2190,7 +2188,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
height = source->height>>FRACBITS; height = source->height>>FRACBITS;
if (!color) if (!color)
color = SKINCOLOR_RED; color = SKINCOLOR_KETCHUP;
for (i = 0; i < 32; i++) for (i = 0; i < 32; i++)
{ {
@ -2733,7 +2731,7 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
} }
else else
{ {
if (dir == -1) if (dir == -1 && mapthing != MT_SPB)
{ {
// Shoot backward // Shoot backward
mo = K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180, 0, PROJSPEED/4); mo = K_SpawnKartMissile(player->mo, mapthing, player->mo->angle + ANGLE_180, 0, PROJSPEED/4);
@ -3016,38 +3014,6 @@ static void K_DoShrink(player_t *player)
} }
} }
static void K_DoSPB(player_t *victim)
{
//INT32 i;
S_StartSound(victim->mo, sfx_bkpoof); // Sound the BANG!
/*for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i])
P_FlashPal(&players[i], PAL_NUKE, 10);
}*/
if (!victim->mo || !victim->mo->health || victim->spectator)
return;
{
mobj_t *spbexplode;
if (!victim->kartstuff[k_invincibilitytimer] && !victim->kartstuff[k_growshrinktimer])
{
K_DropHnextList(victim);
K_StripItems(victim);
victim->powers[pw_flashing] = 0;
}
spbexplode = P_SpawnMobj(victim->mo->x, victim->mo->y, victim->mo->z, MT_BLUEEXPLOSION);
if (playeringame[spbplayer] && !players[spbplayer].spectator && players[spbplayer].mo)
P_SetTarget(&spbexplode->target, players[spbplayer].mo);
}
}
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound) void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound)
{ {
const fixed_t vscale = mapheaderinfo[gamemap-1]->mobj_scale + (mo->scale - mapheaderinfo[gamemap-1]->mobj_scale); const fixed_t vscale = mapheaderinfo[gamemap-1]->mobj_scale + (mo->scale - mapheaderinfo[gamemap-1]->mobj_scale);
@ -3923,13 +3889,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
if (player->kartstuff[k_justbumped]) if (player->kartstuff[k_justbumped])
player->kartstuff[k_justbumped]--; player->kartstuff[k_justbumped]--;
if (player->kartstuff[k_deathsentence])
{
if (player->kartstuff[k_deathsentence] == 1)
K_DoSPB(player);
player->kartstuff[k_deathsentence]--;
}
if (player->kartstuff[k_lapanimation]) if (player->kartstuff[k_lapanimation])
player->kartstuff[k_lapanimation]--; player->kartstuff[k_lapanimation]--;
@ -3991,7 +3950,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
{ {
mobj_t *eggsexplode; mobj_t *eggsexplode;
player->powers[pw_flashing] = 0; player->powers[pw_flashing] = 0;
eggsexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUEEXPLOSION); eggsexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_SPBEXPLOSION);
if (player->kartstuff[k_eggmanblame] >= 0 if (player->kartstuff[k_eggmanblame] >= 0
&& player->kartstuff[k_eggmanblame] < MAXPLAYERS && player->kartstuff[k_eggmanblame] < MAXPLAYERS
&& playeringame[player->kartstuff[k_eggmanblame]] && playeringame[player->kartstuff[k_eggmanblame]]
@ -4799,45 +4758,14 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
{ {
player->kartstuff[k_itemamount]--; player->kartstuff[k_itemamount]--;
K_ThrowKartItem(player, true, MT_BALLHOG, 1, 0); K_ThrowKartItem(player, true, MT_BALLHOG, 1, 0);
S_StartSound(player->mo, sfx_mario7);
K_PlayAttackTaunt(player->mo); K_PlayAttackTaunt(player->mo);
} }
break; break;
case KITEM_SPB: case KITEM_SPB:
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO) if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO)
{ {
UINT8 ploop;
UINT8 bestrank = 0;
fixed_t dist = 0;
for (ploop = 0; ploop < MAXPLAYERS; ploop++)
{
fixed_t thisdist;
if (!playeringame[ploop] || players[ploop].spectator)
continue;
if (&players[ploop] == player)
continue;
if (!players[ploop].mo)
continue;
if (players[ploop].exiting)
continue;
thisdist = R_PointToDist2(player->mo->x, player->mo->y, players[ploop].mo->x, players[ploop].mo->y);
if (bestrank == 0 || players[ploop].kartstuff[k_position] < bestrank)
{
bestrank = players[ploop].kartstuff[k_position];
dist = thisdist;
}
}
if (dist == 0)
spbincoming = 6*TICRATE; // If you couldn't find anyone, just set an abritary timer
else
spbincoming = (tic_t)max(1, FixedDiv(dist, 64*FRACUNIT)/FRACUNIT);
spbplayer = player-players;
player->kartstuff[k_itemamount]--; player->kartstuff[k_itemamount]--;
K_ThrowKartItem(player, true, MT_SPB, 1, 0);
K_PlayAttackTaunt(player->mo); K_PlayAttackTaunt(player->mo);
} }
break; break;
@ -4949,9 +4877,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (player->kartstuff[k_itemtype] == KITEM_SPB if (player->kartstuff[k_itemtype] == KITEM_SPB
|| player->kartstuff[k_itemtype] == KITEM_SHRINK || player->kartstuff[k_itemtype] == KITEM_SHRINK
|| player->kartstuff[k_growshrinktimer] < 0 || player->kartstuff[k_growshrinktimer] < 0)
|| spbincoming) indirectitemcooldown = 30*TICRATE;
indirectitemcooldown = 20*TICRATE;
if (player->kartstuff[k_hyudorotimer] > 0) if (player->kartstuff[k_hyudorotimer] > 0)
{ {
@ -5436,7 +5363,6 @@ static patch_t *kp_sadface[2];
static patch_t *kp_check[6]; static patch_t *kp_check[6];
static patch_t *kp_spbwarning[2];
static patch_t *kp_eggnum[4]; static patch_t *kp_eggnum[4];
static patch_t *kp_fpview[3]; static patch_t *kp_fpview[3];
@ -5593,10 +5519,6 @@ void K_LoadKartHUDGraphics(void)
kp_check[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX); kp_check[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
} }
// SPB warning
kp_spbwarning[0] = W_CachePatchName("K_SPBW1", PU_HUDGFX);
kp_spbwarning[1] = W_CachePatchName("K_SPBW2", PU_HUDGFX);
// Eggman warning numbers // Eggman warning numbers
sprintf(buffer, "K_EGGNx"); sprintf(buffer, "K_EGGNx");
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
@ -5718,7 +5640,6 @@ INT32 FACE_X, FACE_Y; // Top-four Faces
INT32 STCD_X, STCD_Y; // Starting countdown INT32 STCD_X, STCD_Y; // Starting countdown
INT32 CHEK_Y; // CHECK graphic INT32 CHEK_Y; // CHECK graphic
INT32 MINI_X, MINI_Y; // Minimap INT32 MINI_X, MINI_Y; // Minimap
INT32 SPBW_X, SPBW_Y; // SPB warning
INT32 WANT_X, WANT_Y; // Battle WANTED poster INT32 WANT_X, WANT_Y; // Battle WANTED poster
static void K_initKartHUD(void) static void K_initKartHUD(void)
@ -5784,9 +5705,6 @@ static void K_initKartHUD(void)
// Minimap // Minimap
MINI_X = BASEVIDWIDTH - 50; // 270 MINI_X = BASEVIDWIDTH - 50; // 270
MINI_Y = (BASEVIDHEIGHT/2)-16; // 84 MINI_Y = (BASEVIDHEIGHT/2)-16; // 84
// Blue Shell warning
SPBW_X = BASEVIDWIDTH/2; // 270
SPBW_Y = BASEVIDHEIGHT- 24; // 176
// Battle WANTED poster // Battle WANTED poster
WANT_X = BASEVIDWIDTH - 55; // 270 WANT_X = BASEVIDWIDTH - 55; // 270
WANT_Y = BASEVIDHEIGHT- 71; // 176 WANT_Y = BASEVIDHEIGHT- 71; // 176
@ -5804,8 +5722,6 @@ static void K_initKartHUD(void)
MINI_Y = (BASEVIDHEIGHT/2); MINI_Y = (BASEVIDHEIGHT/2);
SPBW_Y = (BASEVIDHEIGHT/2)-8;
WANT_X = BASEVIDWIDTH-8; WANT_X = BASEVIDWIDTH-8;
WANT_Y = (BASEVIDHEIGHT/2)-12; WANT_Y = (BASEVIDHEIGHT/2)-12;
@ -5824,8 +5740,6 @@ static void K_initKartHUD(void)
MINI_X = (3*BASEVIDWIDTH/4); MINI_X = (3*BASEVIDWIDTH/4);
MINI_Y = (3*BASEVIDHEIGHT/4); MINI_Y = (3*BASEVIDHEIGHT/4);
SPBW_X = BASEVIDWIDTH/4;
WANT_X = (BASEVIDWIDTH/2)-8; WANT_X = (BASEVIDWIDTH/2)-8;
if (splitscreen > 2) // 4P-only if (splitscreen > 2) // 4P-only
@ -6449,23 +6363,6 @@ static void K_drawKartBumpersOrKarma(void)
} }
} }
static void K_drawSPBWarning(void)
{
patch_t *localpatch = kp_nodraw;
INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM);
if (!(stplyr->kartstuff[k_deathsentence] > 0
|| (spbincoming > 0 && spbincoming < 2*TICRATE && stplyr->kartstuff[k_position] == 1)))
return;
if (leveltime % 8 > 3)
localpatch = kp_spbwarning[1];
else
localpatch = kp_spbwarning[0];
V_DrawScaledPatch(SPBW_X, SPBW_Y, splitflags, localpatch);
}
fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my) fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my)
{ {
fixed_t dist, x; fixed_t dist, x;
@ -7504,9 +7401,6 @@ void K_drawKartHUD(void)
// Draw the input UI // Draw the input UI
K_drawInput(); K_drawInput();
} }
// You're about to DIEEEEE
K_drawSPBWarning();
} }
else if (G_BattleGametype()) // Battle-only else if (G_BattleGametype()) // Battle-only
{ {

View file

@ -190,6 +190,7 @@ void A_ToggleFlameJet(mobj_t *actor);
void A_ItemPop(mobj_t *actor); // SRB2kart void A_ItemPop(mobj_t *actor); // SRB2kart
void A_JawzChase(mobj_t *actor); // SRB2kart void A_JawzChase(mobj_t *actor); // SRB2kart
void A_JawzExplode(mobj_t *actor); // SRB2kart void A_JawzExplode(mobj_t *actor); // SRB2kart
void A_SPBChase(mobj_t *actor); // SRB2kart
void A_MineExplode(mobj_t *actor); // SRB2kart void A_MineExplode(mobj_t *actor); // SRB2kart
void A_BallhogExplode(mobj_t *actor); // SRB2kart void A_BallhogExplode(mobj_t *actor); // SRB2kart
void A_LightningFollowPlayer(mobj_t *actor); // SRB2kart void A_LightningFollowPlayer(mobj_t *actor); // SRB2kart
@ -4053,7 +4054,7 @@ void A_MineExplode(mobj_t *actor)
if (actor->target && actor->target->player) if (actor->target && actor->target->player)
K_SpawnMineExplosion(actor, actor->target->player->skincolor); K_SpawnMineExplosion(actor, actor->target->player->skincolor);
else else
K_SpawnMineExplosion(actor, SKINCOLOR_RED); K_SpawnMineExplosion(actor, SKINCOLOR_KETCHUP);
P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND); P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND);
} }
@ -8173,7 +8174,7 @@ void A_ToggleFlameJet(mobj_t* actor)
} }
} }
//{ SRB2kart - A_ItemPop, A_JawzChase, A_JawzExplode, A_MineExplode, and A_BallhogExplode //{ SRB2kart - A_ItemPop, A_JawzChase, A_JawzExplode, A_SPBChase, A_MineExplode, and A_BallhogExplode
void A_ItemPop(mobj_t *actor) void A_ItemPop(mobj_t *actor)
{ {
mobj_t *remains; mobj_t *remains;
@ -8293,7 +8294,7 @@ void A_JawzExplode(mobj_t *actor)
truc = P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOOMEXPLODE); truc = P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOOMEXPLODE);
truc->scale = actor->scale*2; truc->scale = actor->scale*2;
truc->color = SKINCOLOR_RED; truc->color = SKINCOLOR_KETCHUP;
while (shrapnel) while (shrapnel)
{ {
@ -8311,7 +8312,7 @@ void A_JawzExplode(mobj_t *actor)
speed2 = FixedMul(15*FRACUNIT, actor->scale)>>FRACBITS; speed2 = FixedMul(15*FRACUNIT, actor->scale)>>FRACBITS;
truc->momz = P_RandomRange(speed, speed2)*FRACUNIT; truc->momz = P_RandomRange(speed, speed2)*FRACUNIT;
truc->tics = TICRATE*2; truc->tics = TICRATE*2;
truc->color = SKINCOLOR_RED; truc->color = SKINCOLOR_KETCHUP;
shrapnel--; shrapnel--;
} }
@ -8319,65 +8320,99 @@ void A_JawzExplode(mobj_t *actor)
return; return;
} }
/* old A_MineExplode - see elsewhere in the file void A_SPBChase(mobj_t *actor)
void A_MineExplode(mobj_t *actor)
{ {
mobj_t *mo2; player_t *player = NULL;
thinker_t *th; UINT8 i;
INT32 d; UINT8 bestrank = UINT8_MAX;
INT32 locvar1 = var1; fixed_t dist;
mobjtype_t type; angle_t hang, vang;
fixed_t range;
#ifdef HAVE_BLUA #ifdef HAVE_BLUA
if (LUA_CallAction("A_MineExplode", actor)) if (LUA_CallAction("A_SPBChase", actor))
return; return;
#endif #endif
type = (mobjtype_t)locvar1; if (actor->threshold)
range = FixedMul(actor->info->painchance, mapheaderinfo[gamemap-1]->mobj_scale);
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{ {
if (P_MobjWasRemoved(actor)) P_InstaThrust(actor, actor->angle, actor->info->speed);
return; // There's the possibility these can chain react onto themselves after they've already died if there are enough all in one spot return;
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
if (mo2 == actor || mo2->type == MT_MINEEXPLOSIONSOUND) // Don't explode yourself! Endless loop!
continue;
if (!(mo2->flags & MF_SHOOTABLE) || (mo2->flags & MF_SCENERY))
continue;
if (G_BattleGametype() && actor->target && actor->target->player && actor->target->player->kartstuff[k_bumper] <= 0 && mo2 == actor->target)
continue;
if (P_AproxDistance(P_AproxDistance(mo2->x - actor->x, mo2->y - actor->y), mo2->z - actor->z) > range)
continue;
actor->flags2 |= MF2_DEBRIS;
if (mo2->player) // Looks like we're going to have to need a seperate function for this too
K_ExplodePlayer(mo2->player, actor->target);
else
P_DamageMobj(mo2, actor, actor->target, 1);
} }
for (d = 0; d < 16; d++) if (actor->extravalue1)
K_SpawnKartExplosion(actor->x, actor->y, actor->z, range + 32*mapheaderinfo[gamemap-1]->mobj_scale, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64 {
if (actor->tracer && actor->tracer->health && actor->tracer->player)
{
fixed_t maxspeed = K_GetKartSpeed(actor->tracer->player, false) - (actor->tracer->scale);
if (actor->target && actor->target->player) if (!S_SoundPlaying(actor, actor->info->activesound))
K_SpawnMineExplosion(actor, actor->target->player->skincolor); S_StartSound(actor, actor->info->activesound);
else
K_SpawnMineExplosion(actor, SKINCOLOR_RED);
P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND); dist = P_AproxDistance(P_AproxDistance(actor->x-actor->tracer->x, actor->y-actor->tracer->y), actor->z-actor->tracer->z);
hang = R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y);
vang = R_PointToAngle2(0, actor->z, dist, actor->tracer->z);
actor->momx = FixedMul(FixedMul(maxspeed, FINECOSINE(hang>>ANGLETOFINESHIFT)), FINECOSINE(vang>>ANGLETOFINESHIFT));
actor->momy = FixedMul(FixedMul(maxspeed, FINESINE(hang>>ANGLETOFINESHIFT)), FINECOSINE(vang>>ANGLETOFINESHIFT));
actor->momz = FixedMul(maxspeed, FINESINE(vang>>ANGLETOFINESHIFT));
actor->angle = R_PointToAngle2(0, 0, actor->momx, actor->momy);
return;
}
else
{
P_SetTarget(&actor->tracer, NULL);
actor->extravalue1 = 0;
}
}
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i])
continue;
if (players[i].spectator)
continue;
if (players[i].exiting)
continue; // exiting
if (!players[i].mo)
continue; // no mobj
if (players[i].mo->health <= 0)
continue; // dead
if (players[i].kartstuff[k_position] < bestrank)
{
bestrank = players[i].kartstuff[k_position];
player = &players[i];
}
}
if (player != NULL && player->mo)
{
P_SetTarget(&actor->tracer, player->mo);
dist = P_AproxDistance(P_AproxDistance(actor->x-actor->tracer->x, actor->y-actor->tracer->y), actor->z-actor->tracer->z);
hang = R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y);
vang = R_PointToAngle2(0, actor->z, dist, actor->tracer->z);
actor->momx = FixedMul(FixedMul(actor->info->speed, FINECOSINE(hang>>ANGLETOFINESHIFT)), FINECOSINE(vang>>ANGLETOFINESHIFT));
actor->momy = FixedMul(FixedMul(actor->info->speed, FINESINE(hang>>ANGLETOFINESHIFT)), FINECOSINE(vang>>ANGLETOFINESHIFT));
actor->momz = FixedMul(actor->info->speed, FINESINE(vang>>ANGLETOFINESHIFT));
actor->angle = R_PointToAngle2(0, 0, actor->momx, actor->momy);
if (dist <= RING_DIST && (actor->z > actor->floorz && actor->z+actor->height < actor->ceilingz))
{
S_StartSound(actor, actor->info->attacksound);
actor->extravalue1 = 1;
}
}
return; return;
}*/ }
void A_BallhogExplode(mobj_t *actor) void A_BallhogExplode(mobj_t *actor)
{ {

View file

@ -490,7 +490,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (special->target->color) if (special->target->color)
boom->color = special->target->color; boom->color = special->target->color;
else else
boom->color = SKINCOLOR_RED; boom->color = SKINCOLOR_KETCHUP;
S_StartSound(boom, special->info->attacksound); S_StartSound(boom, special->info->attacksound);
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1 if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
@ -583,6 +583,36 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
special->target->player->kartstuff[k_eggmanblame] = -1; special->target->player->kartstuff[k_eggmanblame] = -1;
} }
return; return;
case MT_SPB:
if ((special->target == toucher || special->target == toucher->target) && (special->threshold > 0))
return;
if (special->health <= 0 || toucher->health <= 0)
return;
if (!player->mo || player->spectator)
return;
if (special->tracer && toucher == special->tracer)
{
mobj_t *spbexplode;
if (!player->kartstuff[k_invincibilitytimer] && !player->kartstuff[k_growshrinktimer])
{
K_DropHnextList(player);
K_StripItems(player);
player->powers[pw_flashing] = 0;
}
spbexplode = P_SpawnMobj(toucher->x, toucher->y, toucher->z, MT_SPBEXPLOSION);
P_SetTarget(&spbexplode->target, special->target);
P_RemoveMobj(special);
}
else
K_SpinPlayer(player, special, 0, false);
return;
// ***************************************** // // ***************************************** //
// Rings, coins, spheres, weapon panels, etc // // Rings, coins, spheres, weapon panels, etc //
@ -2201,7 +2231,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|| target->type == MT_JAWZ || target->type == MT_JAWZ_DUD || target->type == MT_JAWZ_SHIELD || target->type == MT_JAWZ || target->type == MT_JAWZ_DUD || target->type == MT_JAWZ_SHIELD
|| target->type == MT_BANANA || target->type == MT_BANANA_SHIELD || target->type == MT_BANANA || target->type == MT_BANANA_SHIELD
|| target->type == MT_FAKEITEM || target->type == MT_FAKESHIELD || target->type == MT_FAKEITEM || target->type == MT_FAKESHIELD
|| target->type == MT_BALLHOG)) // kart dead items || target->type == MT_BALLHOG || target->type == MT_SPB)) // kart dead items
target->flags |= MF_NOGRAVITY; // Don't drop Tails 03-08-2000 target->flags |= MF_NOGRAVITY; // Don't drop Tails 03-08-2000
else else
target->flags &= ~MF_NOGRAVITY; // lose it if you for whatever reason have it, I'm looking at you shields target->flags &= ~MF_NOGRAVITY; // lose it if you for whatever reason have it, I'm looking at you shields
@ -3355,8 +3385,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
player->kartstuff[k_growshrinktimer] = 2; player->kartstuff[k_growshrinktimer] = 2;
} }
player->kartstuff[k_sneakertimer] = 0; player->kartstuff[k_sneakertimer] = 0;
// Invincible or not, we still need this.
//P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_LIGHTNING);
S_StartSound(player->mo, sfx_kc59); S_StartSound(player->mo, sfx_kc59);
return true; return true;
} }

View file

@ -7413,6 +7413,7 @@ void P_MobjThinker(mobj_t *mobj)
case MT_ORBINAUT: case MT_ORBINAUT:
case MT_BANANA: case MT_BANANA:
case MT_FAKEITEM: case MT_FAKEITEM:
case MT_SPB:
if (mobj->z <= mobj->floorz) if (mobj->z <= mobj->floorz)
{ {
P_RemoveMobj(mobj); P_RemoveMobj(mobj);
@ -7433,7 +7434,7 @@ void P_MobjThinker(mobj_t *mobj)
mobj->flags2 ^= MF2_DONTDRAW; mobj->flags2 ^= MF2_DONTDRAW;
break; break;
case MT_SSMINE: case MT_SSMINE:
case MT_BLUEEXPLOSION: case MT_SPBEXPLOSION:
if (mobj->health > -100) if (mobj->health > -100)
{ {
P_SetMobjState(mobj, mobj->info->deathstate); P_SetMobjState(mobj, mobj->info->deathstate);
@ -8168,6 +8169,7 @@ void P_MobjThinker(mobj_t *mobj)
mobj->threshold--; mobj->threshold--;
break; break;
case MT_BALLHOG: case MT_BALLHOG:
case MT_SPB:
P_SpawnGhostMobj(mobj)->fuse = 3; P_SpawnGhostMobj(mobj)->fuse = 3;
if (mobj->threshold > 0) if (mobj->threshold > 0)
mobj->threshold--; mobj->threshold--;
@ -8187,7 +8189,7 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->target && mobj->target->player) if (mobj->target && mobj->target->player)
mobj->color = mobj->target->player->skincolor; mobj->color = mobj->target->player->skincolor;
else else
mobj->color = SKINCOLOR_RED; mobj->color = SKINCOLOR_KETCHUP;
if (mobj->momx || mobj->momy) if (mobj->momx || mobj->momy)
P_SpawnGhostMobj(mobj); P_SpawnGhostMobj(mobj);
if (P_IsObjectOnGround(mobj)) if (P_IsObjectOnGround(mobj))
@ -8213,7 +8215,7 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->threshold > 0) if (mobj->threshold > 0)
mobj->threshold--; mobj->threshold--;
break; break;
case MT_BLUEEXPLOSION: case MT_SPBEXPLOSION:
mobj->health--; mobj->health--;
break; break;
case MT_MINEEXPLOSION: case MT_MINEEXPLOSION:
@ -9341,7 +9343,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
case MT_JAWZ: case MT_JAWZ_DUD: case MT_JAWZ_SHIELD: case MT_JAWZ: case MT_JAWZ_DUD: case MT_JAWZ_SHIELD:
case MT_SSMINE: case MT_SSMINE_SHIELD: case MT_SSMINE: case MT_SSMINE_SHIELD:
case MT_BALLHOG: case MT_SINK: case MT_BALLHOG: case MT_SINK:
case MT_THUNDERSHIELD: case MT_THUNDERSHIELD: case MT_SPB:
P_SpawnShadowMobj(mobj); P_SpawnShadowMobj(mobj);
default: default:
break; break;

View file

@ -3284,8 +3284,6 @@ static void P_NetArchiveMisc(void)
WRITEUINT32(save_p, wantedcalcdelay); WRITEUINT32(save_p, wantedcalcdelay);
WRITEUINT32(save_p, indirectitemcooldown); WRITEUINT32(save_p, indirectitemcooldown);
WRITEUINT32(save_p, spbincoming);
WRITEUINT8(save_p, spbplayer);
WRITEUINT32(save_p, mapreset); WRITEUINT32(save_p, mapreset);
// Is it paused? // Is it paused?
@ -3390,8 +3388,6 @@ static inline boolean P_NetUnArchiveMisc(void)
wantedcalcdelay = READUINT32(save_p); wantedcalcdelay = READUINT32(save_p);
indirectitemcooldown = READUINT32(save_p); indirectitemcooldown = READUINT32(save_p);
spbincoming = READUINT32(save_p);
spbplayer = READUINT8(save_p);
mapreset = READUINT32(save_p); mapreset = READUINT32(save_p);
// Is it paused? // Is it paused?

View file

@ -3023,8 +3023,6 @@ boolean P_SetupLevel(boolean skipprecip)
wantedcalcdelay = wantedfrequency*2; wantedcalcdelay = wantedfrequency*2;
indirectitemcooldown = 0; indirectitemcooldown = 0;
spbincoming = 0;
spbplayer = 0;
mapreset = 0; mapreset = 0;
// clear special respawning que // clear special respawning que

View file

@ -678,38 +678,6 @@ void P_Ticker(boolean run)
if (countdown2) if (countdown2)
countdown2--; countdown2--;
if (spbincoming && --spbincoming <= 0)
{
UINT8 best = 0;
SINT8 hurtthisguy = -1;
spbincoming = 0;
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator)
continue;
if (!players[i].mo)
continue;
if (players[i].exiting)
continue;
if (best <= 0 || players[i].kartstuff[k_position] < best)
{
best = players[i].kartstuff[k_position];
hurtthisguy = i;
}
}
if (hurtthisguy != -1)
{
players[hurtthisguy].kartstuff[k_deathsentence] = (2*TICRATE)+1;
S_StartSound(players[hurtthisguy].mo, sfx_kc57);
}
}
if (indirectitemcooldown) if (indirectitemcooldown)
indirectitemcooldown--; indirectitemcooldown--;

View file

@ -7671,7 +7671,7 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius)
|| mo->type == MT_ORBINAUT_SHIELD || mo->type == MT_JAWZ_SHIELD || mo->type == MT_ORBINAUT_SHIELD || mo->type == MT_JAWZ_SHIELD
|| mo->type == MT_BANANA || mo->type == MT_BANANA_SHIELD || mo->type == MT_BANANA || mo->type == MT_BANANA_SHIELD
|| mo->type == MT_FAKEITEM || mo->type == MT_FAKESHIELD || mo->type == MT_FAKEITEM || mo->type == MT_FAKESHIELD
|| mo->type == MT_BALLHOG) || mo->type == MT_BALLHOG || mo->type == MT_SPB)
{ {
if (mo->eflags & MFE_VERTICALFLIP) if (mo->eflags & MFE_VERTICALFLIP)
mo->z -= mo->height; mo->z -= mo->height;