mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-31 23:41:31 +00:00
Merge remote-tracking branch 'refs/remotes/origin/sal-misc'
This commit is contained in:
commit
9aa19e3c39
11 changed files with 199 additions and 278 deletions
|
@ -6598,6 +6598,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_PLAYERARROW_ROULETTE",
|
||||
|
||||
"S_PLAYERBOMB", // Player bomb overlay
|
||||
"S_PLAYERITEM", // Player item overlay
|
||||
"S_PLAYERBOMB_WHEEL",
|
||||
|
||||
#ifdef SEENAMES
|
||||
|
|
170
src/f_finale.c
170
src/f_finale.c
|
@ -451,128 +451,72 @@ boolean F_IntroResponder(event_t *event)
|
|||
// CREDITS
|
||||
// =========
|
||||
static const char *credits[] = {
|
||||
"\1Sonic Robo Blast II",
|
||||
"\1SRB2 Kart",
|
||||
"\1Credits",
|
||||
"",
|
||||
"\1Game Design",
|
||||
"Ben \"Mystic\" Geyer",
|
||||
"\"SSNTails\"",
|
||||
"Johnny \"Sonikku\" Wallbank",
|
||||
"\"Iceman404\" aka \"VelocitOni\"",
|
||||
"\"ZarroTsu\"",
|
||||
"\"Chaos Zero 64\"",
|
||||
"",
|
||||
"\1Programming",
|
||||
"Alam \"GBC\" Arias",
|
||||
"Logan \"GBA\" Arias",
|
||||
"Tim \"RedEnchilada\" Bordelon",
|
||||
"Callum Dickinson",
|
||||
"Scott \"Graue\" Feeney",
|
||||
"Nathan \"Jazz\" Giroux",
|
||||
"Thomas \"Shadow Hog\" Igoe",
|
||||
"Iestyn \"Monster Iestyn\" Jealous",
|
||||
"Ronald \"Furyhunter\" Kinard", // The SDL2 port
|
||||
"John \"JTE\" Muniz",
|
||||
"Ehab \"Wolfy\" Saeed",
|
||||
"\"SSNTails\"",
|
||||
"Matthew \"Inuyasha\" Walsh",
|
||||
"",
|
||||
"\1Programming",
|
||||
"\1Assistance",
|
||||
"\"chi.miru\"", // Red's secret weapon, the REAL reason slopes exist (also helped port drawing code from ZDoom)
|
||||
"Andrew \"orospakr\" Clunis",
|
||||
"Gregor \"Oogaland\" Dick",
|
||||
"Louis-Antoine \"LJSonic\" de Moulins", // for fixing 2.1's netcode (de Rochefort doesn't quite fit on the screen sorry lol)
|
||||
"Sean \"Sryder\" Ryder",
|
||||
"Ehab \"wolfs\" Saeed",
|
||||
"\"ZarroTsu\"",
|
||||
"Sally \"TehRealSalt\" Cochenour",
|
||||
"\"Lat\'\"",
|
||||
"\"Chaos Zero 64\"",
|
||||
"\"Monster Iestyn\"",
|
||||
"Vivian \"toaster\" Grannell",
|
||||
"Julio \"Chaos Zero 64\" Guir",
|
||||
"\"Kalaron\"", // Coded some of Sryder13's collection of OpenGL fixes, especially fog
|
||||
"Matthew \"Shuffle\" Marsalko",
|
||||
"Steven \"StroggOnMeth\" McGranahan",
|
||||
"\"Morph\"", // For SRB2Morphed stuff
|
||||
"Colin \"Sonict\" Pfaff",
|
||||
"Sean \"Sryder13\" Ryder",
|
||||
"Ben \"Cue\" Woodford",
|
||||
"",
|
||||
"\1Sprite Artists",
|
||||
"Odi \"Iceman404\" Atunzu",
|
||||
"Victor \"VAdaPEGA\" Ara\x1Fjo", // Araújo -- sorry for our limited font! D:
|
||||
"Jim \"MotorRoach\" DeMello",
|
||||
"Desmond \"Blade\" DesJardins",
|
||||
"Sherman \"CoatRack\" DesJardins",
|
||||
"Andrew \"Senku Niola\" Moran",
|
||||
"David \"Instant Sonic\" Spencer Jr.",
|
||||
"\"SSNTails\"",
|
||||
"",
|
||||
"\1Texture Artists",
|
||||
"Ryan \"Blaze Hedgehog\" Bloom",
|
||||
"Buddy \"KinkaJoy\" Fischer",
|
||||
"Vivian \"toaster\" Grannell",
|
||||
"Kepa \"Nev3r\" Iceta",
|
||||
"Jarrett \"JEV3\" Voight",
|
||||
"\1Artists",
|
||||
"\"Iceman404\"",
|
||||
"\"Blade\"",
|
||||
"\"CoatRack\"",
|
||||
"James \"SeventhSentinel\" Hall",
|
||||
"Sally \"TehRealSalt\" Cochenour", // Eggman
|
||||
"\"Chaos Zero 64\"",
|
||||
"\"ZarroTsu\"",
|
||||
"\"Spherallic\"",
|
||||
"",
|
||||
"\1Music and Sound",
|
||||
"\1Production",
|
||||
"Malcolm \"RedXVI\" Brown",
|
||||
"David \"Bulmybag\" Bulmer",
|
||||
"Paul \"Boinciel\" Clempson",
|
||||
"Cyan Helkaraxe",
|
||||
"Kepa \"Nev3r\" Iceta",
|
||||
"Iestyn \"Monster Iestyn\" Jealous",
|
||||
"Jarel \"Arrow\" Jones",
|
||||
"Stefan \"Stuf\" Rimalia",
|
||||
"Shane Mychal Sexton",
|
||||
"\"Spazzo\"",
|
||||
"David \"Big Wave Dave\" Spencer Sr.",
|
||||
"David \"Instant Sonic\" Spencer Jr.",
|
||||
"\"SSNTails\"",
|
||||
"\"Charyb\"",
|
||||
"James \"SeventhSentinel\" Hall",
|
||||
"Karl Brueggemann",
|
||||
"\"MaxieDaMan\"",
|
||||
"",
|
||||
"\1Level Design",
|
||||
"Matthew \"Fawfulfan\" Chapman",
|
||||
"Paul \"Boinciel\" Clempson",
|
||||
"Desmond \"Blade\" DesJardins",
|
||||
"Sherman \"CoatRack\" DesJardins",
|
||||
"Ben \"Mystic\" Geyer",
|
||||
"Nathan \"Jazz\" Giroux",
|
||||
"Dan \"Blitzzo\" Hagerstrand",
|
||||
"Kepa \"Nev3r\" Iceta",
|
||||
"Thomas \"Shadow Hog\" Igoe",
|
||||
"Erik \"Torgo\" Nielsen",
|
||||
"Wessel \"Spherallic\" Smit",
|
||||
"\"Spazzo\"",
|
||||
"\"SSNTails\"",
|
||||
"Rob Tisdell",
|
||||
"Jarrett \"JEV3\" Voight",
|
||||
"Johnny \"Sonikku\" Wallbank",
|
||||
"Matthew \"Inuyasha\" Walsh",
|
||||
"Marco \"Digiku\" Zafra",
|
||||
"",
|
||||
"\1Boss Design",
|
||||
"Ben \"Mystic\" Geyer",
|
||||
"Thomas \"Shadow Hog\" Igoe",
|
||||
"John \"JTE\" Muniz",
|
||||
"Samuel \"Prime 2.0\" Peters",
|
||||
"\"SSNTails\"",
|
||||
"Johnny \"Sonikku\" Wallbank",
|
||||
"\"Blitz-T\"",
|
||||
"\"Chromatian\"",
|
||||
"Sean \"Sryder\" Ryder",
|
||||
"\"Blade\"",
|
||||
"\"CoatRack\"",
|
||||
"\"Boinciel\"",
|
||||
"\"Ryuspark\"",
|
||||
"\"ZarroTsu\"",
|
||||
"\"Tyrannosaur Chao\" aka \"Chaotic Chao\"",
|
||||
"James \"SeventhSentinel\" Hall",
|
||||
"Sally \"TehRealSalt\" Cochenour",
|
||||
"\"Chaos Zero 64\"",
|
||||
"\"D00D64-X\"",
|
||||
"\"Simsmagic\"",
|
||||
"",
|
||||
"\1Testing",
|
||||
"Hank \"FuriousFox\" Brannock",
|
||||
"Cody \"SRB2 Playah\" Koester",
|
||||
"Skye \"OmegaVelocity\" Meredith",
|
||||
"Stephen \"HEDGESMFG\" Moellering",
|
||||
"Nick \"ST218\" Molina",
|
||||
"Samuel \"Prime 2.0\" Peters",
|
||||
"Colin \"Sonict\" Pfaff",
|
||||
"Bill \"Tets\" Reed",
|
||||
"\"Jeck Jims\"",
|
||||
"\"Fooruman\"",
|
||||
"\"CyberIF\"",
|
||||
"\"Dani\"",
|
||||
"\"VirtAnderson\"",
|
||||
"",
|
||||
"\1Special Thanks",
|
||||
"Doom Legacy Project",
|
||||
"iD Software",
|
||||
"Alex \"MistaED\" Fuller",
|
||||
"FreeDoom Project", // Used some of the mancubus and rocket launcher sprites for Brak
|
||||
"Randi Heit (<!>)", // For their MSPaint <!> sprite that we nicked
|
||||
"Sonic Team Jr. & SRB2",
|
||||
"Bandit \"Bippy\" Cochenour", // i <3 my dog
|
||||
"",
|
||||
"\1Produced By",
|
||||
"Sonic Team Junior",
|
||||
"Kart Krew",
|
||||
"",
|
||||
"\1Published By",
|
||||
"A 28K dialup modem",
|
||||
"\1In Memory of",
|
||||
"\"Tyler52\"",
|
||||
"",
|
||||
"\1Thank you",
|
||||
"\1for playing!",
|
||||
|
@ -583,7 +527,7 @@ static struct {
|
|||
UINT32 x, y;
|
||||
const char *patch;
|
||||
} credits_pics[] = {
|
||||
{ 8, 80+200* 1, "CREDIT01"},
|
||||
/*{ 8, 80+200* 1, "CREDIT01"},
|
||||
{ 4, 80+200* 2, "CREDIT13"},
|
||||
{250, 80+200* 3, "CREDIT12"},
|
||||
{ 8, 80+200* 4, "CREDIT03"},
|
||||
|
@ -591,10 +535,8 @@ static struct {
|
|||
{ 8, 80+200* 6, "CREDIT04"},
|
||||
{112, 80+200* 7, "CREDIT10"},
|
||||
{240, 80+200* 8, "CREDIT05"},
|
||||
{120, 80+200* 9, "CREDIT06"},
|
||||
{ 8, 80+200*10, "CREDIT07"},
|
||||
{ 8, 80+200*11, "CREDIT08"},
|
||||
{112, 80+200*12, "CREDIT09"},
|
||||
{120, 80+200* 9, "CREDIT06"},*/
|
||||
{112, 80+200*10, "TYLER52"},
|
||||
{0, 0, NULL}
|
||||
};
|
||||
|
||||
|
@ -636,7 +578,13 @@ void F_CreditDrawer(void)
|
|||
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
||||
// Draw background pictures first
|
||||
// Draw background
|
||||
V_DrawSciencePatch(0, 0 - FixedMul(32<<FRACBITS, FixedDiv(animtimer%280, 280)), V_SNAPTOTOP, W_CachePatchName("CREDTILE", PU_CACHE), FRACUNIT);
|
||||
|
||||
V_DrawSciencePatch(0, 0 - FixedMul(40<<FRACBITS, FixedDiv(animtimer%70, 70)), V_SNAPTOTOP, ttcheckers, FRACUNIT);
|
||||
V_DrawSciencePatch(280<<FRACBITS, 0 - FixedMul(40<<FRACBITS, FixedDiv(animtimer%70, 70)), V_SNAPTOTOP, ttcheckers, FRACUNIT);
|
||||
|
||||
// Draw pictures
|
||||
for (i = 0; credits_pics[i].patch; i++)
|
||||
V_DrawSciencePatch(credits_pics[i].x<<FRACBITS, (credits_pics[i].y<<FRACBITS) - 4*(animtimer<<FRACBITS)/5, 0, W_CachePatchName(credits_pics[i].patch, PU_CACHE), FRACUNIT>>1);
|
||||
|
||||
|
@ -718,7 +666,7 @@ boolean F_CreditResponder(event_t *event)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!(timesBeaten) && !(netgame || multiplayer))
|
||||
if (/*!(timesBeaten) && */!(netgame || multiplayer))
|
||||
return false;
|
||||
|
||||
if (event->type != ev_keydown)
|
||||
|
|
|
@ -2907,7 +2907,8 @@ state_t states[NUMSTATES] =
|
|||
{SPR_ARRO, FF_FULLBRIGHT|FF_ANIMATE|1, -1, {NULL}, 5, 3, S_NULL}, // S_PLAYERARROW_ROULETTE
|
||||
|
||||
{SPR_PBOM, FF_ANIMATE, -1, {NULL}, 3, 3, S_NULL}, // S_PLAYERBOMB
|
||||
{SPR_PBOM, 4, -1, {NULL}, 0, 0, S_NULL}, // S_PLAYERBOMB_WHEEL
|
||||
{SPR_RNDM, FF_ANIMATE, -1, {NULL}, 23, 3, S_NULL}, // S_PLAYERITEM
|
||||
{SPR_PBOM, 4, -1, {NULL}, 0, 0, S_NULL}, // S_PLAYERWHEEL
|
||||
|
||||
#ifdef SEENAMES
|
||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
||||
|
|
|
@ -3430,7 +3430,8 @@ typedef enum state
|
|||
S_PLAYERARROW_ROULETTE,
|
||||
|
||||
S_PLAYERBOMB,
|
||||
S_PLAYERBOMB_WHEEL,
|
||||
S_PLAYERITEM,
|
||||
S_PLAYERWHEEL,
|
||||
|
||||
#ifdef SEENAMES
|
||||
S_NAMECHECK,
|
||||
|
|
80
src/k_kart.c
80
src/k_kart.c
|
@ -3225,14 +3225,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
|
||||
if (player->kartstuff[k_bootimer] > 0)
|
||||
{
|
||||
if ((player == &players[displayplayer]
|
||||
|| (splitscreen && player == &players[secondarydisplayplayer])
|
||||
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||
|| (splitscreen > 2 && player == &players[fourthdisplayplayer]))
|
||||
|| (!(player == &players[displayplayer]
|
||||
|| (splitscreen && player == &players[secondarydisplayplayer])
|
||||
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||
|| (splitscreen > 2 && player == &players[fourthdisplayplayer]))
|
||||
if ((player == &players[displayplayer] && !splitscreen)
|
||||
|| (!(player == &players[displayplayer] && !splitscreen)
|
||||
&& (player->kartstuff[k_bootimer] < 1*TICRATE/2 || player->kartstuff[k_bootimer] > bootime-(1*TICRATE/2))))
|
||||
{
|
||||
if (leveltime & 1)
|
||||
|
@ -3266,6 +3260,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
|
||||
if (player->kartstuff[k_comebacktimer] > 0)
|
||||
{
|
||||
if (player->mo->tracer->state != &states[S_PLAYERBOMB])
|
||||
P_SetMobjState(player->mo->tracer, S_PLAYERBOMB);
|
||||
|
||||
if (player->kartstuff[k_comebacktimer] < TICRATE && (leveltime & 1))
|
||||
player->mo->tracer->flags2 &= ~MF2_DONTDRAW;
|
||||
else
|
||||
|
@ -3273,15 +3270,23 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
|
||||
player->powers[pw_flashing] = player->kartstuff[k_comebacktimer];
|
||||
}
|
||||
else if (player->kartstuff[k_comebackmode] != 0)
|
||||
player->mo->tracer->flags2 |= MF2_DONTDRAW;
|
||||
else
|
||||
{
|
||||
if (player->kartstuff[k_comebackmode] == 0
|
||||
&& player->mo->tracer->state != &states[S_PLAYERBOMB])
|
||||
P_SetMobjState(player->mo->tracer, S_PLAYERBOMB);
|
||||
else if (player->kartstuff[k_comebackmode] == 1
|
||||
&& player->mo->tracer->state != &states[S_PLAYERITEM])
|
||||
P_SetMobjState(player->mo->tracer, S_PLAYERITEM);
|
||||
player->mo->tracer->flags2 &= ~MF2_DONTDRAW;
|
||||
}
|
||||
}
|
||||
else if (G_RaceGametype() || player->kartstuff[k_balloon] > 0)
|
||||
{
|
||||
player->mo->flags2 &= ~MF2_SHADOW;
|
||||
if (player->mo->tracer && player->mo->tracer->state == &states[S_PLAYERBOMB])
|
||||
if (player->mo->tracer
|
||||
&& (player->mo->tracer->state == &states[S_PLAYERBOMB]
|
||||
|| player->mo->tracer->state == &states[S_PLAYERITEM]))
|
||||
P_RemoveMobj(player->mo->tracer);
|
||||
}
|
||||
}
|
||||
|
@ -4746,7 +4751,7 @@ static void K_drawKartMinimap(void)
|
|||
x = MINI_X - (AutomapPic->width/2);
|
||||
y = MINI_Y - (AutomapPic->height/2);
|
||||
|
||||
if (splitscreen == 2)
|
||||
if (splitscreen)
|
||||
splitflags = 0;
|
||||
|
||||
if (mirrormode)
|
||||
|
@ -4754,7 +4759,7 @@ static void K_drawKartMinimap(void)
|
|||
else
|
||||
V_DrawScaledPatch(x, y, splitflags, AutomapPic);
|
||||
|
||||
if (splitscreen != 2)
|
||||
if (!splitscreen)
|
||||
{
|
||||
splitflags &= ~minimaptrans;
|
||||
splitflags |= V_HUDTRANSHALF;
|
||||
|
@ -4763,13 +4768,28 @@ static void K_drawKartMinimap(void)
|
|||
// Player's tiny icons on the Automap.
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (i == displayplayer && splitscreen != 2)
|
||||
if (i == displayplayer && !splitscreen)
|
||||
continue; // Do displayplayer later
|
||||
if (players[i].mo && !players[i].spectator)
|
||||
{
|
||||
if (G_BattleGametype() && players[i].kartstuff[k_balloon] <= 0)
|
||||
continue;
|
||||
|
||||
if (players[i].kartstuff[k_bootimer] > 0)
|
||||
{
|
||||
if ((players[i].kartstuff[k_bootimer] < 1*TICRATE/2
|
||||
|| players[i].kartstuff[k_bootimer] > bootime-(1*TICRATE/2))
|
||||
&& !(leveltime & 1))
|
||||
;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
K_drawKartMinimapHead(&players[i], x, y, splitflags, AutomapPic);
|
||||
}
|
||||
}
|
||||
|
||||
if (splitscreen == 2)
|
||||
if (splitscreen)
|
||||
return; // Don't need this for splits
|
||||
|
||||
splitflags &= ~V_HUDTRANSHALF;
|
||||
|
@ -4782,13 +4802,18 @@ static void K_drawBattleFullscreen(void)
|
|||
{
|
||||
INT32 x = BASEVIDWIDTH/2;
|
||||
INT32 y = -64+(stplyr->kartstuff[k_cardanimation]); // card animation goes from 0 to 164, 164 is the middle of the screen
|
||||
INT32 splitflags = V_SNAPTOTOP; // I don't feel like properly supporting non-green resolutions, so you can have a misuse of SNAPTO instead
|
||||
fixed_t scale = FRACUNIT;
|
||||
|
||||
if (splitscreen)
|
||||
{
|
||||
if ((splitscreen == 1 && stplyr == &players[secondarydisplayplayer])
|
||||
|| (splitscreen > 1 && (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])))
|
||||
|| (splitscreen > 1 && (stplyr == &players[thirddisplayplayer]
|
||||
|| (stplyr == &players[fourthdisplayplayer] && splitscreen > 2))))
|
||||
{
|
||||
y = 232-(stplyr->kartstuff[k_cardanimation]/2);
|
||||
splitflags = V_SNAPTOBOTTOM;
|
||||
}
|
||||
else
|
||||
y = -32+(stplyr->kartstuff[k_cardanimation]/2);
|
||||
|
||||
|
@ -4796,7 +4821,8 @@ static void K_drawBattleFullscreen(void)
|
|||
{
|
||||
scale /= 2;
|
||||
|
||||
if (stplyr == &players[secondarydisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
if (stplyr == &players[secondarydisplayplayer]
|
||||
|| (stplyr == &players[fourthdisplayplayer] && splitscreen > 2))
|
||||
x = 3*BASEVIDWIDTH/4;
|
||||
else
|
||||
x = BASEVIDWIDTH/4;
|
||||
|
@ -4815,9 +4841,9 @@ static void K_drawBattleFullscreen(void)
|
|||
if (stplyr == &players[displayplayer])
|
||||
V_DrawFadeScreen();
|
||||
if (stplyr->kartstuff[k_balloon])
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, 0, kp_battlewin, NULL);
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, splitflags, kp_battlewin, NULL);
|
||||
else if (splitscreen < 2)
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, 0, kp_battlelose, NULL);
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, splitflags, kp_battlelose, NULL);
|
||||
}
|
||||
else if (stplyr->kartstuff[k_balloon] <= 0 && stplyr->kartstuff[k_comebacktimer] && comeback)
|
||||
{
|
||||
|
@ -4841,22 +4867,23 @@ static void K_drawBattleFullscreen(void)
|
|||
if (splitscreen > 2)
|
||||
ty = (BASEVIDHEIGHT/4)+33;
|
||||
if ((splitscreen == 1 && stplyr == &players[secondarydisplayplayer])
|
||||
|| stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer])
|
||||
|| (stplyr == &players[thirddisplayplayer] && splitscreen > 1)
|
||||
|| (stplyr == &players[fourthdisplayplayer] && splitscreen > 2))
|
||||
ty += (BASEVIDHEIGHT/2);
|
||||
}
|
||||
else
|
||||
V_DrawFadeScreen();
|
||||
|
||||
if (!comebackshowninfo)
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, 0, kp_battleinfo, NULL);
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, splitflags, kp_battleinfo, NULL);
|
||||
else
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, 0, kp_battlewait, NULL);
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, splitflags, kp_battlewait, NULL);
|
||||
|
||||
if (splitscreen > 1)
|
||||
V_DrawString(x-(txoff/2), ty, 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE));
|
||||
else
|
||||
{
|
||||
V_DrawFixedPatch(x<<FRACBITS, ty<<FRACBITS, scale, K_calcSplitFlags(0), kp_timeoutsticker, NULL);
|
||||
V_DrawFixedPatch(x<<FRACBITS, ty<<FRACBITS, scale, 0, kp_timeoutsticker, NULL);
|
||||
V_DrawKartString(x-txoff, ty, 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE));
|
||||
}
|
||||
}
|
||||
|
@ -4979,6 +5006,9 @@ void K_drawKartHUD(void)
|
|||
// This is handled by console/menu values
|
||||
K_initKartHUD();
|
||||
|
||||
if (splitscreen == 2) // Player 4 in 3P is basically the minimap :p
|
||||
K_drawKartMinimap();
|
||||
|
||||
// Draw full screen stuff that turns off the rest of the HUD
|
||||
if ((G_BattleGametype())
|
||||
&& (stplyr->exiting
|
||||
|
@ -5007,8 +5037,8 @@ void K_drawKartHUD(void)
|
|||
K_drawKartPlayerCheck();
|
||||
}
|
||||
|
||||
if ((splitscreen == 0 && cv_kartminimap.value) || splitscreen == 2)
|
||||
K_drawKartMinimap();
|
||||
if (splitscreen == 0 && cv_kartminimap.value)
|
||||
K_drawKartMinimap(); // 3P splitscreen is handled above
|
||||
|
||||
// If the item window is closing, draw it closing!
|
||||
if (stplyr->kartstuff[k_itemclose])
|
||||
|
|
|
@ -3632,8 +3632,6 @@ void A_AttractChase(mobj_t *actor)
|
|||
|| !P_CheckSight(actor, actor->tracer)) // You have to be able to SEE it...sorta
|
||||
{
|
||||
// Lost attracted rings don't through walls anymore.
|
||||
if (actor->tracer && actor->tracer->player)
|
||||
actor->tracer->player->kartstuff[k_comebackmode] = 0;
|
||||
actor->flags &= ~MF_NOCLIP;
|
||||
P_SetTarget(&actor->tracer, NULL);
|
||||
return;
|
||||
|
@ -8145,7 +8143,8 @@ void A_ItemPop(mobj_t *actor)
|
|||
if (actor->info->deathsound)
|
||||
S_StartSound(remains, actor->info->deathsound);
|
||||
|
||||
actor->target->player->kartstuff[k_itemroulette] = 1;
|
||||
if (!(G_BattleGametype() && actor->target->player->kartstuff[k_balloon] <= 0))
|
||||
actor->target->player->kartstuff[k_itemroulette] = 1;
|
||||
|
||||
remains->flags2 &= ~MF2_AMBUSH;
|
||||
|
||||
|
|
|
@ -158,8 +158,8 @@ boolean P_CanPickupItem(player_t *player, boolean weapon)
|
|||
//if (player->powers[pw_flashing] > (flashingtics/4)*3 && player->powers[pw_flashing] <= flashingtics)
|
||||
// return false;
|
||||
|
||||
if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0) // No balloons in Match
|
||||
return false;
|
||||
/*if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0) // No balloons in Match
|
||||
return false;*/
|
||||
|
||||
if (player->kartstuff[k_bootaketimer] || player->kartstuff[k_boostolentimer]
|
||||
|| player->kartstuff[k_growshrinktimer] > 1 || player->kartstuff[k_goldshroomtimer]) // Item-specific timer going off
|
||||
|
@ -414,34 +414,15 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
switch (special->type)
|
||||
{
|
||||
case MT_RANDOMITEM: // SRB2kart
|
||||
if (!P_CanPickupItem(player, false))
|
||||
return;
|
||||
|
||||
if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0)
|
||||
{
|
||||
if (player->kartstuff[k_comebackmode] == 0 && !player->kartstuff[k_comebacktimer])
|
||||
{
|
||||
if (special->tracer)
|
||||
return;
|
||||
P_SetTarget(&special->tracer, toucher);
|
||||
if (player->kartstuff[k_comebackmode] == 1 || player->kartstuff[k_comebacktimer])
|
||||
return;
|
||||
if (player->kartstuff[k_comebackmode] == 0)
|
||||
player->kartstuff[k_comebackmode] = 1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!P_CanPickupItem(player, false) && special->tracer != toucher)
|
||||
return;
|
||||
|
||||
if (G_BattleGametype() && special->tracer && special->tracer->player)
|
||||
{
|
||||
special->tracer->player->kartstuff[k_comebackmode] = 0;
|
||||
|
||||
special->tracer->player->kartstuff[k_comebackpoints]++;
|
||||
|
||||
if (netgame && cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[special->tracer->player-players], player_names[player-players]);
|
||||
|
||||
if (special->tracer->player->kartstuff[k_comebackpoints] >= 3)
|
||||
K_StealBalloon(special->tracer->player, player, true);
|
||||
|
||||
special->tracer->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
}
|
||||
|
||||
special->momx = special->momy = special->momz = 0;
|
||||
|
@ -2128,7 +2109,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
|||
{
|
||||
P_SetTarget(&target->target, source);
|
||||
source->player->numboxes++;
|
||||
if ((cv_itemrespawn.value && gametype != GT_COOP && (modifiedgame || netgame || multiplayer)))
|
||||
if (cv_itemrespawn.value && (netgame || multiplayer))
|
||||
{
|
||||
target->fuse = cv_itemrespawntime.value*TICRATE + 2; // Random box generation
|
||||
}
|
||||
|
|
|
@ -211,7 +211,6 @@ extern size_t iquehead, iquetail;
|
|||
extern consvar_t cv_gravity, cv_viewheight;
|
||||
|
||||
void P_RespawnSpecials(void);
|
||||
void P_RespawnBattleSpecials(void);
|
||||
|
||||
mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type);
|
||||
|
||||
|
|
39
src/p_map.c
39
src/p_map.c
|
@ -1653,33 +1653,60 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|| thing->player->kartstuff[k_bootimer] || thing->player->kartstuff[k_spinouttimer]
|
||||
|| thing->player->kartstuff[k_startimer] || thing->player->kartstuff[k_justbumped]
|
||||
|| (G_BattleGametype() && (thing->player->kartstuff[k_balloon] <= 0
|
||||
&& (thing->player->kartstuff[k_comebacktimer] || thing->player->kartstuff[k_comebackmode] == 1)))
|
||||
&& (thing->player->kartstuff[k_comebacktimer])))
|
||||
|| tmthing->player->kartstuff[k_growshrinktimer] || tmthing->player->kartstuff[k_squishedtimer]
|
||||
|| tmthing->player->kartstuff[k_bootimer] || tmthing->player->kartstuff[k_spinouttimer]
|
||||
|| tmthing->player->kartstuff[k_startimer] || tmthing->player->kartstuff[k_justbumped]
|
||||
|| (G_BattleGametype() && (tmthing->player->kartstuff[k_balloon] <= 0
|
||||
&& (tmthing->player->kartstuff[k_comebacktimer] || tmthing->player->kartstuff[k_comebackmode] == 1))))
|
||||
&& (tmthing->player->kartstuff[k_comebacktimer]))))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (G_BattleGametype())
|
||||
{
|
||||
if ((thing->player->kartstuff[k_balloon] <= 0 && thing->player->kartstuff[k_comebackmode] == 0)
|
||||
|| (tmthing->player->kartstuff[k_balloon] <= 0 && tmthing->player->kartstuff[k_comebackmode] == 0))
|
||||
if (thing->player->kartstuff[k_balloon] <= 0 || tmthing->player->kartstuff[k_balloon] <= 0)
|
||||
{
|
||||
if (tmthing->player->kartstuff[k_balloon] > 0)
|
||||
if (thing->player->kartstuff[k_comebackmode] == 0
|
||||
&& tmthing->player->kartstuff[k_balloon] > 0)
|
||||
{
|
||||
K_ExplodePlayer(tmthing->player, thing);
|
||||
thing->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
return true;
|
||||
}
|
||||
else if (thing->player->kartstuff[k_balloon] > 0)
|
||||
else if (tmthing->player->kartstuff[k_comebackmode] == 0
|
||||
&& thing->player->kartstuff[k_balloon] > 0)
|
||||
{
|
||||
K_ExplodePlayer(thing->player, tmthing);
|
||||
tmthing->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
return true;
|
||||
}
|
||||
else if (thing->player->kartstuff[k_comebackmode] == 1
|
||||
&& tmthing->player->kartstuff[k_balloon] > 0)
|
||||
{
|
||||
thing->player->kartstuff[k_comebackmode] = 0;
|
||||
thing->player->kartstuff[k_comebackpoints]++;
|
||||
if (netgame && cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[thing->player-players], player_names[tmthing->player-players]);
|
||||
tmthing->player->kartstuff[k_itemroulette] = 1;
|
||||
if (thing->player->kartstuff[k_comebackpoints] >= 3)
|
||||
K_StealBalloon(thing->player, tmthing->player, true);
|
||||
thing->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
return true;
|
||||
}
|
||||
else if (tmthing->player->kartstuff[k_comebackmode] == 1
|
||||
&& thing->player->kartstuff[k_balloon] > 0)
|
||||
{
|
||||
tmthing->player->kartstuff[k_comebackmode] = 0;
|
||||
tmthing->player->kartstuff[k_comebackpoints]++;
|
||||
if (netgame && cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[tmthing->player-players], player_names[thing->player-players]);
|
||||
thing->player->kartstuff[k_itemroulette] = 1;
|
||||
if (tmthing->player->kartstuff[k_comebackpoints] >= 3)
|
||||
K_StealBalloon(tmthing->player, thing->player, true);
|
||||
tmthing->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
136
src/p_mobj.c
136
src/p_mobj.c
|
@ -5969,13 +5969,6 @@ void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on y
|
|||
if (!dest || dest->health <= 0 || !dest->player || !source->tracer)
|
||||
return;
|
||||
|
||||
if (dest->player && dest->player->kartstuff[k_comebackmode] == 1)
|
||||
{
|
||||
P_TeleportMove(source, dest->x+dest->momx, dest->y+dest->momy, dest->z+dest->momz);
|
||||
source->angle = dest->angle;
|
||||
return;
|
||||
}
|
||||
|
||||
// change angle
|
||||
source->angle = R_PointToAngle2(source->x, source->y, tx, ty);
|
||||
|
||||
|
@ -8282,6 +8275,9 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s
|
|||
P_RemoveMobj(mobj); // make sure they disappear
|
||||
return;
|
||||
case MT_RANDOMITEM:
|
||||
if (G_BattleGametype())
|
||||
break;
|
||||
|
||||
// Respawn from mapthing if you have one!
|
||||
if (mobj->spawnpoint)
|
||||
{
|
||||
|
@ -9372,10 +9368,39 @@ void P_RespawnSpecials(void)
|
|||
mobj_t *mo = NULL;
|
||||
mapthing_t *mthing = NULL;
|
||||
|
||||
if (G_BattleGametype()) // Battle Mode vers
|
||||
if (G_BattleGametype() && numgotboxes >= (4*nummapboxes/5)) // Battle Mode respawns all boxes in a different way
|
||||
{
|
||||
P_RespawnBattleSpecials();
|
||||
return;
|
||||
thinker_t *th;
|
||||
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
{
|
||||
mobj_t *box;
|
||||
mobj_t *newmobj;
|
||||
|
||||
if (th->function.acp1 != (actionf_p1)P_MobjThinker) // not a mobj
|
||||
continue;
|
||||
|
||||
box = (mobj_t *)th;
|
||||
|
||||
if (box->type != MT_RANDOMITEM || box->threshold != 68 || box->fuse) // only popped items
|
||||
continue;
|
||||
|
||||
// Respawn from mapthing if you have one!
|
||||
if (box->spawnpoint)
|
||||
{
|
||||
P_SpawnMapThing(box->spawnpoint);
|
||||
newmobj = box->spawnpoint->mobj; // this is set to the new mobj in P_SpawnMapThing
|
||||
}
|
||||
else
|
||||
newmobj = P_SpawnMobj(box->x, box->y, box->z, box->type);
|
||||
|
||||
// Transfer flags2 (strongbox, objectflip)
|
||||
newmobj->flags2 = box->flags2;
|
||||
P_RemoveMobj(box); // make sure they disappear
|
||||
continue;
|
||||
}
|
||||
|
||||
numgotboxes = 0;
|
||||
}
|
||||
|
||||
// only respawn items when cv_itemrespawn is on
|
||||
|
@ -9469,97 +9494,6 @@ void P_RespawnSpecials(void)
|
|||
iquetail = (iquetail+1)&(ITEMQUESIZE-1);
|
||||
}
|
||||
|
||||
//
|
||||
// P_RespawnBattleSpecials
|
||||
//
|
||||
void P_RespawnBattleSpecials(void)
|
||||
{
|
||||
fixed_t x, y, z;
|
||||
subsector_t *ss;
|
||||
mobj_t *mo = NULL;
|
||||
mapthing_t *mthing = NULL;
|
||||
|
||||
// only respawn items when cv_itemrespawn is on
|
||||
if (!cv_itemrespawn.value)
|
||||
return;
|
||||
|
||||
// Didn't collect enough boxes
|
||||
if (numgotboxes < (4*nummapboxes/5))
|
||||
return;
|
||||
|
||||
// wait a teeeensy bit after collecting everything
|
||||
if (leveltime - itemrespawntime[iquehead-1] < (tic_t)cv_itemrespawntime.value*(5*TICRATE))
|
||||
return;
|
||||
|
||||
while (iquehead != iquetail) // respawn EVERYTHING in que!
|
||||
{
|
||||
mthing = itemrespawnque[iquetail];
|
||||
|
||||
#ifdef PARANOIA
|
||||
if (!mthing)
|
||||
I_Error("itemrespawnque[iquetail] is NULL!");
|
||||
#endif
|
||||
|
||||
if (mthing)
|
||||
{
|
||||
mobjtype_t i;
|
||||
x = mthing->x << FRACBITS;
|
||||
y = mthing->y << FRACBITS;
|
||||
ss = R_PointInSubsector(x, y);
|
||||
|
||||
// find which type to spawn
|
||||
for (i = 0; i < NUMMOBJTYPES; i++)
|
||||
if (mthing->type == mobjinfo[i].doomednum)
|
||||
break;
|
||||
|
||||
//CTF rings should continue to respawn as normal rings outside of CTF.
|
||||
if (gametype != GT_CTF)
|
||||
{
|
||||
if (i == MT_REDTEAMRING || i == MT_BLUETEAMRING)
|
||||
i = MT_RING;
|
||||
}
|
||||
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
{
|
||||
z = (
|
||||
#ifdef ESLOPE
|
||||
ss->sector->c_slope ? P_GetZAt(ss->sector->c_slope, x, y) :
|
||||
#endif
|
||||
ss->sector->ceilingheight) - (mthing->options >> ZSHIFT) * FRACUNIT;
|
||||
if (mthing->options & MTF_AMBUSH
|
||||
&& (i == MT_RING || i == MT_REDTEAMRING || i == MT_BLUETEAMRING || i == MT_COIN || P_WeaponOrPanel(i)))
|
||||
z -= 24*FRACUNIT;
|
||||
z -= mobjinfo[i].height; // Don't forget the height!
|
||||
}
|
||||
else
|
||||
{
|
||||
z = (
|
||||
#ifdef ESLOPE
|
||||
ss->sector->f_slope ? P_GetZAt(ss->sector->f_slope, x, y) :
|
||||
#endif
|
||||
ss->sector->floorheight) + (mthing->options >> ZSHIFT) * FRACUNIT;
|
||||
if (mthing->options & MTF_AMBUSH
|
||||
&& (i == MT_RING || i == MT_REDTEAMRING || i == MT_BLUETEAMRING || i == MT_COIN || P_WeaponOrPanel(i)))
|
||||
z += 24*FRACUNIT;
|
||||
}
|
||||
|
||||
mo = P_SpawnMobj(x, y, z, i);
|
||||
mo->spawnpoint = mthing;
|
||||
mo->angle = ANGLE_45 * (mthing->angle/45);
|
||||
|
||||
if (mthing->options & MTF_OBJECTFLIP)
|
||||
{
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
mo->flags2 |= MF2_OBJECTFLIP;
|
||||
}
|
||||
}
|
||||
// pull it from the que
|
||||
iquetail = (iquetail+1)&(ITEMQUESIZE-1);
|
||||
}
|
||||
|
||||
numgotboxes = 0;
|
||||
}
|
||||
|
||||
//
|
||||
// P_SpawnPlayer
|
||||
// Called when a player is spawned on the level.
|
||||
|
|
|
@ -991,7 +991,7 @@ static void P_LoadThings(void)
|
|||
|| mt->type == 1702) // MT_AXISTRANSFERLINE
|
||||
continue; // These were already spawned
|
||||
|
||||
if (mt->type == MT_RANDOMITEM) // MT_RANDOMITEM
|
||||
if (mt->type == mobjinfo[MT_RANDOMITEM].doomednum)
|
||||
nummapboxes++;
|
||||
|
||||
mt->mobj = NULL;
|
||||
|
|
Loading…
Reference in a new issue