Merge branch 'master' into chat-changes

This commit is contained in:
Latapostrophe 2018-10-25 11:14:49 +02:00
commit 26093de2e9
24 changed files with 1872 additions and 627 deletions

View file

@ -4855,9 +4855,13 @@ static void Command_RestartAudio_f(void)
I_SetSfxVolume(cv_soundvolume.value); I_SetSfxVolume(cv_soundvolume.value);
I_SetDigMusicVolume(cv_digmusicvolume.value); I_SetDigMusicVolume(cv_digmusicvolume.value);
//I_SetMIDIMusicVolume(cv_midimusicvolume.value); //I_SetMIDIMusicVolume(cv_midimusicvolume.value);
S_StartSound(NULL, sfx_strpst);
if (Playing()) // Gotta make sure the player is in a level if (Playing()) // Gotta make sure the player is in a level
P_RestoreMusic(&players[consoleplayer]); P_RestoreMusic(&players[consoleplayer]);
else
S_ChangeMusicInternal("titles", looptitle);
} }
/** Quits a game and returns to the title screen. /** Quits a game and returns to the title screen.

View file

@ -306,6 +306,7 @@ typedef enum
k_accelboost, // Boost value smoothing for acceleration k_accelboost, // Boost value smoothing for acceleration
k_boostcam, // Camera push forward on boost k_boostcam, // Camera push forward on boost
k_destboostcam, // Ditto k_destboostcam, // Ditto
k_timeovercam, // Camera timer for leaving behind or not
k_aizdriftstrat, // Let go of your drift while boosting? Helper for the SICK STRATZ you have just unlocked 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_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
@ -327,7 +328,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

@ -990,7 +990,7 @@ static const struct {
{"2D",TOL_2D}, {"2D",TOL_2D},
{"MARIO",TOL_MARIO}, {"MARIO",TOL_MARIO},
{"NIGHTS",TOL_NIGHTS}, {"NIGHTS",TOL_NIGHTS},
//{"OLDBRAK",TOL_ERZ3}, {"TV",TOL_TV},
{"XMAS",TOL_XMAS}, {"XMAS",TOL_XMAS},
{"CHRISTMAS",TOL_XMAS}, {"CHRISTMAS",TOL_XMAS},
@ -1835,9 +1835,16 @@ 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
{{A_FZBoomFlash}, "A_FZBOOMFLASH"}, //SRB2kart
{{A_FZBoomSmoke}, "A_FZBOOMSMOKE"}, //SRB2kart
{{A_RandomShadowFrame}, "A_RANDOMSHADOWFRAME"}, //SRB2kart
{{A_RoamingShadowThinker}, "A_ROAMINGSHADOWTHINKER"}, //SRB2kart
{{A_ReaperThinker}, "A_REAPERTHINKER"}, //SRB2kart
{{A_MementosTPParticles}, "A_MEMENTOSTPPARTICLES"}, //SRB2kart
{{A_OrbitNights}, "A_ORBITNIGHTS"}, {{A_OrbitNights}, "A_ORBITNIGHTS"},
{{A_GhostMe}, "A_GHOSTME"}, {{A_GhostMe}, "A_GHOSTME"},
{{A_SetObjectState}, "A_SETOBJECTSTATE"}, {{A_SetObjectState}, "A_SETOBJECTSTATE"},
@ -6475,17 +6482,27 @@ 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_SPB1",
"S_BLUELIGHTNING2", "S_SPB2",
"S_BLUELIGHTNING3", "S_SPB3",
"S_BLUELIGHTNING4", "S_SPB4",
"S_BLUEEXPLODE", "S_SPB5",
"S_SPB6",
// Grow/shrink beams "S_SPB7",
"S_LIGHTNING1", "S_SPB8",
"S_LIGHTNING2", "S_SPB9",
"S_LIGHTNING3", "S_SPB10",
"S_LIGHTNING4", "S_SPB11",
"S_SPB12",
"S_SPB13",
"S_SPB14",
"S_SPB15",
"S_SPB16",
"S_SPB17",
"S_SPB18",
"S_SPB19",
"S_SPB20",
"S_SPB_DEAD",
// Thunder Shield // Thunder Shield
"S_THUNDERSHIELD1", "S_THUNDERSHIELD1",
@ -6716,7 +6733,26 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_PLAYERARROW_WANTED6", "S_PLAYERARROW_WANTED6",
"S_PLAYERARROW_WANTED7", "S_PLAYERARROW_WANTED7",
"S_PLAYERBOMB", // Player bomb overlay "S_PLAYERBOMB1", // Player bomb overlay
"S_PLAYERBOMB2",
"S_PLAYERBOMB3",
"S_PLAYERBOMB4",
"S_PLAYERBOMB5",
"S_PLAYERBOMB6",
"S_PLAYERBOMB7",
"S_PLAYERBOMB8",
"S_PLAYERBOMB9",
"S_PLAYERBOMB10",
"S_PLAYERBOMB11",
"S_PLAYERBOMB12",
"S_PLAYERBOMB13",
"S_PLAYERBOMB14",
"S_PLAYERBOMB15",
"S_PLAYERBOMB16",
"S_PLAYERBOMB17",
"S_PLAYERBOMB18",
"S_PLAYERBOMB19",
"S_PLAYERBOMB20",
"S_PLAYERITEM", // Player item overlay "S_PLAYERITEM", // Player item overlay
"S_PLAYERFAKE", // Player fake overlay "S_PLAYERFAKE", // Player fake overlay
@ -6770,6 +6806,63 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_KLIT11", "S_KLIT11",
"S_KLIT12", "S_KLIT12",
"S_FZEROSMOKE1", // F-Zero NO CONTEST explosion
"S_FZEROSMOKE2",
"S_FZEROSMOKE3",
"S_FZEROSMOKE4",
"S_FZEROSMOKE5",
"S_FZEROBOOM1",
"S_FZEROBOOM2",
"S_FZEROBOOM3",
"S_FZEROBOOM4",
"S_FZEROBOOM5",
"S_FZEROBOOM6",
"S_FZEROBOOM7",
"S_FZEROBOOM8",
"S_FZEROBOOM9",
"S_FZEROBOOM10",
"S_FZEROBOOM11",
"S_FZEROBOOM12",
"S_FZSLOWSMOKE1",
"S_FZSLOWSMOKE2",
"S_FZSLOWSMOKE3",
"S_FZSLOWSMOKE4",
"S_FZSLOWSMOKE5",
// Midnight Channel stuff:
"S_SPOTLIGHT", // Spotlight decoration
"S_RANDOMSHADOW", // Random Shadow. They're static and don't do nothing.
"S_GARU1",
"S_GARU2",
"S_GARU3",
"S_TGARU",
"S_TGARU1",
"S_TGARU2",
"S_TGARU3", // Wind attack used by Roaming Shadows on Players.
"S_ROAMINGSHADOW", // Roaming Shadow (the one that uses above's wind attack or smth)
"S_MAYONAKAARROW", // Arrow sign
// Mementos stuff:
"S_REAPER_INVIS", // Reaper waiting for spawning
"S_REAPER", // Reaper main frame where its thinker is handled
"S_MEMENTOSTP", // Mementos teleporter state. (Used for spawning particles)
// JackInTheBox
"S_JITB1",
"S_JITB2",
"S_JITB3",
"S_JITB4",
"S_JITB5",
"S_JITB6",
// Color Drive
"S_CDMOONSP",
"S_CDBUSHSP",
"S_CDTREEASP",
"S_CDTREEBSP",
#ifdef SEENAMES #ifdef SEENAMES
"S_NAMECHECK", "S_NAMECHECK",
#endif #endif
@ -7331,9 +7424,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
@ -7423,6 +7515,28 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_KARMAHITBOX", "MT_KARMAHITBOX",
"MT_KARMAWHEEL", "MT_KARMAWHEEL",
"MT_FZEROBOOM",
// Midnight Channel stuff:
"MT_SPOTLIGHT", // Spotlight Object
"MT_RANDOMSHADOW", // Random static Shadows.
"MT_ROAMINGSHADOW", // Roaming Shadows.
"MT_MAYONAKAARROW", // Arrow static signs for Mayonaka
// Mementos stuff
"MT_REAPERWAYPOINT",
"MT_REAPER",
"MT_MEMENTOSTP",
"MT_MEMENTOSPARTICLE",
"MT_JACKINTHEBOX",
// Color Drive:
"MT_CDMOON",
"MT_CDBUSH",
"MT_CDTREEA",
"MT_CDTREEB",
#ifdef SEENAMES #ifdef SEENAMES
"MT_NAMECHECK", "MT_NAMECHECK",
#endif #endif
@ -7779,6 +7893,7 @@ static const char *const KARTSTUFF_LIST[] = {
"ACCELBOOST", "ACCELBOOST",
"BOOSTCAM", "BOOSTCAM",
"DESTBOOSTCAM", "DESTBOOSTCAM",
"TIMEOVERCAM",
"AIZDRIFTSTRAT", "AIZDRIFTSTRAT",
"ITEMROULETTE", "ITEMROULETTE",
@ -7797,7 +7912,6 @@ static const char *const KARTSTUFF_LIST[] = {
"SQUISHEDTIMER", "SQUISHEDTIMER",
"ROCKETSNEAKERTIMER", "ROCKETSNEAKERTIMER",
"INVINCIBILITYTIMER", "INVINCIBILITYTIMER",
"DEATHSENTENCE",
"EGGMANHELD", "EGGMANHELD",
"EGGMANEXPLODE", "EGGMANEXPLODE",
"EGGMANBLAME", "EGGMANBLAME",

View file

@ -302,7 +302,7 @@ enum TypeOfLevel
TOL_2D = 0x0100, ///< 2D TOL_2D = 0x0100, ///< 2D
TOL_MARIO = 0x0200, ///< Mario TOL_MARIO = 0x0200, ///< Mario
TOL_NIGHTS = 0x0400, ///< NiGHTS TOL_NIGHTS = 0x0400, ///< NiGHTS
//TOL_ERZ3 = 0x0800, ///< ERZ3 TOL_TV = 0x0800, ///< Midnight Channel specific: draw TV like overlay on HUD
TOL_XMAS = 0x1000 ///< Christmas NiGHTS TOL_XMAS = 0x1000 ///< Christmas NiGHTS
//TOL_KART = 0x4000 ///< Kart 32768 //TOL_KART = 0x4000 ///< Kart 32768
}; };
@ -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 UINT8 nospectategrief; extern UINT8 nospectategrief;

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
UINT8 nospectategrief; // How many players need to be in-game to eliminate last; for preventing spectate griefing UINT8 nospectategrief; // How many players need to be in-game to eliminate last; for preventing spectate griefing
@ -1840,6 +1838,9 @@ boolean G_Responder(event_t *ev)
if (players[displayplayer].exiting) if (players[displayplayer].exiting)
continue; continue;
if (players[displayplayer].pflags & PF_TIMEOVER)
continue;
// I don't know if we want this actually, but I'll humor the suggestion anyway // I don't know if we want this actually, but I'll humor the suggestion anyway
if (G_BattleGametype()) if (G_BattleGametype())
{ {
@ -2356,6 +2357,7 @@ void G_PlayerReborn(INT32 player)
INT32 itemamount; INT32 itemamount;
INT32 itemroulette; INT32 itemroulette;
INT32 roulettetype; INT32 roulettetype;
INT32 growshrinktimer;
INT32 bumper; INT32 bumper;
INT32 comebackpoints; INT32 comebackpoints;
INT32 wanted; INT32 wanted;
@ -2368,7 +2370,7 @@ void G_PlayerReborn(INT32 player)
exiting = players[player].exiting; exiting = players[player].exiting;
jointime = players[player].jointime; jointime = players[player].jointime;
spectator = players[player].spectator; spectator = players[player].spectator;
pflags = (players[player].pflags & (PF_TIMEOVER|PF_FLIPCAM|PF_TAGIT|PF_TAGGED|PF_ANALOGMODE)); pflags = (players[player].pflags & (PF_TIMEOVER|PF_FLIPCAM|PF_TAGIT|PF_TAGGED|PF_ANALOGMODE|PF_WANTSTOJOIN));
// As long as we're not in multiplayer, carry over cheatcodes from map to map // As long as we're not in multiplayer, carry over cheatcodes from map to map
if (!(netgame || multiplayer)) if (!(netgame || multiplayer))
@ -2419,6 +2421,7 @@ void G_PlayerReborn(INT32 player)
roulettetype = 0; roulettetype = 0;
itemtype = 0; itemtype = 0;
itemamount = 0; itemamount = 0;
growshrinktimer = 0;
bumper = (G_BattleGametype() ? cv_kartbumpers.value : 0); bumper = (G_BattleGametype() ? cv_kartbumpers.value : 0);
comebackpoints = 0; comebackpoints = 0;
wanted = 0; wanted = 0;
@ -2442,6 +2445,9 @@ void G_PlayerReborn(INT32 player)
itemamount = players[player].kartstuff[k_itemamount]; itemamount = players[player].kartstuff[k_itemamount];
} }
// Keep Shrink status, remove Grow status
growshrinktimer = min(players[player].kartstuff[k_growshrinktimer], 0);
bumper = players[player].kartstuff[k_bumper]; bumper = players[player].kartstuff[k_bumper];
comebackpoints = players[player].kartstuff[k_comebackpoints]; comebackpoints = players[player].kartstuff[k_comebackpoints];
wanted = players[player].kartstuff[k_wanted]; wanted = players[player].kartstuff[k_wanted];
@ -2506,6 +2512,7 @@ void G_PlayerReborn(INT32 player)
p->kartstuff[k_roulettetype] = roulettetype; p->kartstuff[k_roulettetype] = roulettetype;
p->kartstuff[k_itemtype] = itemtype; p->kartstuff[k_itemtype] = itemtype;
p->kartstuff[k_itemamount] = itemamount; p->kartstuff[k_itemamount] = itemamount;
p->kartstuff[k_growshrinktimer] = growshrinktimer;
p->kartstuff[k_bumper] = bumper; p->kartstuff[k_bumper] = bumper;
p->kartstuff[k_comebackpoints] = comebackpoints; p->kartstuff[k_comebackpoints] = comebackpoints;
p->kartstuff[k_comebacktimer] = comebacktime; p->kartstuff[k_comebacktimer] = comebacktime;

View file

@ -57,11 +57,12 @@ 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","RSHE","FITM","BANA","ORBN","JAWZ", "KINV","KINF","WIPD","DRIF","DUST","RSHE","FITM","BANA","ORBN","JAWZ",
"SSMN","KRBM","BHOG","BHBM","BLIG","LIGH","THNS","SINK","SITR","KBLN", "SSMN","KRBM","BHOG","BHBM","SPBM","THNS","SINK","SITR","KBLN","DEZL",
"DEZL","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM", "POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO",
"SACO","CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB", "CRAB","SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO",
"ARRO","ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK", "ITEM","ITMO","ITMI","ITMN","WANT","PBOM","RETI","AIDU","KSPK","LZI1",
"LZI1","LZI2","KLIT","VIEW" "LZI2","KLIT","FZSM","FZBM","FPRT","SPTL","ENM1","GARU","MARR","REAP",
"JITB","CDMO","CDBU","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)
@ -2777,16 +2778,27 @@ 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_SPB2}, // S_SPB1
{SPR_BLIG, 1, 2, {NULL}, 0, 0, S_BLUELIGHTNING3}, // S_BLUELIGHTNING2 {SPR_SPBM, 1, 1, {A_SPBChase}, 0, 0, S_SPB3}, // S_SPB2
{SPR_BLIG, 2, 2, {NULL}, 0, 0, S_BLUELIGHTNING4}, // S_BLUELIGHTNING3 {SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB4}, // S_SPB3
{SPR_BLIG, 3, 2, {NULL}, 0, 0, S_NULL}, // S_BLUELIGHTNING4 {SPR_SPBM, 2, 1, {A_SPBChase}, 0, 0, S_SPB5}, // S_SPB4
{SPR_SSMN, 0, 1, {A_MineExplode}, MT_BLUEEXPLOSION, 0, S_NULL}, // S_BLUEEXPLODE {SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB6}, // S_SPB5
{SPR_SPBM, 3, 1, {A_SPBChase}, 0, 0, S_SPB7}, // S_SPB6
{SPR_LIGH, 0, 2, {NULL}, 0, 0, S_LIGHTNING2}, // S_LIGHTNING1 {SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB8}, // S_SPB7
{SPR_LIGH, 1, 2, {NULL}, 0, 0, S_LIGHTNING3}, // S_LIGHTNING2 {SPR_SPBM, 4, 1, {A_SPBChase}, 0, 0, S_SPB9}, // S_SPB8
{SPR_LIGH, 2, 2, {NULL}, 0, 0, S_LIGHTNING4}, // S_LIGHTNING3 {SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB10}, // S_SPB9
{SPR_LIGH, 3, 2, {NULL}, 0, 0, S_NULL}, // S_LIGHTNING4 {SPR_SPBM, 5, 1, {A_SPBChase}, 0, 0, S_SPB11}, // S_SPB10
{SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB12}, // S_SPB11
{SPR_SPBM, 6, 1, {A_SPBChase}, 0, 0, S_SPB13}, // S_SPB12
{SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB14}, // S_SPB13
{SPR_SPBM, 7, 1, {A_SPBChase}, 0, 0, S_SPB15}, // S_SPB14
{SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB16}, // S_SPB15
{SPR_SPBM, 8, 1, {A_SPBChase}, 0, 0, S_SPB17}, // S_SPB16
{SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB18}, // S_SPB17
{SPR_SPBM, 8, 1, {A_SPBChase}, 0, 0, S_SPB19}, // S_SPB18
{SPR_SPBM, 0, 1, {A_SPBChase}, 0, 0, S_SPB20}, // S_SPB19
{SPR_SPBM, 8, 1, {A_SPBChase}, 0, 0, S_SPB1}, // S_SPB20
{SPR_SPBM, 8, 175, {NULL}, 0, 0, S_NULL}, // S_SPB_DEAD
{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
@ -3009,12 +3021,31 @@ state_t states[NUMSTATES] =
{SPR_WANT, FF_FULLBRIGHT|5, 1, {NULL}, 0, 0, S_PLAYERARROW_WANTED7}, // S_PLAYERARROW_WANTED6 {SPR_WANT, FF_FULLBRIGHT|5, 1, {NULL}, 0, 0, S_PLAYERARROW_WANTED7}, // S_PLAYERARROW_WANTED6
{SPR_WANT, FF_FULLBRIGHT|6, 3, {NULL}, 0, 0, S_PLAYERARROW_WANTED1}, // S_PLAYERARROW_WANTED7 {SPR_WANT, FF_FULLBRIGHT|6, 3, {NULL}, 0, 0, S_PLAYERARROW_WANTED1}, // S_PLAYERARROW_WANTED7
{SPR_PBOM, FF_ANIMATE, -1, {NULL}, 3, 3, S_NULL}, // S_PLAYERBOMB {SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB2}, // S_PLAYERBOMB1
{SPR_SPBM, 1, 1, {NULL}, 0, 0, S_PLAYERBOMB3}, // S_PLAYERBOMB2
{SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB4}, // S_PLAYERBOMB3
{SPR_SPBM, 2, 1, {NULL}, 0, 0, S_PLAYERBOMB5}, // S_PLAYERBOMB4
{SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB6}, // S_PLAYERBOMB5
{SPR_SPBM, 3, 1, {NULL}, 0, 0, S_PLAYERBOMB7}, // S_PLAYERBOMB6
{SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB8}, // S_PLAYERBOMB7
{SPR_SPBM, 4, 1, {NULL}, 0, 0, S_PLAYERBOMB9}, // S_PLAYERBOMB8
{SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB10}, // S_PLAYERBOMB9
{SPR_SPBM, 5, 1, {NULL}, 0, 0, S_PLAYERBOMB11}, // S_PLAYERBOMB10
{SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB12}, // S_PLAYERBOMB11
{SPR_SPBM, 6, 1, {NULL}, 0, 0, S_PLAYERBOMB13}, // S_PLAYERBOMB12
{SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB14}, // S_PLAYERBOMB13
{SPR_SPBM, 7, 1, {NULL}, 0, 0, S_PLAYERBOMB15}, // S_PLAYERBOMB14
{SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB16}, // S_PLAYERBOMB15
{SPR_SPBM, 8, 1, {NULL}, 0, 0, S_PLAYERBOMB17}, // S_PLAYERBOMB16
{SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB18}, // S_PLAYERBOMB17
{SPR_SPBM, 8, 1, {NULL}, 0, 0, S_PLAYERBOMB19}, // S_PLAYERBOMB18
{SPR_SPBM, 0, 1, {NULL}, 0, 0, S_PLAYERBOMB20}, // S_PLAYERBOMB19
{SPR_SPBM, 8, 1, {NULL}, 0, 0, S_PLAYERBOMB1}, // S_PLAYERBOMB20
{SPR_RNDM, FF_ANIMATE, -1, {NULL}, 23, 3, S_NULL}, // S_PLAYERITEM {SPR_RNDM, FF_ANIMATE, -1, {NULL}, 23, 3, S_NULL}, // S_PLAYERITEM
{SPR_FITM, FF_ANIMATE, -1, {NULL}, 23, 3, S_NULL}, // S_PLAYERFAKE {SPR_FITM, FF_ANIMATE, -1, {NULL}, 23, 3, S_NULL}, // S_PLAYERFAKE
{SPR_PBOM, 4, -1, {NULL}, 0, 0, S_NULL}, // S_KARMAWHEEL {SPR_PBOM, 0, -1, {NULL}, 0, 0, S_NULL}, // S_KARMAWHEEL
// Oh no it's annoying lightning states....... // Oh no it's annoying lightning states.......
// Lightning Sparks (it's the ones we'll use for the radius) // Lightning Sparks (it's the ones we'll use for the radius)
{SPR_KSPK, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_KSPARK2}, // S_KSPARK1 {SPR_KSPK, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_KSPARK2}, // S_KSPARK1
@ -3030,7 +3061,7 @@ state_t states[NUMSTATES] =
{SPR_KSPK, FF_TRANS50|FF_FULLBRIGHT|5, 2, {A_LightningFollowPlayer}, 0, 0, S_KSPARK12}, // S_KSPARK11 {SPR_KSPK, FF_TRANS50|FF_FULLBRIGHT|5, 2, {A_LightningFollowPlayer}, 0, 0, S_KSPARK12}, // S_KSPARK11
{SPR_NULL, FF_FULLBRIGHT, 1, {A_LightningFollowPlayer}, 0, 0, S_KSPARK13}, // S_KSPARK12 {SPR_NULL, FF_FULLBRIGHT, 1, {A_LightningFollowPlayer}, 0, 0, S_KSPARK13}, // S_KSPARK12
{SPR_KSPK, FF_TRANS60|FF_FULLBRIGHT|6, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_KSPARK13 {SPR_KSPK, FF_TRANS60|FF_FULLBRIGHT|6, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_KSPARK13
// The straight bolt... // The straight bolt...
{SPR_LZI1, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO12}, // S_LZIO11 {SPR_LZI1, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO12}, // S_LZIO11
{SPR_NULL, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO13}, // S_LZIO12 {SPR_NULL, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO13}, // S_LZIO12
@ -3041,7 +3072,7 @@ state_t states[NUMSTATES] =
{SPR_NULL, 0, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO18}, // S_LZIO17 {SPR_NULL, 0, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO18}, // S_LZIO17
{SPR_LZI1, FF_TRANS50|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO19}, // S_LZIO18 {SPR_LZI1, FF_TRANS50|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO19}, // S_LZIO18
{SPR_LZI1, FF_TRANS70|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_LZIO19 {SPR_LZI1, FF_TRANS70|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_LZIO19
{SPR_NULL, FF_FULLBRIGHT, 6, {A_LightningFollowPlayer}, 0, 0, S_LZIO22}, // S_LZIO21 {SPR_NULL, FF_FULLBRIGHT, 6, {A_LightningFollowPlayer}, 0, 0, S_LZIO22}, // S_LZIO21
{SPR_LZI2, FF_FULLBRIGHT|1, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO23}, // S_LZIO22 {SPR_LZI2, FF_FULLBRIGHT|1, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO23}, // S_LZIO22
{SPR_LZI2, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO24}, // S_LZIO23 {SPR_LZI2, FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO24}, // S_LZIO23
@ -3051,20 +3082,81 @@ state_t states[NUMSTATES] =
{SPR_LZI2, FF_TRANS30|FF_FULLBRIGHT|2, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO28}, // S_LZIO27 {SPR_LZI2, FF_TRANS30|FF_FULLBRIGHT|2, 2, {A_LightningFollowPlayer}, 0, 0, S_LZIO28}, // S_LZIO27
{SPR_NULL, 0, 4, {A_LightningFollowPlayer}, 0, 0, S_LZIO29}, // S_LZIO28 {SPR_NULL, 0, 4, {A_LightningFollowPlayer}, 0, 0, S_LZIO29}, // S_LZIO28
{SPR_LZI2, FF_TRANS70|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_LZIO29 {SPR_LZI2, FF_TRANS70|FF_FULLBRIGHT, 2, {A_LightningFollowPlayer}, 0, 0, S_NULL}, // S_LZIO29
// The slanted bolt. Man these states are boring as all heck to do. // The slanted bolt. Man these states are boring as all heck to do.
{SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT2}, // S_KLIT1 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT2}, // S_KLIT1
{SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT3}, // S_KLIT2 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT3}, // S_KLIT2
{SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|1, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT4}, // S_KLIT3 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|1, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT4}, // S_KLIT3
{SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT5}, // S_KLIT4 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT5}, // S_KLIT4
{SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|2, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT6}, // S_KLIT5 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|2, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT6}, // S_KLIT5
{SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT7}, // S_KLIT6 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT7}, // S_KLIT6
{SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|3, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT8}, // S_KLIT7 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|3, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT8}, // S_KLIT7
{SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT9}, // S_KLIT8 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT9}, // S_KLIT8
{SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|4, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT10}, // S_KLIT9 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|4, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT10}, // S_KLIT9
{SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT11}, // S_KLIT10 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT11}, // S_KLIT10
{SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|5, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT12}, // S_KLIT11 {SPR_KLIT, FF_FULLBRIGHT|FF_PAPERSPRITE|5, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT12}, // S_KLIT11
{SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT1}, // S_KLIT12 {SPR_NULL, FF_FULLBRIGHT|FF_PAPERSPRITE, 2, {A_LightningFollowPlayer}, 0, 0, S_KLIT1}, // S_KLIT12
{SPR_FZSM, 0, 4, {NULL}, 0, 0, S_FZEROSMOKE2}, // S_FZEROSMOKE1
{SPR_FZSM, 1, 4, {NULL}, 0, 0, S_FZEROSMOKE3}, // S_FZEROSMOKE2
{SPR_FZSM, 2, 4, {NULL}, 0, 0, S_FZEROSMOKE4}, // S_FZEROSMOKE3
{SPR_FZSM, 3, 4, {NULL}, 0, 0, S_FZEROSMOKE5}, // S_FZEROSMOKE4
{SPR_FZSM, 4, 4, {NULL}, 0, 0, S_NULL}, // S_FZEROSMOKE5
{SPR_FZBM, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_FZEROBOOM2}, // S_FZEROBOOM1
{SPR_FZBM, FF_FULLBRIGHT|1, 2, {NULL}, 0, 0, S_FZEROBOOM3}, // S_FZEROBOOM2
{SPR_FZBM, FF_FULLBRIGHT|2, 2, {NULL}, 0, 0, S_FZEROBOOM4}, // S_FZEROBOOM3
{SPR_FZBM, FF_FULLBRIGHT|3, 2, {A_FZBoomFlash}, 0, 0, S_FZEROBOOM5}, // S_FZEROBOOM4
{SPR_FZBM, FF_FULLBRIGHT|2, 1, {A_FZBoomSmoke}, 0, 0, S_FZEROBOOM6}, // S_FZEROBOOM5
{SPR_FZBM, FF_FULLBRIGHT|1, 1, {A_FZBoomSmoke}, 0, 0, S_FZEROBOOM7}, // S_FZEROBOOM6
{SPR_NULL, 0, 1, {A_FZBoomSmoke}, 1, 0, S_FZEROBOOM8}, // S_FZEROBOOM7
{SPR_NULL, 0, 1, {A_FZBoomSmoke}, 2, 0, S_FZEROBOOM9}, // S_FZEROBOOM8
{SPR_NULL, 0, 1, {A_FZBoomSmoke}, 3, 0, S_FZEROBOOM10}, // S_FZEROBOOM9
{SPR_NULL, 0, 1, {A_FZBoomSmoke}, 2, 0, S_FZEROBOOM11}, // S_FZEROBOOM10
{SPR_NULL, 0, 1, {A_FZBoomSmoke}, 1, 0, S_FZEROBOOM12}, // S_FZEROBOOM11
{SPR_NULL, 0, 1, {A_FZBoomSmoke}, 0, 0, S_NULL}, // S_FZEROBOOM12
{SPR_SMOK, FF_TRANS30, 30, {NULL}, 0, 0, S_FZSLOWSMOKE2}, // S_FZSLOWSMOKE1
{SPR_SMOK, FF_TRANS30|1, 30, {NULL}, 0, 0, S_FZSLOWSMOKE3}, // S_FZSLOWSMOKE2
{SPR_SMOK, FF_TRANS30|2, 30, {NULL}, 0, 0, S_FZSLOWSMOKE4}, // S_FZSLOWSMOKE3
{SPR_SMOK, FF_TRANS30|3, 30, {NULL}, 0, 0, S_FZSLOWSMOKE5}, // S_FZSLOWSMOKE4
{SPR_SMOK, FF_TRANS30|4, 30, {NULL}, 0, 0, S_NULL}, // S_FZSLOWSMOKE5
// Midnight Channel stuff, yay more boring states!
{SPR_SPTL, 0, -1, {NULL}, 0, 0, S_SPOTLIGHT}, // S_SPOTLIGHT
{SPR_ENM1, 0, 1, {A_RandomShadowFrame}, 0, 0, S_RANDOMSHADOW}, // S_RANDOMSHADOW
{SPR_GARU, 0, 2, {NULL}, 0, 0, S_GARU2}, // S_GARU1
{SPR_GARU, 1, 2, {NULL}, 0, 0, S_GARU3}, // S_GARU2
{SPR_GARU, 2, 2, {NULL}, 0, 0, S_NULL}, // S_GARU3
{SPR_NULL, 0, 2, {NULL}, 0, 0, S_TGARU1}, // S_TGARU0
{SPR_GARU, FF_TRANS30, 2, {NULL}, 0, 0, S_GARU2}, // S_TGARU1
{SPR_GARU, 1|FF_TRANS30, 2, {NULL}, 0, 0, S_GARU3}, // S_TGARU2
{SPR_GARU, 2|FF_TRANS30, 2, {NULL}, 0, 0, S_NULL}, // S_TGARU3
{SPR_ENM1, 2, 1, {A_RoamingShadowThinker}, 0, 0, S_ROAMINGSHADOW}, //S_ROAMINGSHADOW
{SPR_MARR, 0, 1, {A_MayonakaArrow}, 0, 0, S_MAYONAKAARROW}, //S_MAYONAKAARROW
//Mementos stuff
{SPR_NULL, 0, TICRATE*20, {NULL}, 0, 0, S_REAPER}, //S_REAPER_INVIS TODO: DON'T FORGET TO CHANGE THAT BACK TO 130*TICRATE WHEN TESTING IS OVER
{SPR_REAP, 0, 1, {A_ReaperThinker}, 0, 0, S_REAPER}, //S_REAPER
{SPR_NULL, 0, 1, {A_MementosTPParticles}, 0, 0, S_MEMENTOSTP}, //S_MEMENTOSTP
//JackInTheBox
{SPR_JITB, 0, 4, {NULL}, 0, 0, S_JITB2}, // S_JITB1
{SPR_JITB, 1, 4, {NULL}, 0, 0, S_JITB3}, // S_JITB2
{SPR_JITB, 2, 4, {NULL}, 0, 0, S_JITB4}, // S_JITB3
{SPR_JITB, 3, 4, {NULL}, 0, 0, S_JITB5}, // S_JITB4
{SPR_JITB, 2, 4, {NULL}, 0, 0, S_JITB6}, // S_JITB5
{SPR_JITB, 1, 4, {NULL}, 0, 0, S_JITB1}, // S_JITB6
// Color Drive Stuff:
{SPR_CDMO, 0, -1, {NULL}, 0, 0, S_CDMOONSP}, // S_CDMOONSP
{SPR_CDBU, 0, -1, {NULL}, 0, 0, S_CDBUSHSP}, // S_CDBUSHSP
{SPR_CDBU, 1, -1, {NULL}, 0, 0, S_CDTREEASP}, // S_CDTREEASP
{SPR_CDBU, 2, -1, {NULL}, 0, 0, S_CDTREEBSP}, // S_CDTREEBSP
#ifdef SEENAMES #ifdef SEENAMES
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
@ -15141,7 +15233,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
@ -15348,34 +15440,34 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate S_NULL // raisestate
}, },
{ // MT_BLUELIGHTNING { // MT_SPB
-1, // doomednum -1, // doomednum
S_BLUELIGHTNING1, // spawnstate S_SPB1, // 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
@ -15384,7 +15476,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
@ -15402,33 +15494,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
@ -17159,7 +17224,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
{ // MT_KARMAHITBOX { // MT_KARMAHITBOX
-1, // doomednum -1, // doomednum
S_PLAYERBOMB, // spawnstate S_PLAYERBOMB1, // spawnstate
1000, // spawnhealth 1000, // spawnhealth
S_PLAYERITEM, // seestate S_PLAYERITEM, // seestate
sfx_kc2e, // seesound sfx_kc2e, // seesound
@ -17211,6 +17276,386 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate S_NULL // raisestate
}, },
{ // MT_FZEROBOOM
-1, // doomednum
S_INVISIBLE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_kc31, // seesound
8, // reactiontime
sfx_kc51, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
FRACUNIT, // radius
FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOBLOCKMAP|MF_DONTENCOREMAP, // flags
S_NULL // raisestate
},
// Midnight Channel stuff:
{ // MT_SPOTLIGHT
3124, // doomednum
S_SPOTLIGHT, // 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
0, // speed
8*FRACUNIT, // radius
16*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOTHINK|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags
S_NULL // raisestate
},
{ // MT_RANDOMSHADOW
3120, // doomednum
S_RANDOMSHADOW, // 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
0, // speed
16*FRACUNIT, // radius
32*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_SCENERY|MF_PAIN, // flags
S_NULL // raisestate
},
{ // MT_ROAMINGSHADOW
3121, // doomednum
S_ROAMINGSHADOW, // 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
0, // speed
16*FRACUNIT, // radius
32*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_SOLID|MF_PAIN|MF_SPECIAL|MF_RUNSPAWNFUNC, // flags
S_NULL // raisestate
},
{ // MT_MAYONAKAARROW
3122, // doomednum
S_MAYONAKAARROW, // 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
0, // speed
64*FRACUNIT, // radius
128*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags
S_NULL // raisestate
},
// Mementos stuff
{ // MT_REAPERWAYPOINT
3199, // doomednum
S_INVISIBLE, // 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
0, // speed
64*FRACUNIT, // radius
128*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY, // flags
S_NULL // raisestate
},
{ // MT_REAPER
3202, // doomednum
S_REAPER_INVIS, // 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
0, // speed
64*FRACUNIT, // radius
128*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY, // flags
S_NULL // raisestate
},
{ // MT_MEMENTOSTP
3201, // doomednum
S_MEMENTOSTP, // 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
0, // speed
512*FRACUNIT, // radius
16*FRACUNIT, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY|MF_SPECIAL, // flags
S_NULL // raisestate
},
{ // MT_MEMENTOSPARTICLE
-1, // doomednum
S_THOK, // 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
32<<FRACBITS, // speed
8<<FRACBITS, // radius
16<<FRACBITS, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_NOGRAVITY, // flags
S_NULL // raisestate
},
{ // MT_JACKINTHEBOX
1601, // doomednum
S_JITB4, // 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
32<<FRACBITS, // speed
16<<FRACBITS, // radius
128<<FRACBITS, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_SCENERY, // flags
S_NULL // raisestate
},
{ // MT_CDMOON
2499, // doomednum
S_CDMOONSP, // 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
32<<FRACBITS, // speed
30<<FRACBITS, // radius
60<<FRACBITS, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_SCENERY|MF_NOCLIP|MF_NOGRAVITY, // flags
S_NULL // raisestate
},
{ // MT_CDBUSH
2498, // doomednum
S_CDBUSHSP, // 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
16<<FRACBITS, // speed
16<<FRACBITS, // radius
8<<FRACBITS, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_SCENERY|MF_NOCLIP|MF_NOGRAVITY, // flags
S_NULL // raisestate
},
{ // MT_CDTREEA
2496, // doomednum
S_CDTREEASP, // 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
16<<FRACBITS, // speed
20<<FRACBITS, // radius
20<<FRACBITS, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_SCENERY|MF_NOCLIP|MF_NOGRAVITY, // flags
S_NULL // raisestate
},
{ // MT_CDTREEB
2497, // doomednum
S_CDTREEBSP, // 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
16<<FRACBITS, // speed
20<<FRACBITS, // radius
20<<FRACBITS, // height
0, // display offset
0, // mass
0, // damage
sfx_None, // activesound
MF_SCENERY|MF_NOCLIP|MF_NOGRAVITY, // flags
S_NULL // raisestate
},
// ============================================================================================================================// // ============================================================================================================================//
#ifdef SEENAMES #ifdef SEENAMES

View file

@ -166,9 +166,17 @@ 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
void A_FZBoomFlash(); // SRB2kart
void A_FZBoomSmoke(); // SRB2kart
void A_RandomShadowFrame(); //SRB2kart: Shadow spawner frame randomizer
void A_RoamingShadowThinker(); // SRB2kart: Roaming Shadow moving + attacking players.
void A_MayonakaArrow(); //SRB2kart: midnight channel arrow sign
void A_ReaperThinker(); //SRB2kart: mementos reaper
void A_MementosTPParticles(); //SRB2kart: mementos teleporter particles. Man that's a lot of actions for my shite.
void A_OrbitNights(); void A_OrbitNights();
void A_GhostMe(); void A_GhostMe();
void A_SetObjectState(); void A_SetObjectState();
@ -605,8 +613,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
@ -653,8 +660,27 @@ typedef enum sprite
SPR_LZI2, // ditto SPR_LZI2, // ditto
SPR_KLIT, // You have a twisted mind. But this actually is for the diagonal lightning. SPR_KLIT, // You have a twisted mind. But this actually is for the diagonal lightning.
SPR_FZSM, // F-Zero NO CONTEST explosion
SPR_FZBM,
SPR_FPRT,
// Midnight Channel stuff:
SPR_SPTL, // Spotlight
SPR_ENM1, // Shadows (Roaming and static)
SPR_GARU, // Wind attack roaming shadows use.
SPR_MARR, // Mayonaka Arrow
//Mementos stuff:
SPR_REAP,
SPR_JITB, // Jack In The Box
// Color Drive stuff:
SPR_CDMO,
SPR_CDBU,
SPR_VIEW, // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw! SPR_VIEW, // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw!
SPR_FIRSTFREESLOT, SPR_FIRSTFREESLOT,
SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1, SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1,
NUMSPRITES NUMSPRITES
@ -3317,18 +3343,28 @@ 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_SPB1,
S_BLUELIGHTNING2, S_SPB2,
S_BLUELIGHTNING3, S_SPB3,
S_BLUELIGHTNING4, S_SPB4,
S_BLUEEXPLODE, S_SPB5,
S_SPB6,
// Grow/Shrink S_SPB7,
S_LIGHTNING1, S_SPB8,
S_LIGHTNING2, S_SPB9,
S_LIGHTNING3, S_SPB10,
S_LIGHTNING4, S_SPB11,
S_SPB12,
S_SPB13,
S_SPB14,
S_SPB15,
S_SPB16,
S_SPB17,
S_SPB18,
S_SPB19,
S_SPB20,
S_SPB_DEAD,
// Thunder Shield // Thunder Shield
S_THUNDERSHIELD1, S_THUNDERSHIELD1,
@ -3559,7 +3595,26 @@ typedef enum state
S_PLAYERARROW_WANTED6, S_PLAYERARROW_WANTED6,
S_PLAYERARROW_WANTED7, S_PLAYERARROW_WANTED7,
S_PLAYERBOMB, S_PLAYERBOMB1, // Karma player overlays
S_PLAYERBOMB2,
S_PLAYERBOMB3,
S_PLAYERBOMB4,
S_PLAYERBOMB5,
S_PLAYERBOMB6,
S_PLAYERBOMB7,
S_PLAYERBOMB8,
S_PLAYERBOMB9,
S_PLAYERBOMB10,
S_PLAYERBOMB11,
S_PLAYERBOMB12,
S_PLAYERBOMB13,
S_PLAYERBOMB14,
S_PLAYERBOMB15,
S_PLAYERBOMB16,
S_PLAYERBOMB17,
S_PLAYERBOMB18,
S_PLAYERBOMB19,
S_PLAYERBOMB20,
S_PLAYERITEM, S_PLAYERITEM,
S_PLAYERFAKE, S_PLAYERFAKE,
@ -3613,6 +3668,63 @@ typedef enum state
S_KLIT11, S_KLIT11,
S_KLIT12, S_KLIT12,
S_FZEROSMOKE1, // F-Zero NO CONTEST explosion
S_FZEROSMOKE2,
S_FZEROSMOKE3,
S_FZEROSMOKE4,
S_FZEROSMOKE5,
S_FZEROBOOM1,
S_FZEROBOOM2,
S_FZEROBOOM3,
S_FZEROBOOM4,
S_FZEROBOOM5,
S_FZEROBOOM6,
S_FZEROBOOM7,
S_FZEROBOOM8,
S_FZEROBOOM9,
S_FZEROBOOM10,
S_FZEROBOOM11,
S_FZEROBOOM12,
S_FZSLOWSMOKE1,
S_FZSLOWSMOKE2,
S_FZSLOWSMOKE3,
S_FZSLOWSMOKE4,
S_FZSLOWSMOKE5,
// Midnight Channel stuff:
S_SPOTLIGHT, // Spotlight decoration
S_RANDOMSHADOW, // Random Shadow. They're static and don't do nothing.
S_GARU1,
S_GARU2,
S_GARU3,
S_TGARU0,
S_TGARU1,
S_TGARU2,
S_TGARU3, // Wind attack used by Roaming Shadows on Players.
S_ROAMINGSHADOW, // Roaming Shadow (the one that uses above's wind attack or smth)
S_MAYONAKAARROW, // Arrow sign
// Mementos stuff:
S_REAPER_INVIS, // Reaper waiting for spawning
S_REAPER, // Reaper main frame where its thinker is handled
S_MEMENTOSTP, // Mementos teleporter state. (Used for spawning particles)
// JackInTheBox
S_JITB1,
S_JITB2,
S_JITB3,
S_JITB4,
S_JITB5,
S_JITB6,
// Color Drive
S_CDMOONSP,
S_CDBUSHSP,
S_CDTREEASP,
S_CDTREEBSP,
#ifdef SEENAMES #ifdef SEENAMES
S_NAMECHECK, S_NAMECHECK,
#endif #endif
@ -4191,9 +4303,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
@ -4283,6 +4394,28 @@ typedef enum mobj_type
MT_KARMAHITBOX, MT_KARMAHITBOX,
MT_KARMAWHEEL, MT_KARMAWHEEL,
MT_FZEROBOOM,
// Midnight Channel stuff:
MT_SPOTLIGHT, // Spotlight Object
MT_RANDOMSHADOW, // Random static Shadows.
MT_ROAMINGSHADOW, // Roaming Shadows.
MT_MAYONAKAARROW, // Arrow static signs for Mayonaka
// Mementos stuff
MT_REAPERWAYPOINT,
MT_REAPER,
MT_MEMENTOSTP,
MT_MEMENTOSPARTICLE,
MT_JACKINTHEBOX,
// Color Drive:
MT_CDMOON,
MT_CDBUSH,
MT_CDTREEA,
MT_CDTREEB,
#ifdef SEENAMES #ifdef SEENAMES
MT_NAMECHECK, MT_NAMECHECK,
#endif #endif

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
// nospectategrief is the players in-game needed to eliminate the person in last // nospectategrief is the players in-game needed to eliminate the person in last
@ -488,28 +486,28 @@ boolean K_IsPlayerWanted(player_t *player)
static INT32 K_KartItemOddsRace[NUMKARTRESULTS][9] = static INT32 K_KartItemOddsRace[NUMKARTRESULTS][9] =
{ {
//P-Odds 0 1 2 3 4 5 6 7 8 //P-Odds 0 1 2 3 4 5 6 7 8
/*Sneaker*/ {20, 0, 0, 3, 6, 6, 0, 0, 0 }, // Sneaker /*Sneaker*/ {20, 0, 0, 4, 6, 6, 0, 0, 0 }, // Sneaker
/*Rocket Sneaker*/ { 0, 0, 0, 0, 0, 2, 5, 4, 0 }, // Rocket Sneaker /*Rocket Sneaker*/ { 0, 0, 0, 0, 0, 2, 5, 5, 0 }, // Rocket Sneaker
/*Invincibility*/ { 0, 0, 0, 0, 0, 1, 5, 6,16 }, // Invincibility /*Invincibility*/ { 0, 0, 0, 0, 0, 1, 4, 6,16 }, // Invincibility
/*Banana*/ { 0, 9, 4, 2, 1, 0, 0, 0, 0 }, // Banana /*Banana*/ { 0, 9, 4, 2, 1, 0, 0, 0, 0 }, // Banana
/*Eggman Monitor*/ { 0, 4, 3, 2, 0, 0, 0, 0, 0 }, // Eggman Monitor /*Eggman Monitor*/ { 0, 4, 3, 2, 0, 0, 0, 0, 0 }, // Eggman Monitor
/*Orbinaut*/ { 0, 6, 5, 4, 2, 0, 0, 0, 0 }, // Orbinaut /*Orbinaut*/ { 0, 6, 5, 3, 2, 0, 0, 0, 0 }, // Orbinaut
/*Jawz*/ { 0, 0, 3, 2, 2, 1, 0, 0, 0 }, // Jawz /*Jawz*/ { 0, 0, 3, 2, 1, 1, 0, 0, 0 }, // Jawz
/*Mine*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Mine /*Mine*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Mine
/*Ballhog*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Ballhog /*Ballhog*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Ballhog
/*Self-Propelled Bomb*/ { 0, 0, 1, 1, 1, 2, 2, 3, 2 }, // Self-Propelled Bomb /*Self-Propelled Bomb*/ { 0, 0, 1, 2, 3, 4, 2, 2, 0 }, // Self-Propelled Bomb
/*Grow*/ { 0, 0, 0, 0, 0, 1, 3, 6, 4 }, // Grow /*Grow*/ { 0, 0, 0, 0, 0, 1, 3, 5, 4 }, // Grow
/*Shrink*/ { 0, 0, 0, 0, 0, 0, 0, 1, 0 }, // Shrink /*Shrink*/ { 0, 0, 0, 0, 0, 0, 1, 2, 0 }, // Shrink
/*Thunder Shield*/ { 0, 1, 2, 0, 0, 0, 0, 0, 0 }, // Thunder Shield /*Thunder Shield*/ { 0, 1, 2, 0, 0, 0, 0, 0, 0 }, // Thunder Shield
/*Hyudoro*/ { 0, 0, 0, 0, 1, 2, 1, 0, 0 }, // Hyudoro /*Hyudoro*/ { 0, 0, 0, 0, 1, 2, 1, 0, 0 }, // Hyudoro
/*Pogo Spring*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // Pogo Spring /*Pogo Spring*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // Pogo Spring
/*Kitchen Sink*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // Kitchen Sink /*Kitchen Sink*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // Kitchen Sink
/*Sneaker x3*/ { 0, 0, 0, 0, 3, 6, 5, 3, 0 }, // Sneaker x3 /*Sneaker x3*/ { 0, 0, 0, 0, 3, 6, 6, 2, 0 }, // Sneaker x3
/*Banana x3*/ { 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // Banana x3 /*Banana x3*/ { 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // Banana x3
/*Banana x10*/ { 0, 0, 0, 0, 1, 0, 0, 0, 0 }, // Banana x10 /*Banana x10*/ { 0, 0, 0, 0, 1, 0, 0, 0, 0 }, // Banana x10
/*Orbinaut x3*/ { 0, 0, 0, 1, 1, 0, 0, 0, 0 }, // Orbinaut x3 /*Orbinaut x3*/ { 0, 0, 0, 1, 0, 0, 0, 0, 0 }, // Orbinaut x3
/*Orbinaut x4*/ { 0, 0, 0, 0, 0, 1, 1, 0, 0 }, // Orbinaut x4 /*Orbinaut x4*/ { 0, 0, 0, 0, 1, 1, 0, 0, 0 }, // Orbinaut x4
/*Jawz x2*/ { 0, 0, 0, 1, 1, 0, 0, 0, 0 } // Jawz x2 /*Jawz x2*/ { 0, 0, 0, 1, 2, 0, 0, 0, 0 } // Jawz x2
}; };
static INT32 K_KartItemOddsBattle[NUMKARTRESULTS][6] = static INT32 K_KartItemOddsBattle[NUMKARTRESULTS][6] =
@ -1052,7 +1050,6 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
mobj_t *fx; mobj_t *fx;
fixed_t momdifx, momdify; fixed_t momdifx, momdify;
fixed_t distx, disty; fixed_t distx, disty;
//fixed_t nobumpx = 0, nobumpy = 0;
fixed_t dot, p; fixed_t dot, p;
fixed_t mass1, mass2; fixed_t mass1, mass2;
@ -1101,20 +1098,28 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid)
momdify = FixedMul((25*mapheaderinfo[gamemap-1]->mobj_scale), normalisedy); momdify = FixedMul((25*mapheaderinfo[gamemap-1]->mobj_scale), normalisedy);
} }
/*if (mass1 == 0 && mass2 > 0) // Adds the OTHER player's momentum, so that it reduces the chance of you being "inside" the other object
{
nobumpx = mobj2->momx;
nobumpy = mobj2->momy;
}
else if (mass2 == 0 && mass1 > 0)
{
nobumpx = mobj1->momx;
nobumpy = mobj1->momy;
}*/
distx = (mobj1->x + mobj2->momx) - (mobj2->x + mobj1->momx); distx = (mobj1->x + mobj2->momx) - (mobj2->x + mobj1->momx);
disty = (mobj1->y + mobj2->momy) - (mobj2->y + mobj1->momy); disty = (mobj1->y + mobj2->momy) - (mobj2->y + mobj1->momy);
{ // Don't allow dist to get WAY too low, that it pushes you stupidly huge amounts, or backwards...
fixed_t dist = P_AproxDistance(distx, disty);
fixed_t nx = FixedDiv(distx, dist);
fixed_t ny = FixedDiv(disty, dist);
if (P_AproxDistance(distx, disty) < (3*mobj1->radius)/4)
{
distx = FixedMul((3*mobj1->radius)/4, nx);
disty = FixedMul((3*mobj1->radius)/4, ny);
}
if (P_AproxDistance(distx, disty) < (3*mobj2->radius)/4)
{
distx = FixedMul((3*mobj2->radius)/4, nx);
disty = FixedMul((3*mobj2->radius)/4, ny);
}
}
if (distx == 0 && disty == 0) if (distx == 0 && disty == 0)
{ {
// if there's no distance between the 2, they're directly on top of each other, don't run this // if there's no distance between the 2, they're directly on top of each other, don't run this
@ -1950,7 +1955,7 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
return; return;
} }
void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we just throw the player up higher here and extend their spinout timer void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A bit of a hack, we just throw the player up higher here and extend their spinout timer
{ {
UINT8 scoremultiply = 1; UINT8 scoremultiply = 1;
if (G_BattleGametype()) if (G_BattleGametype())
@ -1964,8 +1969,8 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
if (player->health <= 0) if (player->health <= 0)
return; return;
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_spinouttimer] > 0 if (/*player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_spinouttimer] > 0 // Explosions should combo, because of SPB and Eggman
|| player->kartstuff[k_invincibilitytimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_hyudorotimer] > 0 ||*/player->kartstuff[k_invincibilitytimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_hyudorotimer] > 0
|| (G_BattleGametype() && ((player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1))) || (G_BattleGametype() && ((player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer]) || player->kartstuff[k_comebackmode] == 1)))
{ {
K_DoInstashield(player); K_DoInstashield(player);
@ -1981,7 +1986,8 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
player->kartstuff[k_sneakertimer] = 0; player->kartstuff[k_sneakertimer] = 0;
player->kartstuff[k_driftboost] = 0; player->kartstuff[k_driftboost] = 0;
if (G_BattleGametype()) // This is the only part that SHOULDN'T combo :VVVVV
if (G_BattleGametype() && !(player->powers[pw_flashing] > 0 || player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_spinouttimer] > 0))
{ {
if (source && source->player && player != source->player) if (source && source->player && player != source->player)
{ {
@ -2024,6 +2030,12 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
player->powers[pw_flashing] = K_GetKartFlashing(player); player->powers[pw_flashing] = K_GetKartFlashing(player);
if (inflictor && inflictor->type == MT_SPBEXPLOSION && inflictor->extravalue1)
{
player->kartstuff[k_spinouttimer] = (3*player->kartstuff[k_spinouttimer])/2;
player->mo->momz *= 2;
}
if (player->mo->state != &states[S_KART_SPIN]) if (player->mo->state != &states[S_KART_SPIN])
P_SetPlayerMobjState(player->mo, S_KART_SPIN); P_SetPlayerMobjState(player->mo, S_KART_SPIN);
@ -2194,9 +2206,6 @@ void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32
mobj->momy = FixedMul(FixedDiv(mobjy - y, dist), FixedDiv(dist, 6*FRACUNIT)); mobj->momy = FixedMul(FixedDiv(mobjy - y, dist), FixedDiv(dist, 6*FRACUNIT));
mobj->momz = FixedMul(FixedDiv(mobjz - z, dist), FixedDiv(dist, 6*FRACUNIT)); mobj->momz = FixedMul(FixedDiv(mobjz - z, dist), FixedDiv(dist, 6*FRACUNIT));
mobj->flags |= MF_NOCLIPTHING;
mobj->flags &= ~MF_SPECIAL;
P_SetTarget(&mobj->target, source); P_SetTarget(&mobj->target, source);
} }
} }
@ -2215,7 +2224,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++)
{ {
@ -2223,7 +2232,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
dust->angle = (ANGLE_180/16) * i; dust->angle = (ANGLE_180/16) * i;
P_SetScale(dust, source->scale); P_SetScale(dust, source->scale);
dust->destscale = source->scale*10; dust->destscale = source->scale*10;
dust->scalespeed = FixedMul(dust->scalespeed, source->scale); dust->scalespeed = source->scale/12;
P_InstaThrust(dust, dust->angle, FixedMul(20*FRACUNIT, source->scale)); P_InstaThrust(dust, dust->angle, FixedMul(20*FRACUNIT, source->scale));
truc = P_SpawnMobj(source->x + P_RandomRange(-radius, radius)*FRACUNIT, truc = P_SpawnMobj(source->x + P_RandomRange(-radius, radius)*FRACUNIT,
@ -2231,7 +2240,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMEXPLODE); source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMEXPLODE);
P_SetScale(truc, source->scale); P_SetScale(truc, source->scale);
truc->destscale = source->scale*6; truc->destscale = source->scale*6;
truc->scalespeed = FixedMul(truc->scalespeed, source->scale); truc->scalespeed = source->scale/12;
speed = FixedMul(10*FRACUNIT, source->scale)>>FRACBITS; speed = FixedMul(10*FRACUNIT, source->scale)>>FRACBITS;
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT; truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT; truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
@ -2247,7 +2256,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
source->z + P_RandomRange(0, height)*FRACUNIT, MT_SMOKE); source->z + P_RandomRange(0, height)*FRACUNIT, MT_SMOKE);
P_SetScale(dust, source->scale); P_SetScale(dust, source->scale);
dust->destscale = source->scale*10; dust->destscale = source->scale*10;
dust->scalespeed = FixedMul(dust->scalespeed, source->scale); dust->scalespeed = source->scale/12;
dust->tics = 30; dust->tics = 30;
dust->momz = P_RandomRange(FixedMul(3*FRACUNIT, source->scale)>>FRACBITS, FixedMul(7*FRACUNIT, source->scale)>>FRACBITS)*FRACUNIT; dust->momz = P_RandomRange(FixedMul(3*FRACUNIT, source->scale)>>FRACBITS, FixedMul(7*FRACUNIT, source->scale)>>FRACBITS)*FRACUNIT;
@ -2256,7 +2265,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMPARTICLE); source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMPARTICLE);
P_SetScale(truc, source->scale); P_SetScale(truc, source->scale);
truc->destscale = source->scale*5; truc->destscale = source->scale*5;
truc->scalespeed = FixedMul(truc->scalespeed, source->scale); truc->scalespeed = source->scale/12;
speed = FixedMul(20*FRACUNIT, source->scale)>>FRACBITS; speed = FixedMul(20*FRACUNIT, source->scale)>>FRACBITS;
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT; truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT; truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
@ -2655,7 +2664,7 @@ void K_DriftDustHandling(mobj_t *spawner)
dust->momz = P_MobjFlip(spawner) * (P_RandomRange(1, 4) * (spawner->scale)); dust->momz = P_MobjFlip(spawner) * (P_RandomRange(1, 4) * (spawner->scale));
P_SetScale(dust, spawner->scale/2); P_SetScale(dust, spawner->scale/2);
dust->destscale = spawner->scale * 3; dust->destscale = spawner->scale * 3;
dust->scalespeed = FixedMul(dust->scalespeed, spawner->scale); dust->scalespeed = spawner->scale/12;
if (leveltime % 6 == 0) if (leveltime % 6 == 0)
S_StartSound(spawner, sfx_screec); S_StartSound(spawner, sfx_screec);
@ -2758,7 +2767,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);
@ -3072,38 +3081,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);
@ -3977,6 +3954,8 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
//CONS_Printf("cam: %d, dest: %d\n", player->kartstuff[k_boostcam], player->kartstuff[k_destboostcam]); //CONS_Printf("cam: %d, dest: %d\n", player->kartstuff[k_boostcam], player->kartstuff[k_destboostcam]);
} }
player->kartstuff[k_timeovercam] = 0;
if (player->kartstuff[k_spinouttimer]) if (player->kartstuff[k_spinouttimer])
{ {
if ((P_IsObjectOnGround(player->mo) || player->kartstuff[k_spinouttype] == 1) if ((P_IsObjectOnGround(player->mo) || player->kartstuff[k_spinouttype] == 1)
@ -4067,13 +4046,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]--;
@ -4134,8 +4106,8 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
if (player->kartstuff[k_eggmanexplode] <= 0) if (player->kartstuff[k_eggmanexplode] <= 0)
{ {
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]]
@ -4966,45 +4938,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;
@ -5013,7 +4954,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
&& player->kartstuff[k_growshrinktimer] <= 0) // Grow holds the item box hostage && player->kartstuff[k_growshrinktimer] <= 0) // Grow holds the item box hostage
{ {
K_PlayPowerGloatSound(player->mo); K_PlayPowerGloatSound(player->mo);
player->mo->scalespeed = FRACUNIT/TICRATE; player->mo->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/TICRATE;
player->mo->destscale = 3*(mapheaderinfo[gamemap-1]->mobj_scale)/2; player->mo->destscale = 3*(mapheaderinfo[gamemap-1]->mobj_scale)/2;
if (cv_kartdebugshrink.value && !player->bot) if (cv_kartdebugshrink.value && !player->bot)
player->mo->destscale = 6*player->mo->destscale/8; player->mo->destscale = 6*player->mo->destscale/8;
@ -5117,8 +5058,7 @@ 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 = 20*TICRATE; indirectitemcooldown = 20*TICRATE;
if (player->kartstuff[k_hyudorotimer] > 0) if (player->kartstuff[k_hyudorotimer] > 0)
@ -5606,7 +5546,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];
@ -5763,10 +5702,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++)
@ -5888,7 +5823,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)
@ -5954,9 +5888,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
@ -5974,8 +5905,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;
@ -5994,8 +5923,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
@ -6620,23 +6547,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;
@ -7680,9 +7590,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

@ -29,7 +29,7 @@ void K_KartPlayerAfterThink(player_t *player);
void K_DoInstashield(player_t *player); void K_DoInstashield(player_t *player);
void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem); void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem);
void K_SquishPlayer(player_t *player, mobj_t *source); void K_SquishPlayer(player_t *player, mobj_t *source);
void K_ExplodePlayer(player_t *player, mobj_t *source); void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor);
void K_StealBumper(player_t *player, player_t *victim, boolean force); void K_StealBumper(player_t *player, player_t *victim, boolean force);
void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 number, mobjtype_t type, angle_t rotangle, boolean spawncenter, boolean ghostit, mobj_t *source); void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 number, mobjtype_t type, angle_t rotangle, boolean spawncenter, boolean ghostit, mobj_t *source);
void K_SpawnMineExplosion(mobj_t *source, UINT8 color); void K_SpawnMineExplosion(mobj_t *source, UINT8 color);

View file

@ -2141,12 +2141,15 @@ static int lib_kExplodePlayer(lua_State *L)
{ {
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ)); mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
mobj_t *inflictor = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ));
NOHUD NOHUD
if (!player) if (!player)
return LUA_ErrInvalid(L, "player_t"); return LUA_ErrInvalid(L, "player_t");
if (!source) if (!source)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
K_ExplodePlayer(player, source); if (!inflictor)
return LUA_ErrInvalid(L, "mobj_t");
K_ExplodePlayer(player, source, inflictor);
return 0; return 0;
} }

View file

@ -314,7 +314,7 @@ menu_t OP_SoundOptionsDef;
static void M_ToggleSFX(INT32 choice); static void M_ToggleSFX(INT32 choice);
static void M_ToggleDigital(INT32 choice); static void M_ToggleDigital(INT32 choice);
//static void M_ToggleMIDI(INT32 choice); //static void M_ToggleMIDI(INT32 choice);
static void M_RestartAudio(void); //static void M_RestartAudio(void);
//Misc //Misc
menu_t /*OP_DataOptionsDef,*/ OP_ScreenshotOptionsDef, OP_EraseDataDef; menu_t /*OP_DataOptionsDef,*/ OP_ScreenshotOptionsDef, OP_EraseDataDef;
@ -1315,7 +1315,7 @@ static menuitem_t OP_SoundOptionsMenu[] =
{ {
{IT_KEYHANDLER|IT_STRING, NULL, "SFX", M_ToggleSFX, 10}, {IT_KEYHANDLER|IT_STRING, NULL, "SFX", M_ToggleSFX, 10},
{IT_STRING|IT_CVAR|IT_CV_SLIDER, {IT_STRING|IT_CVAR|IT_CV_SLIDER,
NULL, "SFX Volume", &cv_soundvolume, 18}, NULL, "SFX Volume", &cv_soundvolume, 18},
{IT_KEYHANDLER|IT_STRING, NULL, "Music", M_ToggleDigital, 30}, {IT_KEYHANDLER|IT_STRING, NULL, "Music", M_ToggleDigital, 30},
{IT_STRING|IT_CVAR|IT_CV_SLIDER, {IT_STRING|IT_CVAR|IT_CV_SLIDER,
@ -1330,16 +1330,16 @@ static menuitem_t OP_SoundOptionsMenu[] =
NULL, "CD Volume", &cd_volume, 40}, NULL, "CD Volume", &cd_volume, 40},
#endif*/ #endif*/
{IT_STRING|IT_CALL, NULL, "Restart Audio System", M_RestartAudio, 50}, //{IT_STRING|IT_CALL, NULL, "Restart Audio System", M_RestartAudio, 50},
{IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 65}, {IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 50},
{IT_STRING|IT_CVAR, NULL, "Surround Sound", &surround, 75}, {IT_STRING|IT_CVAR, NULL, "Surround Sound", &surround, 60},
{IT_STRING|IT_CVAR, NULL, "Chat sounds", &cv_chatnotifications, 90}, {IT_STRING|IT_CVAR, NULL, "Chat sounds", &cv_chatnotifications, 75},
{IT_STRING|IT_CVAR, NULL, "Character voices", &cv_kartvoices, 100}, {IT_STRING|IT_CVAR, NULL, "Character voices", &cv_kartvoices, 85},
{IT_STRING|IT_CVAR, NULL, "Powerup Warning", &cv_kartinvinsfx, 110}, {IT_STRING|IT_CVAR, NULL, "Powerup Warning", &cv_kartinvinsfx, 95},
{IT_KEYHANDLER|IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 125}, {IT_KEYHANDLER|IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 110},
}; };
/*static menuitem_t OP_DataOptionsMenu[] = /*static menuitem_t OP_DataOptionsMenu[] =
@ -7421,6 +7421,7 @@ static void M_StartServer(INT32 choice)
{ {
paused = false; paused = false;
SV_StartSinglePlayerServer(); SV_StartSinglePlayerServer();
multiplayer = true; // yeah, SV_StartSinglePlayerServer clobbers this...
D_MapChange(cv_nextmap.value, cv_newgametype.value, (boolean)cv_kartencore.value, 1, 1, false, false); D_MapChange(cv_nextmap.value, cv_newgametype.value, (boolean)cv_kartencore.value, 1, 1, false, false);
} }
else else
@ -9041,25 +9042,10 @@ static void M_ToggleDigital(INT32 choice)
} }
}*/ }*/
static void M_RestartAudio(void) /*static void M_RestartAudio(void)
{ {
S_StopMusic(); COM_ImmedExecute("restartaudio");
I_ShutdownMusic(); }*/
I_ShutdownSound();
I_StartupSound();
I_InitMusic();
I_SetSfxVolume(cv_soundvolume.value);
I_SetDigMusicVolume(cv_digmusicvolume.value);
//I_SetMIDIMusicVolume(cv_midimusicvolume.value);
S_StartSound(NULL, sfx_strpst);
if (Playing()) // Gotta make sure the player is in a level
P_RestoreMusic(&players[consoleplayer]);
else
S_ChangeMusicInternal("titles", looptitle);
}
// =============== // ===============
// VIDEO MODE MENU // VIDEO MODE MENU

View file

@ -190,9 +190,17 @@ 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
void A_FZBoomFlash(mobj_t *actor); // SRB2kart
void A_FZBoomSmoke(mobj_t *actor); // SRB2kart
void A_RandomShadowFrame(mobj_t *actor); // SRB2kart
void A_RoamingShadowThinker(mobj_t *actor); //SRB2kart
void A_MayonakaArrow(mobj_t *actor); //SRB2kart
void A_ReaperThinker(mobj_t *actor); //SRB2kart
void A_MementosTPParticles(mobj_t *actor); //SRB2kart
void A_OrbitNights(mobj_t *actor); void A_OrbitNights(mobj_t *actor);
void A_GhostMe(mobj_t *actor); void A_GhostMe(mobj_t *actor);
void A_SetObjectState(mobj_t *actor); void A_SetObjectState(mobj_t *actor);
@ -3406,7 +3414,7 @@ void A_ParticleSpawn(mobj_t *actor)
P_SetScale(spawn, actor->scale); P_SetScale(spawn, actor->scale);
spawn->momz = speed; spawn->momz = speed;
spawn->destscale = FixedDiv(spawn->scale<<FRACBITS, 100<<FRACBITS); spawn->destscale = FixedDiv(spawn->scale<<FRACBITS, 100<<FRACBITS);
spawn->scalespeed = FixedDiv(((actor->spawnpoint->angle >> 8) & 63) << FRACBITS, 100<<FRACBITS); spawn->scalespeed = FixedDiv(((actor->spawnpoint->angle >> 8) & 63) * actor->scale, 100<<FRACBITS);
actor->tics = actor->spawnpoint->extrainfo + 1; actor->tics = actor->spawnpoint->extrainfo + 1;
} }
@ -4014,7 +4022,7 @@ static inline boolean PIT_MineExplode(mobj_t *thing)
grenade->flags2 |= MF2_DEBRIS; grenade->flags2 |= MF2_DEBRIS;
if (thing->player) // Looks like we're going to have to need a seperate function for this too if (thing->player) // Looks like we're going to have to need a seperate function for this too
K_ExplodePlayer(thing->player, grenade->target); K_ExplodePlayer(thing->player, grenade->target, grenade);
else else
P_DamageMobj(thing, grenade, grenade->target, 1); P_DamageMobj(thing, grenade, grenade->target, 1);
@ -4053,7 +4061,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 +8181,7 @@ void A_ToggleFlameJet(mobj_t* actor)
} }
} }
//{ SRB2kart - A_ItemPop, A_JawzChase, A_JawzExplode, A_MineExplode, and A_BallhogExplode //{ SRB2kart Actions
void A_ItemPop(mobj_t *actor) void A_ItemPop(mobj_t *actor)
{ {
mobj_t *remains; mobj_t *remains;
@ -8293,7 +8301,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 +8319,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 +8327,220 @@ 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; fixed_t wspeed, xyspeed, zspeed;
#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; // Default speed
range = FixedMul(actor->info->painchance, mapheaderinfo[gamemap-1]->mobj_scale); wspeed = FixedMul(actor->info->speed, mapheaderinfo[gamemap-1]->mobj_scale);
if (gamespeed == 0)
wspeed = FixedMul(wspeed, FRACUNIT-FRACUNIT/4);
else if (gamespeed == 2)
wspeed = FixedMul(wspeed, FRACUNIT+FRACUNIT/4);
for (th = thinkercap.next; th != &thinkercap; th = th->next) if (actor->threshold) // Just fired, go straight.
{ {
if (P_MobjWasRemoved(actor)) P_InstaThrust(actor, actor->angle, wspeed);
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) // MODE: TARGETING
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)
{
fixed_t defspeed = wspeed;
fixed_t range = (160*actor->tracer->scale);
if (actor->target && actor->target->player) // Maybe we want SPB to target an object later? IDK lol
K_SpawnMineExplosion(actor, actor->target->player->skincolor); if (actor->tracer->player) // 7/8ths max speed for Knuckles, 3/4ths max speed for min accel, exactly max speed for max accel
else {
K_SpawnMineExplosion(actor, SKINCOLOR_RED); if (!P_IsObjectOnGround(actor->tracer) && !actor->tracer->player->kartstuff[k_pogospring])
defspeed = 7*actor->tracer->player->speed/8; // In the air you have no control; basically don't hit unless you make a near complete stop
else
defspeed = ((33 - actor->tracer->player->kartspeed) * K_GetKartSpeed(actor->tracer->player, false)) / 32;
}
P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND); // Play the intimidating gurgle
if (!S_SoundPlaying(actor, actor->info->activesound))
S_StartSound(actor, actor->info->activesound);
dist = P_AproxDistance(P_AproxDistance(actor->x-actor->tracer->x, actor->y-actor->tracer->y), actor->z-actor->tracer->z);
wspeed = FixedMul(defspeed, FRACUNIT + FixedDiv(dist-range, range));
if (wspeed < defspeed)
wspeed = defspeed;
if (wspeed > (3*defspeed)/2)
wspeed = (3*defspeed)/2;
hang = R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y);
vang = R_PointToAngle2(0, actor->z, dist, actor->tracer->z);
{
// Smoothly rotate horz angle
angle_t input = hang - actor->angle;
boolean invert = (input > ANGLE_180);
if (invert)
input = InvAngle(input);
// Slow down when turning; it looks better and makes U-turns not unfair
xyspeed = FixedMul(wspeed, max(0, (((180<<FRACBITS) - AngleFixed(input)) / 90) - FRACUNIT));
input = FixedAngle(AngleFixed(input)/4);
if (invert)
input = InvAngle(input);
actor->angle += input;
// Smoothly rotate vert angle
input = vang - actor->movedir;
invert = (input > ANGLE_180);
if (invert)
input = InvAngle(input);
// Slow down when turning; might as well do it for momz, since we do it above too
zspeed = FixedMul(wspeed, max(0, (((180<<FRACBITS) - AngleFixed(input)) / 90) - FRACUNIT));
input = FixedAngle(AngleFixed(input)/4);
if (invert)
input = InvAngle(input);
actor->movedir += input;
}
actor->momx = FixedMul(FixedMul(xyspeed, FINECOSINE(actor->angle>>ANGLETOFINESHIFT)), FINECOSINE(actor->movedir>>ANGLETOFINESHIFT));
actor->momy = FixedMul(FixedMul(xyspeed, FINESINE(actor->angle>>ANGLETOFINESHIFT)), FINECOSINE(actor->movedir>>ANGLETOFINESHIFT));
actor->momz = FixedMul(zspeed, FINESINE(actor->movedir>>ANGLETOFINESHIFT));
// Red speed lines for when it's gaining on its target. A tell for when you're starting to lose too much speed!
if (R_PointToDist2(0, 0, actor->momx, actor->momy) > (actor->tracer->player ? (16*actor->tracer->player->speed)/15
: (16*R_PointToDist2(0, 0, actor->tracer->momx, actor->tracer->momy))/15) // Going faster than the target
&& xyspeed > K_GetKartSpeed(actor->tracer->player, false)/4) // Don't display speedup lines at pitifully low speeds
{
mobj_t *fast = P_SpawnMobj(actor->x + (P_RandomRange(-24,24) * actor->scale),
actor->y + (P_RandomRange(-24,24) * actor->scale),
actor->z + (actor->height/2) + (P_RandomRange(-24,24) * actor->scale),
MT_FASTLINE);
fast->angle = R_PointToAngle2(0, 0, actor->momx, actor->momy);
//fast->momx = 3*actor->momx/4;
//fast->momy = 3*actor->momy/4;
//fast->momz = 3*actor->momz/4;
fast->color = SKINCOLOR_RED;
fast->colorized = true;
}
return;
}
else // Target's gone, return to SEEKING
{
P_SetTarget(&actor->tracer, NULL);
actor->extravalue1 = 0; // Find someone new next tic
return;
}
}
else // MODE: SEEKING
{
// Find the player with the best rank
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator || players[i].exiting)
continue; // not in-game
if (!players[i].mo)
continue; // no mobj
if (players[i].mo->health <= 0)
continue; // dead
if (players[i].kartstuff[k_respawn])
continue; // respawning
if (players[i].kartstuff[k_position] < bestrank)
{
bestrank = players[i].kartstuff[k_position];
player = &players[i];
}
}
// No one there?
if (player == NULL || !player->mo)
{
#if 0
// SELF-DESTRUCT?
mobj_t *spbexplode;
S_StopSound(actor); // Don't continue playing the gurgle or the siren
spbexplode = P_SpawnMobj(actor->x, actor->y, actor->z, MT_SPBEXPLOSION);
P_SetTarget(&spbexplode->target, actor->target);
P_RemoveMobj(actor);
#else
actor->momx = actor->momy = actor->momz = 0;
#endif
return;
}
// Found someone, now get close enough to initiate the slaughter...
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);
{
// Smoothly rotate horz angle
angle_t input = hang - actor->angle;
boolean invert = (input > ANGLE_180);
if (invert)
input = InvAngle(input);
// Slow down when turning; it looks better and makes U-turns not unfair
xyspeed = FixedMul(wspeed, max(0, (((180<<FRACBITS) - AngleFixed(input)) / 90) - FRACUNIT));
input = FixedAngle(AngleFixed(input)/4);
if (invert)
input = InvAngle(input);
actor->angle += input;
// Smoothly rotate vert angle
input = vang - actor->movedir;
invert = (input > ANGLE_180);
if (invert)
input = InvAngle(input);
// Slow down when turning; might as well do it for momz, since we do it above too
zspeed = FixedMul(wspeed, max(0, (((180<<FRACBITS) - AngleFixed(input)) / 90) - FRACUNIT));
input = FixedAngle(AngleFixed(input)/4);
if (invert)
input = InvAngle(input);
actor->movedir += input;
}
actor->momx = FixedMul(FixedMul(xyspeed, FINECOSINE(actor->angle>>ANGLETOFINESHIFT)), FINECOSINE(actor->movedir>>ANGLETOFINESHIFT));
actor->momy = FixedMul(FixedMul(xyspeed, FINESINE(actor->angle>>ANGLETOFINESHIFT)), FINECOSINE(actor->movedir>>ANGLETOFINESHIFT));
actor->momz = FixedMul(zspeed, FINESINE(actor->movedir>>ANGLETOFINESHIFT));
if (dist <= (3072*actor->tracer->scale)) // Close enough to target?
{
S_StartSound(actor, actor->info->attacksound); // Siren sound; might not need this anymore, but I'm keeping it for now just for debugging.
actor->extravalue1 = 1; // TARGET ACQUIRED
}
}
return; return;
}*/ }
void A_BallhogExplode(mobj_t *actor) void A_BallhogExplode(mobj_t *actor)
{ {
@ -8421,6 +8584,425 @@ void A_LightningFollowPlayer(mobj_t *actor)
return; return;
} }
// A_FZBoomFlash:
// Flash everyone close enough to the boom
void A_FZBoomFlash(mobj_t *actor)
{
UINT8 i;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_FZBoomFlash", actor))
return;
#endif
for (i = 0; i < MAXPLAYERS; i++)
{
fixed_t dist;
if (!playeringame[i] || !players[i].mo)
continue;
dist = P_AproxDistance(P_AproxDistance(actor->x-players[i].mo->x, actor->y-players[i].mo->y), actor->z-players[i].mo->z);
if (dist < 1536<<FRACBITS)
P_FlashPal(&players[i], PAL_WHITE, 2);
}
return;
}
// A_FZBoomSmoke:
// Spawns pinkish smoke around the object
// Var1 is radius add
void A_FZBoomSmoke(mobj_t *actor)
{
INT32 i;
INT32 rad = 47+(23*var1);
#ifdef HAVE_BLUA
if (LUA_CallAction("A_FZBoomSmoke", actor))
return;
#endif
for (i = 0; i < 8+(4*var1); i++)
{
mobj_t *smoke = P_SpawnMobj(actor->x + (P_RandomRange(-rad, rad)*actor->scale), actor->y + (P_RandomRange(-rad, rad)*actor->scale),
actor->z + (P_RandomRange(0, 72)*actor->scale), MT_THOK);
P_SetMobjState(smoke, S_FZEROSMOKE1);
smoke->tics += P_RandomRange(-3, 4);
smoke->scale = actor->scale*3;
}
return;
}
// A_RandomShadowFrame
// Gives a random sprite for the Mayonaka static shadows. Dumb and simple.
void A_RandomShadowFrame(mobj_t *actor)
{
mobj_t *fire;
mobj_t *fake;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_RandomShadowFrame", (actor)))
return;
#endif
if (!actor->extravalue1) // Hack that spawns thoks that look like random shadows. Otherwise the state would overwrite our frame and that's a pain.
{
fake = P_SpawnMobj(actor->x, actor->y, actor->z, MT_THOK);
fake->sprite = SPR_ENM1;
fake->frame = P_RandomRange(0, 6);
P_SetScale(fake, FRACUNIT*3/2);
fake->scale = FRACUNIT*3/2;
fake->destscale = FRACUNIT*3/2;
fake->angle = actor->angle;
fake->tics = -1;
actor->flags2 |= MF2_DONTDRAW;
actor->extravalue1 = 1;
}
P_SetScale(actor, FRACUNIT*3/2);
// I have NO CLUE how to hardcode all of that fancy Linedef Executor shit so the fire spinout will be done by these entities directly.
if (P_LookForPlayers(actor, false, false, 380<<FRACBITS)) // got target
{
if (actor->target && !actor->target->player->powers[pw_flashing]
&& !actor->target->player->kartstuff[k_invincibilitytimer]
&& !actor->target->player->kartstuff[k_growshrinktimer]
&& !actor->target->player->kartstuff[k_spinouttimer]
&& P_IsObjectOnGround(actor->target)
&& actor->z == actor->target->z)
{
P_DamageMobj(actor->target, actor, actor, 1);
P_InstaThrust(actor->target, actor->angle, 16<<FRACBITS);
fire = P_SpawnMobj(actor->target->x, actor->target->y, actor->target->z, MT_THOK);
P_SetMobjStateNF(fire, S_QUICKBOOM1);
P_SetScale(fire, 4<<FRACBITS);
fire->color = SKINCOLOR_RED;
S_StartSound(actor->target, sfx_fire2);
}
}
return;
}
// A_RoamingShadowThinker
// Thinker for Midnight Channel's Roaming Shadows:
void A_RoamingShadowThinker(mobj_t *actor)
{
mobj_t *wind;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_RoamingShadowThinker", (actor)))
return;
#endif
// extravalue1 replaces "movetimer"
// extravalue2 replaces "stoptimer"
P_SetScale(actor, FRACUNIT*3/2);
if (!actor->extravalue2)
{
P_InstaThrust(actor, actor->angle, 8<<FRACBITS); // move at 8 fracs / sec
actor->extravalue1 = ((actor->extravalue1) ? (actor->extravalue1-1) : (TICRATE*5+1)); // deplete timer if set, set to 5 ticrate otherwise.
if (actor->extravalue1 == 1) // if timer reaches 1, do a u-turn.
{
actor->extravalue1 = 0;
actor->extravalue2 = 60;
}
// Search for and attack Players venturing too close in front of us.
if (P_LookForPlayers(actor, false, false, 256<<FRACBITS)) // got target
{
if (actor->target && !actor->target->player->powers[pw_flashing]
&& !actor->target->player->kartstuff[k_invincibilitytimer]
&& !actor->target->player->kartstuff[k_growshrinktimer]
&& !actor->target->player->kartstuff[k_spinouttimer])
{
// send them flying and spawn the WIND!
P_InstaThrust(actor->target, 0, 0);
P_DamageMobj(actor->target, actor, actor, 1);
P_SetObjectMomZ(actor->target, 16<<FRACBITS, false);
S_StartSound(actor->target, sfx_wind1);
// Spawn the WIND:
wind = P_SpawnMobj(actor->target->x, actor->target->y, actor->target->z, MT_THOK); // Opaque layer:
P_SetMobjState(wind, S_GARU1);
P_SetScale(wind, FRACUNIT*3/2);
wind = P_SpawnMobj(actor->target->x, actor->target->y, actor->target->z, MT_THOK); // Translucent layer:
P_SetMobjState(wind, S_TGARU0);
P_SetScale(wind, FRACUNIT*3/2);
wind->destscale = 30<<FRACBITS;
}
}
}
else // Handle U-Turn
{
actor->angle += ANG1*3;
actor->extravalue2--;
}
return;
}
// A_MayonakaArrow
// Used for the arrow sprite animations in Mayonaka. It's only extra visual bullshit to make em more random.
void A_MayonakaArrow(mobj_t *actor)
{
INT32 flip = 0;
INT32 iswarning;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_MayonakaArrow", (actor)))
return;
#endif
iswarning = actor->spawnpoint->options & MTF_OBJECTSPECIAL; // is our object a warning sign?
// "animtimer" is replaced by "extravalue1" here.
actor->extravalue1 = ((actor->extravalue1) ? (actor->extravalue1+1) : (P_RandomRange(0, (iswarning) ? (TICRATE/2) : TICRATE*3)));
flip = ((actor->spawnpoint->options & 1) ? (3) : (0)); // flip adds 3 frames, which is the flipped version of the sign.
// special warning behavior:
if (iswarning)
flip = 6;
actor->frame = flip + actor->extravalue2*3;
if (actor->extravalue1 >= TICRATE*7/2)
{
actor->extravalue1 = 0; // reset to 0 and start a new cycle.
// special behavior for warning sign; swap from warning to sneaker & reverse
if (iswarning)
actor->extravalue2 = (actor->extravalue2) ? (0) : (1);
}
else if (actor->extravalue1 > TICRATE*7/2 -4)
actor->frame = flip+2;
else if (actor->extravalue1 > TICRATE*3 && leveltime%2 > 0)
actor->frame = flip+1;
actor->frame |= FF_PAPERSPRITE;
actor->momz = 0;
return;
}
// A_MementosTPParticles
// Mementos teleporters particles effects. Short and simple.
void A_MementosTPParticles(mobj_t *actor)
{
mobj_t *particle;
mobj_t *mo2;
int i = 0;
thinker_t *th;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_MementosTPParticles", (actor)))
return;
#endif
for (; i<4; i++)
{
particle = P_SpawnMobj(actor->x + (P_RandomRange(-256, 256)<<FRACBITS), actor->y + (P_RandomRange(-256, 256)<<FRACBITS), actor->z + (P_RandomRange(48, 256)<<FRACBITS), MT_MEMENTOSPARTICLE);
particle->frame = 0;
particle->color = ((i%2) ? (SKINCOLOR_RED) : (SKINCOLOR_BLACK));
particle->destscale = 1;
P_HomingAttack(particle, actor);
}
// Although this is mostly used to spawn particles, we will also save the OTHER teleport inside actor->target. That way teleporting doesn't require a thinker iteration.
// Doesn't seem like much given the small amount of mobjs this map has but heh.
if (!actor->target)
{
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
if (mo2->type == MT_MEMENTOSTP && mo2 != actor)
{
P_SetTarget(&actor->target, mo2); // The main target we're pursing.
break;
}
}
}
}
// A_ReaperThinker
// Mementos's Reaper's thinker. A huge pain in the Derek Bum to translate from Lua to this shite if you ask me.
void A_ReaperThinker(mobj_t *actor)
{
mobj_t *particle; // particles to spawn
int i = 0; // for loops
angle_t an = ANGLE_22h; // Reminder that angle constants suck.
//Waypoint stuff:
mobj_t *mo2;
thinker_t *th;
//Player targetting stuff:
UINT32 maxscore = 0; // we target the player with the highest score so yeah there you go.
player_t *player; // used as a shortcut in a loop.
mobj_t *targetplayermo = NULL; // the player mo we can eventually target, or whatever.
#ifdef HAVE_BLUA
if (LUA_CallAction("A_ReaperThinker", (actor)))
return;
#endif
// We don't have custom variables or whatever so we'll do with whatever the fuck we have left.
if (actor->health == 1000) // if health is 1000, set it to a small scale and have it start growing with destscale. Then set the health to uh, not 1000.
{
actor->scale = 1;
actor->destscale = 2<<FRACBITS;
actor->scalespeed = FRACUNIT/24; // Should take a bit less than 2 seconds to fully grow.
S_StartSound(NULL, sfx_chain);
actor->health--; // now we have 999 health, so that above won't happen again. Awesome.
}
if (actor->scale < 2<<FRACBITS) // we haven't finished growing YET.
{
// Spawn particles as we grow out of the floor, ゴ ゴ ゴ ゴ
for (; i<16; i++)
{
particle = P_SpawnMobj(actor->x + (P_RandomRange(-60, 60)<<FRACBITS), actor->y + (P_RandomRange(-60, 60)<<FRACBITS), actor->z, MT_THOK);
particle->momz = 20<<FRACBITS;
particle->color = ((i%2 !=0) ? (SKINCOLOR_RED) : (SKINCOLOR_BLACK));
particle->frame = 0;
P_SetScale(particle, FRACUNIT/2);
}
// Spawn particles in some edgy circle or w/e.
if (leveltime%5 != 0) // spawn the thing under that every tic.
return;
i=0;
for (; i<15; i++) // spawn in a circle formation or w/e.
{
particle = P_SpawnMobj(actor->x, actor->y, actor->z, MT_THOK);
particle->momz = 20<<FRACBITS;
particle->color = ((i%2 !=0) ? (SKINCOLOR_RED) : (SKINCOLOR_BLACK));
particle->frame = 0;
P_SetScale(particle, FRACUNIT/2);
P_InstaThrust(particle, an*i, 30<<FRACBITS);
}
return; // don't continue, what lies beyond that is the movement code.
}
// We finished growing and can now be a dangerous piece o' garbage scaring the living heck outta players!
actor->flags = MF_NOGRAVITY|MF_PAIN|MF_SPECIAL|MF_NOCLIP|MF_NOCLIPHEIGHT; // set our flags to be a damaging thing.
// Handle animation:
if (!(leveltime%5))
actor->extravalue2 = (actor->extravalue2 < 9) ? (actor->extravalue2+1) : (0); // Ghetto animation, but hey it works for what it's worth
// Chain sfx
if (!S_SoundPlaying(actor, sfx_chain))
S_StartSound(actor, sfx_chain);
actor->frame = actor->extravalue2; // yes i'm that bad at maths don't @ me.
if (!actor->target)
{
if (actor->hnext)
{
P_SetTarget(&actor->target, actor->hnext); // Default back to last waypoint.
return;
}
// We have no target and oughta find one, so let's scan through thinkers for a waypoint of angle 0, or something.
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
if (mo2->type != MT_REAPERWAYPOINT)
continue;
if (mo2->spawnpoint->angle != 0)
continue;
P_SetTarget(&actor->target, mo2); // The main target we're pursing.
P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range!
actor->extravalue1 = 0; // This will store the angle of the last waypoint we touched. This will essentially be useful later on.
if (!actor->tracer) // If we already have a tracer (Waypoint #0), don't do anything.
{
P_SetTarget(&actor->tracer, mo2); // Because our target might be a player OR a waypoint, we need some sort of fallback option. This will always be waypoint 0.
break;
}
}
}
else // Awesome, we now have a target.
{
// Follow target:
P_InstaThrust(actor, R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y), 20<<FRACBITS);
actor->angle = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y);
// The player we should target if it's near us:
for (i=0; i<MAXPLAYERS; i++)
{
if (!playeringame[i])
continue;
player = &players[i];
if (player && player->mo && player->kartstuff[k_bumper] && player->score >= maxscore)
{
targetplayermo = player->mo;
maxscore = player->score;
}
}
// Try to target that player:
if (targetplayermo)
{
if (P_LookForPlayers(actor, false, false, 1024<<FRACBITS)) // got target
{
if (!(actor->target == targetplayermo && actor->target && !actor->target->player->powers[pw_flashing]
&& !actor->target->player->kartstuff[k_invincibilitytimer]
&& !actor->target->player->kartstuff[k_growshrinktimer]
&& !actor->target->player->kartstuff[k_spinouttimer]))
P_SetTarget(&actor->target, actor->hnext);
// if the above isn't correct, then we should go back to targetting waypoints or something.
}
}
// Waypoint behavior.
if (actor->target->type == MT_REAPERWAYPOINT)
{
if (R_PointToDist2(actor->x, actor->y, actor->target->x, actor->target->y) < 22<<FRACBITS)
{
P_SetTarget(&actor->target, NULL); // remove target so we can default back to first waypoint if things go ham.
// If we reach close to a waypoint, then we should go to the NEXT one.
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
mo2 = (mobj_t *)th;
if (mo2->type != MT_REAPERWAYPOINT)
continue;
if (mo2->spawnpoint->angle != actor->extravalue1+1)
continue;
P_SetTarget(&actor->target, mo2); // The main target we're pursing.
P_SetTarget(&actor->hnext, mo2); // The last waypoint we hit. We will default back to that if a player goes out of our range!
actor->extravalue1++; // This will store the angle of the last waypoint we touched. This will essentially be useful later on.
break;
}
}
if (!actor->target) // If we have no target, revert back to waypoint 0.
{
actor->extravalue1 = 0;
P_SetTarget(&actor->target, actor->tracer);
}
}
else // if our target ISN'T a waypoint, then it can only be a player.
{
if (!P_CheckSight(actor, actor->target) || R_PointToDist2(actor->x, actor->y, actor->target->x, actor->target->y) > 1024<<FRACBITS)
P_SetTarget(&actor->target, actor->hnext);
}
}
}
//} //}
// Function: A_OrbitNights // Function: A_OrbitNights

View file

@ -3003,6 +3003,7 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
fixed_t topz; fixed_t topz;
fixed_t a, b, c; fixed_t a, b, c;
mobjtype_t type = MT_ROCKCRUMBLE1; mobjtype_t type = MT_ROCKCRUMBLE1;
const fixed_t spacing = 48*mapheaderinfo[gamemap-1]->mobj_scale;
// If the control sector has a special // If the control sector has a special
// of Section3:7-15, use the custom debris. // of Section3:7-15, use the custom debris.
@ -3034,16 +3035,16 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
rightx = sec->lines[rightmostvertex]->v1->x; rightx = sec->lines[rightmostvertex]->v1->x;
topy = sec->lines[topmostvertex]->v1->y-(16<<FRACBITS); topy = sec->lines[topmostvertex]->v1->y-(16<<FRACBITS);
bottomy = sec->lines[bottommostvertex]->v1->y; bottomy = sec->lines[bottommostvertex]->v1->y;
topz = *rover->topheight-(16<<FRACBITS); topz = *rover->topheight-(spacing/2);
for (a = leftx; a < rightx; a += (32<<FRACBITS)) for (a = leftx; a < rightx; a += spacing)
{ {
for (b = topy; b > bottomy; b -= (32<<FRACBITS)) for (b = topy; b > bottomy; b -= spacing)
{ {
if (R_PointInSubsector(a, b)->sector == sec) if (R_PointInSubsector(a, b)->sector == sec)
{ {
mobj_t *spawned = NULL; mobj_t *spawned = NULL;
for (c = topz; c > *rover->bottomheight; c -= (32<<FRACBITS)) for (c = topz; c > *rover->bottomheight; c -= spacing)
{ {
spawned = P_SpawnMobj(a, b, c, type); spawned = P_SpawnMobj(a, b, c, type);
spawned->fuse = 3*TICRATE; spawned->fuse = 3*TICRATE;

View file

@ -378,6 +378,16 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
// We now identify by object type, not sprite! Tails 04-11-2001 // We now identify by object type, not sprite! Tails 04-11-2001
switch (special->type) switch (special->type)
{ {
case MT_MEMENTOSTP: // Mementos teleport
// Teleport player to the other teleporter (special->target). We'll assume there's always only ever 2.
if (!special->target)
return; // foolproof crash prevention check!!!!!
P_TeleportMove(player->mo, special->target->x, special->target->y, special->target->z + (48<<FRACBITS));
player->mo->angle = special->target->angle;
P_SetObjectMomZ(player->mo, 12<<FRACBITS, false);
P_InstaThrust(player->mo, player->mo->angle, 20<<FRACBITS);
return;
case MT_FLOATINGITEM: // SRB2kart case MT_FLOATINGITEM: // SRB2kart
if (!P_CanPickupItem(player, 3) || (player->kartstuff[k_itemamount] && player->kartstuff[k_itemtype] != special->threshold)) if (!P_CanPickupItem(player, 3) || (player->kartstuff[k_itemamount] && player->kartstuff[k_itemtype] != special->threshold))
return; return;
@ -490,7 +500,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
@ -514,7 +524,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
K_StealBumper(special->target->player, player, true); K_StealBumper(special->target->player, player, true);
special->target->player->kartstuff[k_comebacktimer] = comebacktime; special->target->player->kartstuff[k_comebacktimer] = comebacktime;
K_ExplodePlayer(player, special->target); K_ExplodePlayer(player, special->target, special);
} }
} }
else if (special->target->player->kartstuff[k_comebackmode] == 1 && P_CanPickupItem(player, 1)) else if (special->target->player->kartstuff[k_comebackmode] == 1 && P_CanPickupItem(player, 1))
@ -577,6 +587,39 @@ 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;
S_StopSound(special); // Don't continue playing the gurgle or the siren
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);
spbexplode->extravalue1 = 1; // Tell K_ExplodePlayer to use extra knockback
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 //
@ -1951,7 +1994,7 @@ boolean P_CheckRacers(void)
numplayersingame++; numplayersingame++;
} }
if (numplayersingame >= nospectategrief) // prevent spectate griefing if (numplayersingame > 1 && nospectategrief > 0 && numplayersingame >= nospectategrief) // prevent spectate griefing
{ {
// check if we just got unlucky and there was only one guy who was a problem // check if we just got unlucky and there was only one guy who was a problem
for (j = i+1; j < MAXPLAYERS; j++) for (j = i+1; j < MAXPLAYERS; j++)
@ -2002,7 +2045,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
@ -2355,8 +2398,12 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
break; break;
case MT_PLAYER: case MT_PLAYER:
target->fuse = TICRATE*3; // timer before mobj disappears from view (even if not an actual player)
target->momx = target->momy = target->momz = 0; target->momx = target->momy = target->momz = 0;
if (target->player && target->player->pflags & PF_TIMEOVER)
break;
target->fuse = TICRATE*3; // timer before mobj disappears from view (even if not an actual player)
if (!(source && source->type == MT_NULL && source->threshold == 42)) // Don't jump up when drowning if (!(source && source->type == MT_NULL && source->threshold == 42)) // Don't jump up when drowning
P_SetObjectMomZ(target, 14*FRACUNIT, false); P_SetObjectMomZ(target, 14*FRACUNIT, false);
@ -2723,6 +2770,7 @@ static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage)
// Get rid of shield // Get rid of shield
player->powers[pw_shield] = SH_NONE; player->powers[pw_shield] = SH_NONE;
player->mo->color = player->skincolor; player->mo->color = player->skincolor;
player->mo->colorized = false;
// Get rid of emeralds // Get rid of emeralds
player->powers[pw_emeralds] = 0; player->powers[pw_emeralds] = 0;
@ -2732,6 +2780,7 @@ static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage)
P_ResetPlayer(player); P_ResetPlayer(player);
P_SetPlayerMobjState(player->mo, player->mo->info->deathstate); P_SetPlayerMobjState(player->mo, player->mo->info->deathstate);
/*if (gametype == GT_CTF && (player->gotflag & (GF_REDFLAG|GF_BLUEFLAG))) /*if (gametype == GT_CTF && (player->gotflag & (GF_REDFLAG|GF_BLUEFLAG)))
{ {
P_PlayerFlagBurst(player, false); P_PlayerFlagBurst(player, false);
@ -2758,6 +2807,17 @@ static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage)
HU_DoCEcho(va("%s\\is no longer super.\\\\\\\\", player_names[player-players])); HU_DoCEcho(va("%s\\is no longer super.\\\\\\\\", player_names[player-players]));
}*/ }*/
if (player->pflags & PF_TIMEOVER)
{
mobj_t *boom;
player->mo->flags |= (MF_NOGRAVITY|MF_NOCLIP);
player->mo->flags2 |= MF2_DONTDRAW;
boom = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_FZEROBOOM);
boom->scale = player->mo->scale;
boom->angle = player->mo->angle;
P_SetTarget(&boom->target, player->mo);
}
if (G_BattleGametype()) if (G_BattleGametype())
{ {
if (player->kartstuff[k_bumper] > 0) if (player->kartstuff[k_bumper] > 0)
@ -3129,7 +3189,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
if (!player->kartstuff[k_invincibilitytimer] && player->kartstuff[k_growshrinktimer] <= 0) if (!player->kartstuff[k_invincibilitytimer] && player->kartstuff[k_growshrinktimer] <= 0)
{ {
// Start shrinking! // Start shrinking!
player->mo->scalespeed = FRACUNIT/TICRATE; player->mo->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/TICRATE;
player->mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8; player->mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8;
if (cv_kartdebugshrink.value && !player->bot) if (cv_kartdebugshrink.value && !player->bot)
player->mo->destscale = 6*player->mo->destscale/8; player->mo->destscale = 6*player->mo->destscale/8;
@ -3155,8 +3215,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

@ -824,7 +824,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (thing->type == MT_PLAYER && thing->player) if (thing->type == MT_PLAYER && thing->player)
{ {
if (tmthing->state == &states[S_MINEEXPLOSION1]) if (tmthing->state == &states[S_MINEEXPLOSION1])
K_ExplodePlayer(thing->player, tmthing->target); K_ExplodePlayer(thing->player, tmthing->target, tmthing);
else else
K_SpinPlayer(thing->player, tmthing->target, 0, false); K_SpinPlayer(thing->player, tmthing->target, 0, false);
} }
@ -1033,7 +1033,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
{ {
// Player Damage // Player Damage
if (thing->state == &states[S_MINEEXPLOSION1]) if (thing->state == &states[S_MINEEXPLOSION1])
K_ExplodePlayer(tmthing->player, thing->target); K_ExplodePlayer(tmthing->player, thing->target, thing);
else else
K_SpinPlayer(tmthing->player, thing->target, 0, false); K_SpinPlayer(tmthing->player, thing->target, 0, false);
@ -1077,7 +1077,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
//} //}
if (thing->type == MT_FALLINGROCK || tmthing->type == MT_FALLINGROCK) if ((thing->type == MT_FALLINGROCK && (tmthing->player || tmthing->type == MT_FALLINGROCK))
|| (tmthing->type == MT_FALLINGROCK && (thing->player || thing->type == MT_FALLINGROCK)))
{ {
// see if it went over / under // see if it went over / under
if (tmthing->z > thing->z + thing->height) if (tmthing->z > thing->z + thing->height)
@ -2381,6 +2382,11 @@ boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam)
|| (thiscam == &camera3 && (players[thirddisplayplayer].pflags & PF_NOCLIP)) || (thiscam == &camera3 && (players[thirddisplayplayer].pflags & PF_NOCLIP))
|| (thiscam == &camera4 && (players[fourthdisplayplayer].pflags & PF_NOCLIP)) || (thiscam == &camera4 && (players[fourthdisplayplayer].pflags & PF_NOCLIP))
|| (leveltime < introtime)) || (leveltime < introtime))
#else
if ((thiscam == &camera && !(players[displayplayer].pflags & PF_TIMEOVER))
|| (thiscam == &camera2 && !(players[secondarydisplayplayer].pflags & PF_TIMEOVER))
|| (thiscam == &camera3 && !(players[thirddisplayplayer].pflags & PF_TIMEOVER))
|| (thiscam == &camera4 && !(players[fourthdisplayplayer].pflags & PF_TIMEOVER)))
#endif #endif
{ // Noclipping player camera noclips too!! { // Noclipping player camera noclips too!!
floatok = true; floatok = true;

View file

@ -2626,12 +2626,14 @@ static boolean P_ZMovement(mobj_t *mo)
mom.z /= 2; // Rocks not so bouncy mom.z /= 2; // Rocks not so bouncy
if (abs(mom.x) < FixedMul(STOPSPEED, mo->scale) if (!mo->fuse
&& abs(mom.y) < FixedMul(STOPSPEED, mo->scale) && abs(mom.x) < FixedMul(STOPSPEED*2, mo->scale)
&& abs(mom.z) < FixedMul(STOPSPEED*3, mo->scale)) && abs(mom.y) < FixedMul(STOPSPEED*2, mo->scale)
&& abs(mom.z) < FixedMul(STOPSPEED*2*3, mo->scale))
{ {
P_RemoveMobj(mo); //P_RemoveMobj(mo);
return false; //return false;
mo->fuse = TICRATE;
} }
} }
else if (mo->type == MT_CANNONBALLDECOR) else if (mo->type == MT_CANNONBALLDECOR)
@ -3709,6 +3711,8 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
dummy.y = thiscam->y; dummy.y = thiscam->y;
dummy.z = thiscam->z; dummy.z = thiscam->z;
dummy.height = thiscam->height; dummy.height = thiscam->height;
if (player->pflags & PF_TIMEOVER)
player->kartstuff[k_timeovercam] = (2*TICRATE)+1;
if (!resetcalled && !(player->pflags & PF_NOCLIP || leveltime < introtime) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead. if (!resetcalled && !(player->pflags & PF_NOCLIP || leveltime < introtime) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead.
P_ResetCamera(player, thiscam); P_ResetCamera(player, thiscam);
else else
@ -7399,6 +7403,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);
@ -7419,7 +7424,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);
@ -7442,13 +7447,14 @@ void P_MobjThinker(mobj_t *mobj)
{ {
case MT_FALLINGROCK: case MT_FALLINGROCK:
// Despawn rocks here in case zmovement code can't do so (blame slopes) // Despawn rocks here in case zmovement code can't do so (blame slopes)
if (!mobj->momx && !mobj->momy && !mobj->momz if (!mobj->fuse && !mobj->momx && !mobj->momy && !mobj->momz
&& ((mobj->eflags & MFE_VERTICALFLIP) ? && ((mobj->eflags & MFE_VERTICALFLIP) ?
mobj->z + mobj->height >= mobj->ceilingz mobj->z + mobj->height >= mobj->ceilingz
: mobj->z <= mobj->floorz)) : mobj->z <= mobj->floorz))
{ {
P_RemoveMobj(mobj); //P_RemoveMobj(mobj);
return; //return;
mobj->fuse = TICRATE;
} }
P_MobjCheckWater(mobj); P_MobjCheckWater(mobj);
break; break;
@ -8153,6 +8159,9 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->threshold > 0) if (mobj->threshold > 0)
mobj->threshold--; mobj->threshold--;
break; break;
case MT_SPB:
indirectitemcooldown = 20*TICRATE;
/* FALLTHRU */
case MT_BALLHOG: case MT_BALLHOG:
P_SpawnGhostMobj(mobj)->fuse = 3; P_SpawnGhostMobj(mobj)->fuse = 3;
if (mobj->threshold > 0) if (mobj->threshold > 0)
@ -8173,7 +8182,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))
@ -8199,7 +8208,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:
@ -8263,7 +8272,7 @@ void P_MobjThinker(mobj_t *mobj)
P_SetScale(smoke, mobj->target->scale/2); P_SetScale(smoke, mobj->target->scale/2);
smoke->destscale = 3*mobj->target->scale/2; smoke->destscale = 3*mobj->target->scale/2;
smoke->scalespeed = FixedMul(smoke->scalespeed, mobj->target->scale); smoke->scalespeed = mobj->target->scale/12;
smoke->momx = mobj->target->momx/2; smoke->momx = mobj->target->momx/2;
smoke->momy = mobj->target->momy/2; smoke->momy = mobj->target->momy/2;
@ -8381,74 +8390,80 @@ void P_MobjThinker(mobj_t *mobj)
} }
break; break;
case MT_KARMAHITBOX: case MT_KARMAHITBOX:
if (!mobj->target || !mobj->target->health || !mobj->target->player || mobj->target->player->spectator
|| (G_RaceGametype() || mobj->target->player->kartstuff[k_bumper]))
{ {
P_RemoveMobj(mobj); statenum_t state = (mobj->state-states);
return;
}
P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->target->z); if (!mobj->target || !mobj->target->health || !mobj->target->player || mobj->target->player->spectator
mobj->scalespeed = mobj->target->scalespeed; || (G_RaceGametype() || mobj->target->player->kartstuff[k_bumper]))
mobj->destscale = mobj->target->destscale;
P_SetScale(mobj, mobj->target->scale);
mobj->color = mobj->target->color;
mobj->colorized = (mobj->target->player->kartstuff[k_comebackmode]);
if (mobj->target->player->kartstuff[k_comebacktimer] > 0)
{
if (mobj->state != &states[mobj->info->spawnstate])
P_SetMobjState(mobj, mobj->info->spawnstate);
if (mobj->target->player->kartstuff[k_comebacktimer] < TICRATE && (leveltime & 1))
mobj->flags2 &= ~MF2_DONTDRAW;
else
mobj->flags2 |= MF2_DONTDRAW;
}
else
{
if (!mobj->target->player->kartstuff[k_comebackmode]
&& mobj->state != &states[mobj->info->spawnstate])
P_SetMobjState(mobj, mobj->info->spawnstate);
else if (mobj->target->player->kartstuff[k_comebackmode] == 1
&& mobj->state != &states[mobj->info->seestate])
P_SetMobjState(mobj, mobj->info->seestate);
else if (mobj->target->player->kartstuff[k_comebackmode] == 2
&& mobj->state != &states[mobj->info->painstate])
P_SetMobjState(mobj, mobj->info->painstate);
if (mobj->target->player->powers[pw_flashing] && (leveltime & 1))
mobj->flags2 |= MF2_DONTDRAW;
else
mobj->flags2 &= ~MF2_DONTDRAW;
}
// Now for the wheels
{
const fixed_t rad = FixedMul(mobjinfo[MT_PLAYER].radius, mobj->target->scale);
mobj_t *cur = mobj->hnext;
while (cur && !P_MobjWasRemoved(cur))
{ {
fixed_t offx = rad; P_RemoveMobj(mobj);
fixed_t offy = rad; return;
}
if (cur->lastlook == 1 || cur->lastlook == 3) P_TeleportMove(mobj, mobj->target->x, mobj->target->y, mobj->target->z);
offx *= -1; mobj->angle = mobj->target->angle;
if (cur->lastlook == 2 || cur->lastlook == 3) mobj->scalespeed = mobj->target->scalespeed;
offy *= -1; mobj->destscale = mobj->target->destscale;
P_SetScale(mobj, mobj->target->scale);
mobj->color = mobj->target->color;
mobj->colorized = true;
P_TeleportMove(cur, mobj->x + offx, mobj->y + offy, mobj->z); if (mobj->target->player->kartstuff[k_comebacktimer] > 0)
cur->scalespeed = mobj->target->scalespeed; {
cur->destscale = mobj->target->destscale; if (state < mobj->info->spawnstate || state > mobj->info->spawnstate+19)
P_SetScale(cur, mobj->target->scale); P_SetMobjState(mobj, mobj->info->spawnstate);
if (mobj->target->player->kartstuff[k_comebacktimer] < TICRATE && (leveltime & 1))
if (mobj->flags2 & MF2_DONTDRAW) mobj->flags2 &= ~MF2_DONTDRAW;
cur->flags2 |= MF2_DONTDRAW;
else else
cur->flags2 &= ~MF2_DONTDRAW; mobj->flags2 |= MF2_DONTDRAW;
}
else
{
if (!mobj->target->player->kartstuff[k_comebackmode]
&& (state < mobj->info->spawnstate || state > mobj->info->spawnstate+19))
P_SetMobjState(mobj, mobj->info->spawnstate);
else if (mobj->target->player->kartstuff[k_comebackmode] == 1
&& state != mobj->info->seestate)
P_SetMobjState(mobj, mobj->info->seestate);
else if (mobj->target->player->kartstuff[k_comebackmode] == 2
&& state != mobj->info->painstate)
P_SetMobjState(mobj, mobj->info->painstate);
cur = cur->hnext; if (mobj->target->player->powers[pw_flashing] && (leveltime & 1))
mobj->flags2 |= MF2_DONTDRAW;
else
mobj->flags2 &= ~MF2_DONTDRAW;
}
// Now for the wheels
{
const fixed_t rad = FixedMul(mobjinfo[MT_PLAYER].radius, mobj->target->scale);
mobj_t *cur = mobj->hnext;
while (cur && !P_MobjWasRemoved(cur))
{
fixed_t offx = rad;
fixed_t offy = rad;
if (cur->lastlook == 1 || cur->lastlook == 3)
offx *= -1;
if (cur->lastlook == 2 || cur->lastlook == 3)
offy *= -1;
P_TeleportMove(cur, mobj->x + offx, mobj->y + offy, mobj->z);
cur->scalespeed = mobj->target->scalespeed;
cur->destscale = mobj->target->destscale;
P_SetScale(cur, mobj->target->scale);
cur->color = mobj->target->color;
cur->colorized = true;
if (mobj->flags2 & MF2_DONTDRAW)
cur->flags2 |= MF2_DONTDRAW;
else
cur->flags2 &= ~MF2_DONTDRAW;
cur = cur->hnext;
}
} }
} }
break; break;
@ -8481,6 +8496,64 @@ void P_MobjThinker(mobj_t *mobj)
} }
} }
break; break;
case MT_FZEROBOOM: // F-Zero explosion
if (!mobj->extravalue1)
{
fixed_t mx = P_ReturnThrustX(NULL, mobj->angle, 32<<FRACBITS);
fixed_t my = P_ReturnThrustY(NULL, mobj->angle, 32<<FRACBITS);
mobj_t *explosion = P_SpawnMobj(mobj->x + (2*mx), mobj->y + (2*my), mobj->z+(mobj->height/2), MT_THOK);
P_SetMobjState(explosion, S_FZEROBOOM1);
explosion->scale = mobj->scale*2;
explosion->momx = mx;
explosion->momy = my;
S_StartSound(mobj, mobj->info->seesound);
mobj->extravalue1 = 1;
}
if (!S_SoundPlaying(mobj, mobj->info->attacksound))
S_StartSound(mobj, mobj->info->attacksound);
if (mobj->extravalue2 > 70) // fire + smoke pillar
{
UINT8 i;
mobj_t *fire = P_SpawnMobj(mobj->x + (P_RandomRange(-32, 32)*mobj->scale), mobj->y + (P_RandomRange(-32, 32)*mobj->scale), mobj->z, MT_THOK);
fire->sprite = SPR_FPRT;
fire->frame = FF_FULLBRIGHT|FF_TRANS30;
fire->scale = mobj->scale*4;
fire->momz = P_RandomRange(2, 3)*mobj->scale;
fire->scalespeed = mobj->scale/12;
fire->destscale = 1;
fire->tics = TICRATE;
for (i = 0; i < 2; i++)
{
mobj_t *smoke = P_SpawnMobj(mobj->x + (P_RandomRange(-16, 16)*mobj->scale), mobj->y + (P_RandomRange(-16, 16)*mobj->scale), mobj->z, MT_SMOKE);
P_SetMobjState(smoke, S_FZSLOWSMOKE1);
smoke->scale = mobj->scale;
smoke->momz = P_RandomRange(3, 10)*mobj->scale;
smoke->destscale = mobj->scale*4;
smoke->scalespeed = mobj->scale/24;
}
}
else
{
mobj->extravalue2++; // flametimer
if (mobj->extravalue2 > 8)
{
mobj_t *smoke = P_SpawnMobj(mobj->x + (P_RandomRange(-31, 31)*mobj->scale), mobj->y + (P_RandomRange(-31, 31)*mobj->scale),
mobj->z + (P_RandomRange(0, 48)*mobj->scale), MT_THOK);
P_SetMobjState(smoke, S_FZEROSMOKE1);
smoke->tics += P_RandomRange(-3, 4);
smoke->scale = mobj->scale*2;
}
}
break;
//} //}
case MT_TURRET: case MT_TURRET:
P_MobjCheckWater(mobj); P_MobjCheckWater(mobj);
@ -8782,7 +8855,7 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s
if (P_MobjWasRemoved(mobj)) if (P_MobjWasRemoved(mobj))
return; return;
} }
else if (((mobj->type == MT_RANDOMITEM && mobj->threshold == 69) || mobj->type == MT_FAKEITEM) && mobj->fuse <= TICRATE) else if (((mobj->type == MT_RANDOMITEM && mobj->threshold == 69) || mobj->type == MT_FAKEITEM || mobj->type == MT_FALLINGROCK) && mobj->fuse <= TICRATE)
mobj->flags2 ^= MF2_DONTDRAW; mobj->flags2 ^= MF2_DONTDRAW;
} }
@ -9116,7 +9189,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
// All mobjs are created at 100% scale. // All mobjs are created at 100% scale.
mobj->scale = FRACUNIT; mobj->scale = FRACUNIT;
mobj->destscale = mobj->scale; mobj->destscale = mobj->scale;
mobj->scalespeed = FRACUNIT/12; mobj->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/12;
if (mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->mobj_scale != FRACUNIT) //&& !(mobj->type == MT_BLACKEGGMAN) if (mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->mobj_scale != FRACUNIT) //&& !(mobj->type == MT_BLACKEGGMAN)
mobj->destscale = mapheaderinfo[gamemap-1]->mobj_scale; mobj->destscale = mapheaderinfo[gamemap-1]->mobj_scale;
@ -9369,6 +9442,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
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_ROCKETSNEAKER: case MT_THUNDERSHIELD: case MT_ROCKETSNEAKER:
case MT_SPB:
P_SpawnShadowMobj(mobj); P_SpawnShadowMobj(mobj);
default: default:
break; break;
@ -9456,7 +9530,7 @@ mobj_t *P_SpawnShadowMobj(mobj_t * caster)
// All mobjs are created at 100% scale. // All mobjs are created at 100% scale.
mobj->scale = FRACUNIT; mobj->scale = FRACUNIT;
mobj->destscale = mobj->scale; mobj->destscale = mobj->scale;
mobj->scalespeed = FRACUNIT/12; mobj->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/12;
if (mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->mobj_scale != FRACUNIT) //&& !(mobj->type == MT_BLACKEGGMAN) if (mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->mobj_scale != FRACUNIT) //&& !(mobj->type == MT_BLACKEGGMAN)
mobj->destscale = mapheaderinfo[gamemap-1]->mobj_scale; mobj->destscale = mapheaderinfo[gamemap-1]->mobj_scale;

View file

@ -1116,7 +1116,7 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
diff |= MD_SCALE; diff |= MD_SCALE;
if (mobj->destscale != mobj->scale) if (mobj->destscale != mobj->scale)
diff |= MD_DSCALE; diff |= MD_DSCALE;
if (mobj->scalespeed != FRACUNIT/12) if (mobj->scalespeed != mapheaderinfo[gamemap-1]->mobj_scale/12)
diff2 |= MD2_SCALESPEED; diff2 |= MD2_SCALESPEED;
if (mobj == redflag) if (mobj == redflag)
@ -2123,7 +2123,7 @@ static void LoadMobjThinker(actionf_p1 thinker)
if (diff2 & MD2_SCALESPEED) if (diff2 & MD2_SCALESPEED)
mobj->scalespeed = READFIXED(save_p); mobj->scalespeed = READFIXED(save_p);
else else
mobj->scalespeed = FRACUNIT/12; mobj->scalespeed = mapheaderinfo[gamemap-1]->mobj_scale/12;
if (diff2 & MD2_CUSVAL) if (diff2 & MD2_CUSVAL)
mobj->cusval = READINT32(save_p); mobj->cusval = READINT32(save_p);
if (diff2 & MD2_CVMEM) if (diff2 & MD2_CVMEM)
@ -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);
WRITEUINT8(save_p, nospectategrief); WRITEUINT8(save_p, nospectategrief);
@ -3391,8 +3389,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);
nospectategrief = READUINT8(save_p); nospectategrief = READUINT8(save_p);

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;
nospectategrief = 0; nospectategrief = 0;

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

@ -1181,7 +1181,7 @@ boolean P_EndingMusic(player_t *player)
} }
if (G_RaceGametype() && bestlocalpos == MAXPLAYERS+1) if (G_RaceGametype() && bestlocalpos == MAXPLAYERS+1)
sprintf(buffer, "k*lose"); // krfail, for eventual F-Zero death results theme sprintf(buffer, "k*fail"); // F-Zero death results theme
else else
{ {
if (bestlocalpos == 1) if (bestlocalpos == 1)
@ -7666,7 +7666,8 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius)
mo = (mobj_t *)think; mo = (mobj_t *)think;
if (!(mo->flags & MF_SHOOTABLE) && !(mo->type == MT_EGGGUARD || mo->type == MT_MINUS)) if (!(mo->flags & MF_SHOOTABLE) && !(mo->type == MT_EGGGUARD || mo->type == MT_MINUS
|| mo->type == MT_SPB)) // Don't want to give SPB MF_SHOOTABLE, to ensure it's undamagable through other means
continue; continue;
if (mo->flags & MF_MONITOR) if (mo->flags & MF_MONITOR)
@ -7695,7 +7696,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;
@ -7709,6 +7710,9 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius)
P_InstaThrust(mo, R_PointToAngle2(inflictor->x, inflictor->y, mo->x, mo->y)+ANGLE_90, 16*FRACUNIT); P_InstaThrust(mo, R_PointToAngle2(inflictor->x, inflictor->y, mo->x, mo->y)+ANGLE_90, 16*FRACUNIT);
} }
if (mo->type == MT_SPB) // If you destroy a SPB, you don't get the luxury of a cooldown.
indirectitemcooldown = 0;
if (mo == inflictor) // Don't nuke yourself, dummy! if (mo == inflictor) // Don't nuke yourself, dummy!
continue; continue;
@ -7883,25 +7887,22 @@ void P_FindEmerald(void)
// //
static void P_DeathThink(player_t *player) static void P_DeathThink(player_t *player)
{ {
//ticcmd_t *cmd = &player->cmd; if (player->pflags & PF_TIMEOVER)
//player->deltaviewheight = 0; {
player->kartstuff[k_timeovercam]++;
if (player->mo)
{
player->mo->flags |= (MF_NOGRAVITY|MF_NOCLIP);
player->mo->flags2 |= MF2_DONTDRAW;
}
}
else
player->kartstuff[k_timeovercam] = 0;
if (player->deadtimer < INT32_MAX) if (player->deadtimer < INT32_MAX)
player->deadtimer++; player->deadtimer++;
// continue logic
/*if (!(netgame || multiplayer) && player->lives <= 0)
{
if (player->deadtimer > TICRATE && (cmd->buttons & BT_BRAKE || cmd->buttons & BT_ACCELERATE || cmd->buttons & BT_DRIFT) && player->continues > 0)
G_UseContinue();
else if (player->deadtimer >= gameovertics)
G_UseContinue(); // Even if we don't have one this handles ending the game
}*/
// Force respawn if idle for more than 30 seconds in shooter modes. // Force respawn if idle for more than 30 seconds in shooter modes.
/*if (player->deadtimer > 30*TICRATE && !G_RaceGametype())
player->playerstate = PST_REBORN;
else if (player->lives > 0 && !G_IsSpecialStage(gamemap)*/
if (player->lives > 0 /*&& leveltime >= starttime*/) // *could* you respawn? if (player->lives > 0 /*&& leveltime >= starttime*/) // *could* you respawn?
{ {
// SRB2kart - spawn automatically after 1 second // SRB2kart - spawn automatically after 1 second
@ -7910,55 +7911,6 @@ static void P_DeathThink(player_t *player)
: TICRATE)) // don't let them change it in record attack : TICRATE)) // don't let them change it in record attack
player->playerstate = PST_REBORN; player->playerstate = PST_REBORN;
} }
/*else if ((netgame || multiplayer) && player->deadtimer == 8*TICRATE)
{
// In a net/multiplayer game, and out of lives
if (gametype == GT_COMPETITION)
{
INT32 i;
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] && !players[i].exiting && players[i].lives > 0)
break;
if (i == MAXPLAYERS)
{
// Everyone's either done with the race, or dead.
if (!countdown2 || countdown2 > 1*TICRATE)
countdown2 = 1*TICRATE;
}
}
// In a coop game, and out of lives
if (gametype == GT_COOP)
{
INT32 i;
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] && (players[i].exiting || players[i].lives > 0))
break;
if (i == MAXPLAYERS)
{
// They're dead, Jim.
//nextmapoverride = spstage_start;
nextmapoverride = gamemap;
countdown2 = 1*TICRATE;
skipstats = true;
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i])
players[i].score = 0;
}
//emeralds = 0;
tokenbits = 0;
tokenlist = 0;
token = 0;
}
}
}*/
// Keep time rolling // Keep time rolling
if (!(countdown2 && !countdown) && !(player->exiting || mapreset) && !(player->pflags & PF_TIMEOVER)) if (!(countdown2 && !countdown) && !(player->exiting || mapreset) && !(player->pflags & PF_TIMEOVER))
@ -7982,50 +7934,6 @@ static void P_DeathThink(player_t *player)
} }
} }
/*if (G_RaceGametype() && (player->lives <= 0))
{
// to the lose music!
if (player->deadtimer == 4*TICRATE)
P_EndingMusic(player);
// stuff below isn't for kart
// Return to level music
if (netgame)
{
if (player->deadtimer == gameovertics && P_IsLocalPlayer(player))
S_ChangeMusic(mapmusname, mapmusflags, true);
}
else if (multiplayer) // local multiplayer only
{
if (player->deadtimer != gameovertics)
;
// Restore the first available player's music once we're dead for long enough
// -- that is, as long as they aren't dead too
else
{
INT32 i;
for (i = 0; i < 4; i++)
{
if (i > splitscreen)
break;
if (i == 0 && player != &players[displayplayer] && players[displayplayer].lives > 0)
P_RestoreMusic(&players[displayplayer]);
else if (i == 1 && player != &players[secondarydisplayplayer] && players[secondarydisplayplayer].lives > 0)
P_RestoreMusic(&players[secondarydisplayplayer]);
else if (i == 2 && player != &players[thirddisplayplayer] && players[thirddisplayplayer].lives > 0)
P_RestoreMusic(&players[thirddisplayplayer]);
else if (i == 3 && player != &players[fourthdisplayplayer] && players[fourthdisplayplayer].lives > 0)
P_RestoreMusic(&players[fourthdisplayplayer]);
else
continue;
break;
}
}
}
}*/
if (!player->mo) if (!player->mo)
return; return;
@ -8162,10 +8070,14 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
fixed_t x, y, z, dist, height, viewpointx, viewpointy, camspeed, camdist, camheight, pviewheight; fixed_t x, y, z, dist, height, viewpointx, viewpointy, camspeed, camdist, camheight, pviewheight;
fixed_t pan, xpan, ypan; fixed_t pan, xpan, ypan;
INT32 camrotate; INT32 camrotate;
boolean camstill, cameranoclip, lookback; boolean camstill, lookback;
UINT8 timeover;
mobj_t *mo; mobj_t *mo;
subsector_t *newsubsec;
fixed_t f1, f2; fixed_t f1, f2;
#ifndef NOCLIPCAM
boolean cameranoclip;
subsector_t *newsubsec;
#endif
// We probably shouldn't move the camera if there is no player or player mobj somehow // We probably shouldn't move the camera if there is no player or player mobj somehow
if (!player || !player->mo) if (!player || !player->mo)
@ -8173,14 +8085,17 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
mo = player->mo; mo = player->mo;
#ifdef NOCLIPCAM #ifndef NOCLIPCAM
cameranoclip = true; // We like camera noclip!
#else
cameranoclip = ((player->pflags & (PF_NOCLIP|PF_NIGHTSMODE)) cameranoclip = ((player->pflags & (PF_NOCLIP|PF_NIGHTSMODE))
|| (mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)) // Noclipping player camera noclips too!! || (mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)) // Noclipping player camera noclips too!!
|| (leveltime < introtime)); // Kart intro cam || (leveltime < introtime)); // Kart intro cam
#endif #endif
if (player->pflags & PF_TIMEOVER) // 1 for momentum keep, 2 for turnaround
timeover = (player->kartstuff[k_timeovercam] > 2*TICRATE ? 2 : 1);
else
timeover = 0;
if (!(player->playerstate == PST_DEAD || player->exiting)) if (!(player->playerstate == PST_DEAD || player->exiting))
{ {
if (player->spectator) // force cam off for spectators if (player->spectator) // force cam off for spectators
@ -8310,7 +8225,12 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
lookback = camspin4; lookback = camspin4;
} }
if (leveltime < introtime) // Whoooshy camera! if (timeover)
{
const INT32 timeovercam = max(0, min(180, (player->kartstuff[k_timeovercam] - 2*TICRATE)*15));
camrotate += timeovercam;
}
else if (leveltime < introtime) // Whoooshy camera!
{ {
const INT32 introcam = (introtime - leveltime); const INT32 introcam = (introtime - leveltime);
camrotate += introcam*5; camrotate += introcam*5;
@ -8330,10 +8250,12 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (mo->eflags & MFE_VERTICALFLIP) if (mo->eflags & MFE_VERTICALFLIP)
camheight += thiscam->height; camheight += thiscam->height;
if (camstill || resetcalled || player->playerstate == PST_DEAD) if (timeover)
angle = thiscam->angle; angle = mo->angle + FixedAngle(camrotate*FRACUNIT);
else if (leveltime < starttime) else if (leveltime < starttime)
angle = focusangle + FixedAngle(camrotate*FRACUNIT); angle = focusangle + FixedAngle(camrotate*FRACUNIT);
else if (camstill || resetcalled || player->playerstate == PST_DEAD)
angle = thiscam->angle;
else else
{ {
angle_t input = focusangle + FixedAngle(camrotate<<FRACBITS) - thiscam->angle; angle_t input = focusangle + FixedAngle(camrotate<<FRACBITS) - thiscam->angle;
@ -8348,7 +8270,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
angle = thiscam->angle + input; angle = thiscam->angle + input;
} }
if (!resetcalled && (leveltime > starttime) if (!resetcalled && (leveltime > starttime && timeover != 2)
&& ((thiscam == &camera && t_cam_rotate != -42) && ((thiscam == &camera && t_cam_rotate != -42)
|| (thiscam == &camera2 && t_cam2_rotate != -42) || (thiscam == &camera2 && t_cam2_rotate != -42)
|| (thiscam == &camera3 && t_cam3_rotate != -42) || (thiscam == &camera3 && t_cam3_rotate != -42)
@ -8384,25 +8306,30 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist); y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist);
// SRB2Kart: set camera panning // SRB2Kart: set camera panning
if (player->kartstuff[k_drift] != 0) if (camstill || resetcalled || player->playerstate == PST_DEAD)
{ pan = xpan = ypan = 0;
fixed_t panmax = (dist/5);
pan = FixedDiv(FixedMul(min((fixed_t)player->kartstuff[k_driftcharge], K_GetKartDriftSparkValue(player)), panmax), K_GetKartDriftSparkValue(player));
if (pan > panmax)
pan = panmax;
if (player->kartstuff[k_drift] < 0)
pan *= -1;
}
else else
pan = 0; {
if (player->kartstuff[k_drift] != 0)
{
fixed_t panmax = (dist/5);
pan = FixedDiv(FixedMul(min((fixed_t)player->kartstuff[k_driftcharge], K_GetKartDriftSparkValue(player)), panmax), K_GetKartDriftSparkValue(player));
if (pan > panmax)
pan = panmax;
if (player->kartstuff[k_drift] < 0)
pan *= -1;
}
else
pan = 0;
pan = thiscam->pan + FixedMul(pan - thiscam->pan, camspeed/4); pan = thiscam->pan + FixedMul(pan - thiscam->pan, camspeed/4);
xpan = FixedMul(FINECOSINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan); xpan = FixedMul(FINECOSINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan);
ypan = FixedMul(FINESINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan); ypan = FixedMul(FINESINE(((angle+ANGLE_90)>>ANGLETOFINESHIFT) & FINEMASK), pan);
x += xpan; x += xpan;
y += ypan; y += ypan;
}
pviewheight = FixedMul(32<<FRACBITS, mo->scale); pviewheight = FixedMul(32<<FRACBITS, mo->scale);
@ -8411,6 +8338,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
else else
z = mo->z + pviewheight + camheight; z = mo->z + pviewheight + camheight;
#ifndef NOCLIPCAM // Disable all z-clipping for noclip cam
// move camera down to move under lower ceilings // move camera down to move under lower ceilings
newsubsec = R_IsPointInSubsector(((mo->x>>FRACBITS) + (thiscam->x>>FRACBITS))<<(FRACBITS-1), ((mo->y>>FRACBITS) + (thiscam->y>>FRACBITS))<<(FRACBITS-1)); newsubsec = R_IsPointInSubsector(((mo->x>>FRACBITS) + (thiscam->x>>FRACBITS))<<(FRACBITS-1), ((mo->y>>FRACBITS) + (thiscam->y>>FRACBITS))<<(FRACBITS-1));
@ -8608,6 +8536,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (thiscam->z < thiscam->floorz && !cameranoclip) if (thiscam->z < thiscam->floorz && !cameranoclip)
thiscam->z = thiscam->floorz; thiscam->z = thiscam->floorz;
#endif // NOCLIPCAM
// point viewed by the camera // point viewed by the camera
// this point is just 64 unit forward the player // this point is just 64 unit forward the player
@ -8615,15 +8544,19 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
viewpointx = mo->x + FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + xpan; viewpointx = mo->x + FixedMul(FINECOSINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + xpan;
viewpointy = mo->y + FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + ypan; viewpointy = mo->y + FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), dist) + ypan;
if (!camstill && !resetcalled && !paused) if (timeover)
thiscam->angle = angle;
else if (!camstill && !resetcalled && !paused && timeover != 1)
thiscam->angle = R_PointToAngle2(thiscam->x, thiscam->y, viewpointx, viewpointy); thiscam->angle = R_PointToAngle2(thiscam->x, thiscam->y, viewpointx, viewpointy);
if (player->exiting) if (timeover == 1)
{ {
thiscam->momx = 0; thiscam->momx = P_ReturnThrustX(NULL, mo->angle, 32<<FRACBITS); // Push forward
thiscam->momy = 0; thiscam->momy = P_ReturnThrustY(NULL, mo->angle, 32<<FRACBITS);
thiscam->momz = 0; thiscam->momz = 0;
} }
else if (player->exiting || timeover == 2)
thiscam->momx = thiscam->momy = thiscam->momz = 0;
else if (leveltime < starttime) else if (leveltime < starttime)
{ {
thiscam->momx = FixedMul(x - thiscam->x, camspeed); thiscam->momx = FixedMul(x - thiscam->x, camspeed);
@ -8634,7 +8567,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
{ {
thiscam->momx = x - thiscam->x; thiscam->momx = x - thiscam->x;
thiscam->momy = y - thiscam->y; thiscam->momy = y - thiscam->y;
thiscam->momz = FixedMul(z - thiscam->z, camspeed/2); if (splitscreen == 1) // Wide-screen needs to follow faster, due to a smaller vertical:horizontal ratio of screen space
thiscam->momz = FixedMul(z - thiscam->z, (3*camspeed)/4);
else
thiscam->momz = FixedMul(z - thiscam->z, camspeed/2);
} }
thiscam->pan = pan; thiscam->pan = pan;
@ -8649,10 +8585,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
else else
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player)); angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player));
if (player->playerstate != PST_DEAD && !(player->pflags & PF_NIGHTSMODE && player->exiting)) if (player->playerstate != PST_DEAD && !((player->pflags & PF_NIGHTSMODE) && player->exiting))
angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;' angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;'
if (twodlevel || (mo->flags2 & MF2_TWOD) || !camstill) // Keep the view still... if (twodlevel || (mo->flags2 & MF2_TWOD) || (!camstill && !timeover)) // Keep the view still...
{ {
G_ClipAimingPitch((INT32 *)&angle); G_ClipAimingPitch((INT32 *)&angle);
dist = thiscam->aiming - angle; dist = thiscam->aiming - angle;
@ -8913,15 +8849,13 @@ void P_DoTimeOver(player_t *player)
S_StopSound(player->mo); S_StopSound(player->mo);
P_DamageMobj(player->mo, NULL, NULL, 10000); P_DamageMobj(player->mo, NULL, NULL, 10000);
} }
player->lives = 0; player->lives = 0;
P_EndingMusic(player); P_EndingMusic(player);
#if 0
// sal, when you do the f-zero explosion, this is how you make sure the map doesn't end before it's done ^u^ ~toast
if (!countdown2) if (!countdown2)
countdown2 = 5*TICRATE; countdown2 = 5*TICRATE;
#endif
} }
// //
@ -9419,6 +9353,7 @@ void P_PlayerThink(player_t *player)
player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should. player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should.
|| player->kartstuff[k_growshrinktimer] > 0 // Grow doesn't flash either. || player->kartstuff[k_growshrinktimer] > 0 // Grow doesn't flash either.
|| player->kartstuff[k_respawn] // Respawn timer (for drop dash effect) || player->kartstuff[k_respawn] // Respawn timer (for drop dash effect)
|| (player->pflags & PF_TIMEOVER) // NO CONTEST explosion
|| (G_BattleGametype() && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer]) || (G_BattleGametype() && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer])
|| leveltime < starttime)) // Level intro || leveltime < starttime)) // Level intro
{ {

View file

@ -705,7 +705,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"kc2e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc2e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc2f", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Pogo Spring use {"kc2f", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Pogo Spring use
{"kc30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc31", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc31", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR}, // NO CONTEST explosion
{"kc32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
@ -737,7 +737,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"kc4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc4f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc4f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc51", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc51", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR}, // NO CONTEST debris ambience
{"kc52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"kc54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"kc54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
@ -813,6 +813,9 @@ sfxinfo_t S_sfx[NUMSFX] =
{"kpogos", 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}, {"ddash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"zio3", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"zio3", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"wind1", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"fire2", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"chain", false, 128, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"mcitm1", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"mcitm1", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"chaooo", false, 110, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"chaooo", false, 110, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"itfree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},

View file

@ -888,6 +888,9 @@ typedef enum
sfx_kpogos, sfx_kpogos,
sfx_ddash, sfx_ddash,
sfx_zio3, sfx_zio3,
sfx_wind1,
sfx_fire2,
sfx_chain,
sfx_mcitm1, sfx_mcitm1,
sfx_chaooo, sfx_chaooo,
sfx_itfree, sfx_itfree,

View file

@ -124,6 +124,10 @@ static patch_t *minicaps;
static patch_t *gotrflag; static patch_t *gotrflag;
static patch_t *gotbflag; static patch_t *gotbflag;
// Midnight Channel:
static patch_t *hud_tv1;
static patch_t *hud_tv2;
// SRB2kart // SRB2kart
// //
@ -345,6 +349,10 @@ void ST_LoadGraphics(void)
ngradeletters[i] = W_CachePatchName(va("GRADE%d", i), PU_HUDGFX); ngradeletters[i] = W_CachePatchName(va("GRADE%d", i), PU_HUDGFX);
K_LoadKartHUDGraphics(); K_LoadKartHUDGraphics();
// Midnight Channel:
hud_tv1 = W_CachePatchName("HUD_TV1", PU_HUDGFX);
hud_tv2 = W_CachePatchName("HUD_TV2", PU_HUDGFX);
} }
// made separate so that skins code can reload custom face graphics // made separate so that skins code can reload custom face graphics
@ -1985,6 +1993,17 @@ static void ST_overlayDrawer(void)
ST_drawDebugInfo(); ST_drawDebugInfo();
} }
// MayonakaStatic: draw Midnight Channel's TV-like borders
static void ST_MayonakaStatic(void)
{
INT32 flag = (leveltime%2) ? V_90TRANS : V_70TRANS;
V_DrawFixedPatch(0, 0, FRACUNIT, V_SNAPTOTOP|V_SNAPTOLEFT|flag, hud_tv1, NULL);
V_DrawFixedPatch(320<<FRACBITS, 0, FRACUNIT, V_SNAPTOTOP|V_SNAPTORIGHT|V_FLIP|flag, hud_tv1, NULL);
V_DrawFixedPatch(0, 142<<FRACBITS, FRACUNIT, V_SNAPTOBOTTOM|V_SNAPTOLEFT|flag, hud_tv2, NULL);
V_DrawFixedPatch(320<<FRACBITS, 142<<FRACBITS, FRACUNIT, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_FLIP|flag, hud_tv2, NULL);
}
void ST_Drawer(void) void ST_Drawer(void)
{ {
#ifdef SEENAMES #ifdef SEENAMES
@ -2042,5 +2061,8 @@ void ST_Drawer(void)
} }
} }
} }
// draw Midnight Channel's overlay ontop
if (mapheaderinfo[gamemap-1]->typeoflevel & TOL_TV) // Very specific Midnight Channel stuff.
ST_MayonakaStatic();
} }
} }

View file

@ -275,6 +275,8 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
for (j = 0; j < numplayersingame; j++) for (j = 0; j < numplayersingame; j++)
{ {
INT32 nump = ((G_RaceGametype() && nospectategrief > 0) ? nospectategrief : numplayersingame);
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{ {
if (!playeringame[i] || players[i].spectator || completed[i]) if (!playeringame[i] || players[i].spectator || completed[i])
@ -296,9 +298,9 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
else else
data.match.pos[data.match.numplayers] = data.match.numplayers+1; data.match.pos[data.match.numplayers] = data.match.numplayers+1;
if (!rankingsmode && !(players[i].pflags & PF_TIMEOVER) && (data.match.pos[data.match.numplayers] < nospectategrief)) if (!rankingsmode && !(players[i].pflags & PF_TIMEOVER) && (data.match.pos[data.match.numplayers] < nump))
{ {
data.match.increase[i] = nospectategrief - data.match.pos[data.match.numplayers]; data.match.increase[i] = nump - data.match.pos[data.match.numplayers];
players[i].score += data.match.increase[i]; players[i].score += data.match.increase[i];
} }