Merge remote-tracking branch 'refs/remotes/origin/sal-misc'

This commit is contained in:
TehRealSalt 2018-03-31 00:27:35 -04:00
commit ae8da8491f
18 changed files with 217 additions and 126 deletions

View file

@ -3082,7 +3082,7 @@ static void readmaincfg(MYFILE *f)
if (!GoodDataFileName(word2))
I_Error("Maincfg: bad data file name '%s'\n", word2);
G_SaveGameData();
G_SaveGameData(false);
DEH_WriteUndoline(word, gamedatafilename, UNDO_NONE);
strlcpy(gamedatafilename, word2, sizeof (gamedatafilename));
strlwr(gamedatafilename);

View file

@ -41,6 +41,7 @@ static INT32 timetonext; // Delay between screen changes
static INT32 continuetime; // Short delay when continuing
static tic_t animtimer; // Used for some animation timings
static tic_t credbgtimer; // Credits background
static INT32 roidtics; // Asteroid spinning
static tic_t stoptimer;
@ -455,62 +456,67 @@ static const char *credits[] = {
"\1Credits",
"",
"\1Game Design",
"\"Chaos Zero 64\"",
"\"Iceman404\" aka \"VelocitOni\"",
"\"ZarroTsu\"",
"\"Chaos Zero 64\"",
"",
"\1Programming",
"\"Chaos Zero 64\"",
"Sally \"TehRealSalt\" Cochenour",
"Vivian \"toaster\" Grannell",
"\"Lat\'\"",
"\"Monster Iestyn\"",
"Sean \"Sryder\" Ryder",
"Ehab \"wolfs\" Saeed",
"\"ZarroTsu\"",
"Sally \"TehRealSalt\" Cochenour",
"\"Lat\'\"",
"\"Chaos Zero 64\"",
"\"Monster Iestyn\"",
"Vivian \"toaster\" Grannell",
"",
"\1Artists",
"\"Iceman404\"",
"\"Blade\"",
"\"CoatRack\"",
"James \"SeventhSentinel\" Hall",
"Sally \"TehRealSalt\" Cochenour", // Eggman
"\"Chaos Zero 64\"",
"Sally \"TehRealSalt\" Cochenour",
"Desmond \"Blade\" DesJardins",
"Sherman \"CoatRack\" DesJardin",
"Wesley \"Charyb\" Gillebaard",
"James \"SeventhSentinel\" Hall",
"\"Iceman404\"",
"\"MotorRoach\"",
"\"VAdaPEGA\"",
"\"ZarroTsu\"",
"\"Spherallic\"",
"",
"\1Music and Sound",
"\"Charyb\"",
"James \"SeventhSentinel\" Hall",
"Karl Brueggemann",
"Wesley \"Charyb\" Gillebaard",
"James \"SeventhSentinel\" Hall",
"\"MaxieDaMan\"",
"",
"\1Level Design",
"\"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\"",
"\"Chaos Zero 64\"",
"Paul \"Boinciel\" Clempson",
"Sally \"TehRealSalt\" Cochenour",
"Desmond \"Blade\" DesJardins",
"Sherman \"CoatRack\" DesJardin",
"James \"SeventhSentinel\" Hall",
"Sean \"Sryder\" Ryder",
"\"Ryuspark\"",
"Jeffery \"Chromatian\" Scott",
"\"Simsmagic\"",
"\"Tyrannosaur Chao\" aka \"Chaotic Chao\"",
"\"ZarroTsu\"",
"",
"\1Testing",
"\"Jeck Jims\"",
"\"Fooruman\"",
"\"CyberIF\"",
"\"Dani\"",
"Karol \"Fooruman\" D""\x1E""browski", // Dąbrowski, <Sryder> accents in srb2 :ytho:
"Jesse \"Jeck Jims\" Emerick",
"\"VirtAnderson\"",
"",
"\1Special Thanks",
"Sonic Team Jr. & SRB2",
"Bandit \"Bippy\" Cochenour", // i <3 my dog
"Bandit \"Bobby\" Cochenour", // i <3 my dog
"\"Nev3r\"",
"\"Ritz\"",
"\"Spherallic\"",
"",
"\1Produced By",
"Kart Krew",
@ -579,10 +585,10 @@ void F_CreditDrawer(void)
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
// 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(32<<FRACBITS, FixedDiv(credbgtimer%TICRATE, TICRATE)), 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);
V_DrawSciencePatch(0, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP, W_CachePatchName("CREDZIGZ", PU_CACHE), FRACUNIT);
V_DrawSciencePatch(320<<FRACBITS, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP|V_FLIP, W_CachePatchName("CREDZIGZ", PU_CACHE), FRACUNIT);
// Draw pictures
for (i = 0; credits_pics[i].patch; i++)
@ -625,6 +631,8 @@ void F_CreditTicker(void)
else
animtimer++;
credbgtimer++;
if (finalecount && --finalecount == 0)
F_StartGameEvaluation();
}
@ -666,8 +674,8 @@ boolean F_CreditResponder(event_t *event)
break;
}
if (/*!(timesBeaten) && */!(netgame || multiplayer))
return false;
/*if (!(timesBeaten) && !(netgame || multiplayer))
return false;*/
if (event->type != ev_keydown)
return false;
@ -767,10 +775,10 @@ void F_GameEvaluationDrawer(void)
/*if (ultimatemode)
++timesBeatenUltimate;*/
if (M_UpdateUnlockablesAndExtraEmblems())
if (M_UpdateUnlockablesAndExtraEmblems(false))
S_StartSound(NULL, sfx_ncitem);
G_SaveGameData();
G_SaveGameData(false);
}
}

View file

@ -2259,10 +2259,10 @@ static inline void G_PlayerFinishLevel(INT32 player)
if (legitimateexit && !demoplayback) // (yes you're allowed to unlock stuff this way when the game is modified)
{
matchesplayed++;
if (M_UpdateUnlockablesAndExtraEmblems())
if (M_UpdateUnlockablesAndExtraEmblems(true))
{
S_StartSound(NULL, sfx_ncitem);
G_SaveGameData(); // only save if unlocked something
G_SaveGameData(true); // only save if unlocked something
}
}
@ -3385,12 +3385,8 @@ static void G_DoWorldDone(void)
{
if (server)
{
if (G_RaceGametype())
// SRB2kart: don't reset player between maps
D_MapChange(nextmap+1, gametype, ultimatemode, false, 0, false, false);
else
// resetplayer in match/tag/CTF for more equality
D_MapChange(nextmap+1, gametype, ultimatemode, true, 0, false, false);
// SRB2kart: don't reset player between maps
D_MapChange(nextmap+1, gametype, ultimatemode, false, 0, false, false);
}
gameaction = ga_nothing;
@ -3647,7 +3643,7 @@ void G_LoadGameData(void)
// G_SaveGameData
// Saves the main data file, which stores information such as emblems found, etc.
void G_SaveGameData(void)
void G_SaveGameData(boolean force)
{
size_t length;
INT32 i, j;
@ -3665,7 +3661,8 @@ void G_SaveGameData(void)
return;
}
if (modifiedgame && !savemoddata)
if (modifiedgame && !savemoddata
&& !force) // SRB2Kart: for enabling unlocks online in modified servers
{
free(savebuffer);
save_p = savebuffer = NULL;

View file

@ -127,7 +127,7 @@ void G_DeferedPlayDemo(const char *demo);
// Can be called by the startup code or M_Responder, calls P_SetupLevel.
void G_LoadGame(UINT32 slot, INT16 mapoverride);
void G_SaveGameData(void);
void G_SaveGameData(boolean force);
void G_SaveGame(UINT32 slot);

View file

@ -21,7 +21,7 @@
//------------------------------------
// heads up font
//------------------------------------
#define HU_FONTSTART '\x1F' // the first font character
#define HU_FONTSTART '\x1E' // the first font character
#define HU_FONTEND '~'
#define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1)

View file

@ -930,7 +930,7 @@ void K_LakituChecker(player_t *player)
player->kartstuff[k_lakitu]--;
// Quick! You only have three tics to boost!
if (cmd->buttons & BT_ACCELERATE)
K_DoMushroom(player, true, false);
K_DoMushroom(player, true);
}
}
}
@ -1390,8 +1390,8 @@ void K_SpinPlayer(player_t *player, mobj_t *source)
if (G_BattleGametype())
{
if (source && source->player && player != source->player)
P_AddPlayerScore(source->player, 1);
/*if (source && source->player && player != source->player)
P_AddPlayerScore(source->player, 1);*/
if (player->kartstuff[k_balloon] > 0)
{
@ -1448,8 +1448,8 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
if (G_BattleGametype())
{
if (source && source->player && player != source->player)
P_AddPlayerScore(source->player, 1);
/*if (source && source->player && player != source->player)
P_AddPlayerScore(source->player, 1);*/
if (player->kartstuff[k_balloon] > 0)
{
@ -1505,7 +1505,7 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
if (source->player->kartstuff[k_comebackpoints] >= 3)
K_StealBalloon(source->player, player, true);
}
P_AddPlayerScore(source->player, 1);
//P_AddPlayerScore(source->player, 1);
}
if (player->kartstuff[k_balloon] > 0)
@ -2231,14 +2231,10 @@ static void K_DoBooSteal(player_t *player)
}
}
void K_DoMushroom(player_t *player, boolean doPFlag, boolean startboost)
void K_DoMushroom(player_t *player, boolean doPFlag)
{
sfxenum_t boostsound = sfx_mush;
if (startboost)
boostsound = sfx_sboost;
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3)
S_StartSound(player->mo, boostsound);
S_StartSound(player->mo, sfx_mush);
player->kartstuff[k_mushroomtimer] = mushroomtime;
@ -2798,14 +2794,14 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (ATTACK_IS_DOWN && !HOLDING_ITEM && onground && player->kartstuff[k_goldshroom] == 1
&& player->kartstuff[k_goldshroomtimer] == 0 && NO_BOO)
{
K_DoMushroom(player, true, false);
K_DoMushroom(player, true);
player->kartstuff[k_goldshroomtimer] = itemtime;
player->kartstuff[k_goldshroom] = 0;
}
// GoldenMushroom power
else if (ATTACK_IS_DOWN && player->kartstuff[k_goldshroomtimer] > 1 && onground && NO_BOO)
{
K_DoMushroom(player, true, false);
K_DoMushroom(player, true);
player->kartstuff[k_goldshroomtimer] -= 10;
if (player->kartstuff[k_goldshroomtimer] < 1)
player->kartstuff[k_goldshroomtimer] = 1;
@ -2813,19 +2809,19 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
// TripleMushroom power
else if (ATTACK_IS_DOWN && !HOLDING_ITEM && player->kartstuff[k_mushroom] == 4 && onground && NO_BOO)
{
K_DoMushroom(player, true, false);
K_DoMushroom(player, true);
player->kartstuff[k_mushroom] = 2;
}
// DoubleMushroom power
else if (ATTACK_IS_DOWN && !HOLDING_ITEM && player->kartstuff[k_mushroom] == 2 && onground && NO_BOO)
{
K_DoMushroom(player, true, false);
K_DoMushroom(player, true);
player->kartstuff[k_mushroom] = 1;
}
// Mushroom power
else if (ATTACK_IS_DOWN && !HOLDING_ITEM && player->kartstuff[k_mushroom] == 1 && onground && NO_BOO)
{
K_DoMushroom(player, true, false);
K_DoMushroom(player, true);
player->kartstuff[k_mushroom] = 0;
}
// Star power
@ -3364,24 +3360,33 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (leveltime == (TICRATE)*4)
S_StartSound(NULL, sfx_lkt2);
// Start charging once you're given the opportunity.
if (leveltime >= 70 && leveltime <= 140 && cmd->buttons & BT_ACCELERATE && leveltime % 5 == 0)
if (leveltime >= 70 && leveltime <= 140 && cmd->buttons & BT_ACCELERATE)
player->kartstuff[k_boostcharge]++;
if (leveltime >= 70 && leveltime <= 140 && !(cmd->buttons & BT_ACCELERATE))
player->kartstuff[k_boostcharge] = 0;
// Increase your size while charging your engine.
if (leveltime < 150)
player->mo->destscale = (mapheaderinfo[gamemap-1]->mobj_scale) + (player->kartstuff[k_boostcharge]*655);
player->mo->destscale = (mapheaderinfo[gamemap-1]->mobj_scale) + (player->kartstuff[k_boostcharge]*131);
// Determine the outcome of your charge.
if (leveltime > 140 && player->kartstuff[k_boostcharge])
{
// Get an instant boost!
if (player->kartstuff[k_boostcharge] >= 7 && player->kartstuff[k_boostcharge] <= 10)
if (player->kartstuff[k_boostcharge] >= 35 && player->kartstuff[k_boostcharge] <= 50)
{
K_DoMushroom(player, false, true);
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3)
S_StartSound(player->mo, sfx_sboost);
player->kartstuff[k_mushroomtimer] = -((21*(player->kartstuff[k_boostcharge]*player->kartstuff[k_boostcharge]))/425)+131; // max time is 70, min time is 7; yay parabooolas
if (!player->kartstuff[k_sounds]) // Prevents taunt sounds from playing every time the button is pressed
{
K_PlayTauntSound(player->mo);
player->kartstuff[k_sounds] = 50;
}
}
// You overcharged your engine? Those things are expensive!!!
if (player->kartstuff[k_boostcharge] > 10)
else if (player->kartstuff[k_boostcharge] > 50)
{
player->powers[pw_nocontrol] = 40;
S_StartSound(player->mo, sfx_slip);
@ -3432,8 +3437,8 @@ void K_CheckBalloons(void)
if (playeringame[winnernum])
{
P_AddPlayerScore(&players[winnernum], numingame);
CONS_Printf(M_GetText("%s recieved %d points for winning!\n"), player_names[winnernum], numingame*2);
P_AddPlayerScore(&players[winnernum], 1);
CONS_Printf(M_GetText("%s recieved a point for winning!\n"));
}
for (i = 0; i < MAXPLAYERS; i++)

View file

@ -30,7 +30,7 @@ void K_StealBalloon(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_SpawnBobombExplosion(mobj_t *source, UINT8 color);
void K_SpawnDriftTrail(player_t *player);
void K_DoMushroom(player_t *player, boolean doPFlag, boolean startboost);
void K_DoMushroom(player_t *player, boolean doPFlag);
void K_DoBouncePad(mobj_t *mo, fixed_t vertispeed);
boolean K_CheckPlayersRespawnColliding(INT32 playernum, fixed_t x, fixed_t y);
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue);

View file

@ -2094,11 +2094,10 @@ static int lib_kDoMushroom(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
boolean doPFlag = luaL_checkboolean(L, 2);
boolean startboost = luaL_checkboolean(L, 3);
NOHUD
if (!player)
return LUA_ErrInvalid(L, "player_t");
K_DoMushroom(player, doPFlag, startboost);
K_DoMushroom(player, doPFlag);
return 0;
}

View file

@ -197,7 +197,7 @@ void M_ClearSecrets(void)
// ----------------------
// Condition set checking
// ----------------------
static UINT8 M_CheckCondition(condition_t *cn)
UINT8 M_CheckCondition(condition_t *cn)
{
switch (cn->type)
{
@ -295,13 +295,14 @@ void M_CheckUnlockConditions(void)
}
}
UINT8 M_UpdateUnlockablesAndExtraEmblems(void)
UINT8 M_UpdateUnlockablesAndExtraEmblems(boolean force)
{
INT32 i;
char cechoText[992] = "";
UINT8 cechoLines = 0;
if (modifiedgame && !savemoddata)
if (modifiedgame && !savemoddata
&& !force) // SRB2Kart: for enabling unlocks online in modified servers
return false;
M_CheckUnlockConditions();

View file

@ -151,7 +151,8 @@ void M_ClearSecrets(void);
// Updating conditions and unlockables
void M_CheckUnlockConditions(void);
UINT8 M_UpdateUnlockablesAndExtraEmblems(void);
UINT8 M_CheckCondition(condition_t *cn);
UINT8 M_UpdateUnlockablesAndExtraEmblems(boolean force);
void M_SilentUpdateUnlockablesAndEmblems(void);
UINT8 M_CheckLevelEmblems(void);

View file

@ -217,6 +217,7 @@ static void M_LevelSelectWarp(INT32 choice);
static void M_Credits(INT32 choice);
static void M_PandorasBox(INT32 choice);
static void M_EmblemHints(INT32 choice);
static char *M_GetConditionString(condition_t cond);
menu_t SR_MainDef, SR_UnlockChecklistDef;
// Misc. Main Menu
@ -4263,10 +4264,56 @@ static void M_LevelSelectWarp(INT32 choice)
UINT8 skyRoomMenuTranslations[MAXUNLOCKABLES];
#define NUMCHECKLIST 8
static char *M_GetConditionString(condition_t cond)
{
switch(cond.type)
{
case UC_PLAYTIME:
return va("Play for %i:%02i:%02i",
G_TicsToHours(cond.requirement),
G_TicsToMinutes(cond.requirement, false),
G_TicsToSeconds(cond.requirement));
case UC_MATCHESPLAYED:
return va("Play %d matches", cond.requirement);
case UC_GAMECLEAR:
if (cond.requirement > 1)
return va("Beat game %d times", cond.requirement);
else
return va("Beat the game");
case UC_ALLEMERALDS:
if (cond.requirement > 1)
return va("Beat game w/ all emeralds %d times", cond.requirement);
else
return va("Beat game w/ all emeralds");
case UC_OVERALLTIME:
return va("Get overall time of %i:%02i:%02i",
G_TicsToHours(cond.requirement),
G_TicsToMinutes(cond.requirement, false),
G_TicsToSeconds(cond.requirement));
case UC_MAPVISITED:
return va("Visit %s", G_BuildMapTitle(cond.requirement-1));
case UC_MAPBEATEN:
return va("Beat %s", G_BuildMapTitle(cond.requirement-1));
case UC_MAPALLEMERALDS:
return va("Beat %s w/ all emeralds", G_BuildMapTitle(cond.requirement-1));
case UC_MAPTIME:
return va("Beat %s in %i:%02i.%02i", G_BuildMapTitle(cond.extrainfo1-1),
G_TicsToMinutes(cond.requirement, true),
G_TicsToSeconds(cond.requirement),
G_TicsToCentiseconds(cond.requirement));
case UC_TOTALEMBLEMS:
return va("Get %d emblems", cond.requirement);
case UC_EXTRAEMBLEM:
return va("Get \"%s\" emblem", extraemblems[cond.requirement-1].name);
default:
return "";
}
}
#define NUMCHECKLIST 23
static void M_DrawChecklist(void)
{
INT32 i, j = 0;
INT32 i, line = 0, c, lastid;
for (i = 0; i < MAXUNLOCKABLES; i++)
{
@ -4274,18 +4321,47 @@ static void M_DrawChecklist(void)
|| !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS)
continue;
V_DrawString(8, 8+(24*j), V_RETURN8, unlockables[i].name);
V_DrawString(160, 8+(24*j), V_RETURN8, V_WordWrap(160, 292, 0, unlockables[i].objective));
++line;
V_DrawString(8, (line*8), V_RETURN8|(unlockables[i].unlocked ? V_GREENMAP : V_REDMAP), unlockables[i].name);
if (unlockables[i].unlocked)
V_DrawString(308, 8+(24*j), V_YELLOWMAP, "Y");
else
V_DrawString(308, 8+(24*j), V_YELLOWMAP, "N");
if (conditionSets[unlockables[i].conditionset - 1].numconditions)
{
c = 0;
lastid = -1;
if (++j >= NUMCHECKLIST)
for (c = 0; c < conditionSets[unlockables[i].conditionset - 1].numconditions; c++)
{
condition_t cond = conditionSets[unlockables[i].conditionset - 1].condition[c];
UINT8 achieved = M_CheckCondition(&cond);
char *str = M_GetConditionString(cond);
if (!str)
continue;
++line;
if (cond.id != lastid)
{
V_DrawString(16, (line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), "*");
V_DrawString(32, (line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), str);
}
else
{
V_DrawString(32, (line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), "&");
V_DrawString(48, (line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), str);
}
lastid = cond.id;
}
}
++line;
if (line >= NUMCHECKLIST)
break;
}
}
#undef NUMCHECKLIST
#define NUMHINTS 5
static void M_EmblemHints(INT32 choice)

View file

@ -1787,8 +1787,8 @@ static mobj_t *SearchMarioNode(msecnode_t *node)
break;
}
// Ignore popped monitors, too.
if (node->m_thing->flags & MF_MONITOR || node->m_thing->type == MT_RANDOMITEM
&& node->m_thing->threshold == 68)
if ((node->m_thing->flags & MF_MONITOR || node->m_thing->type == MT_RANDOMITEM)
&& node->m_thing->threshold == 68)
continue;
// Okay, we found something valid.
if (!thing // take either the first thing

View file

@ -152,30 +152,27 @@ void P_ResetStarposts(void)
//
boolean P_CanPickupItem(player_t *player, boolean weapon)
{
if (player->bot && weapon)
return false;
//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 (player->kartstuff[k_bootaketimer] || player->kartstuff[k_boostolentimer]
|| player->kartstuff[k_growshrinktimer] > 1 || player->kartstuff[k_goldshroomtimer]) // Item-specific timer going off
return false;
if (weapon)
{
if (player->kartstuff[k_bootaketimer] || player->kartstuff[k_boostolentimer]
|| player->kartstuff[k_growshrinktimer] > 1 || player->kartstuff[k_goldshroomtimer]) // Item-specific timer going off
return false;
if (player->kartstuff[k_itemroulette]
|| player->kartstuff[k_greenshell] || player->kartstuff[k_triplegreenshell]
|| player->kartstuff[k_redshell] || player->kartstuff[k_tripleredshell]
|| player->kartstuff[k_banana] || player->kartstuff[k_triplebanana]
|| player->kartstuff[k_fakeitem] & 2 || player->kartstuff[k_magnet]
|| player->kartstuff[k_bobomb] || player->kartstuff[k_blueshell]
|| player->kartstuff[k_mushroom] || player->kartstuff[k_fireflower]
|| player->kartstuff[k_star] || player->kartstuff[k_goldshroom]
|| player->kartstuff[k_lightning] || player->kartstuff[k_megashroom]
|| player->kartstuff[k_boo] || player->kartstuff[k_feather] & 1) // Item slot already taken up
return false;
if (player->kartstuff[k_itemroulette]
|| player->kartstuff[k_greenshell] || player->kartstuff[k_triplegreenshell]
|| player->kartstuff[k_redshell] || player->kartstuff[k_tripleredshell]
|| player->kartstuff[k_banana] || player->kartstuff[k_triplebanana]
|| player->kartstuff[k_fakeitem] & 2 || player->kartstuff[k_magnet]
|| player->kartstuff[k_bobomb] || player->kartstuff[k_blueshell]
|| player->kartstuff[k_mushroom] || player->kartstuff[k_fireflower]
|| player->kartstuff[k_star] || player->kartstuff[k_goldshroom]
|| player->kartstuff[k_lightning] || player->kartstuff[k_megashroom]
|| player->kartstuff[k_boo] || player->kartstuff[k_feather] & 1) // Item slot already taken up
return false;
}
return true;
}
@ -414,7 +411,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
switch (special->type)
{
case MT_RANDOMITEM: // SRB2kart
if (!P_CanPickupItem(player, false))
if (!P_CanPickupItem(player, true))
return;
if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0)
@ -610,9 +607,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
return;
emblemlocations[special->health-1].collected = true;
M_UpdateUnlockablesAndExtraEmblems();
M_UpdateUnlockablesAndExtraEmblems(false);
G_SaveGameData();
G_SaveGameData(false);
break;
}

View file

@ -1682,7 +1682,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true;
}
else if (thing->player->kartstuff[k_comebackmode] == 1
&& tmthing->player->kartstuff[k_balloon] > 0)
&& (tmthing->player->kartstuff[k_balloon] > 0 && P_CanPickupItem(tmthing->player, true)))
{
thing->player->kartstuff[k_comebackmode] = 0;
thing->player->kartstuff[k_comebackpoints]++;
@ -1695,7 +1695,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true;
}
else if (tmthing->player->kartstuff[k_comebackmode] == 1
&& thing->player->kartstuff[k_balloon] > 0)
&& (thing->player->kartstuff[k_balloon] > 0 && P_CanPickupItem(thing->player, true)))
{
tmthing->player->kartstuff[k_comebackmode] = 0;
tmthing->player->kartstuff[k_comebackpoints]++;

View file

@ -3015,10 +3015,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
unlocktriggers |= 1 << trigid;
// Unlocked something?
if (M_UpdateUnlockablesAndExtraEmblems())
if (M_UpdateUnlockablesAndExtraEmblems(false))
{
S_StartSound(NULL, sfx_ncitem);
G_SaveGameData(); // only save if unlocked something
G_SaveGameData(false); // only save if unlocked something
}
}
}
@ -3966,7 +3966,7 @@ DoneSection2:
player->kartstuff[k_floorboost] = 3;
else
player->kartstuff[k_floorboost] = 2;
K_DoMushroom(player, false, false);
K_DoMushroom(player, false);
}
break;

View file

@ -1650,7 +1650,7 @@ void P_DoPlayerExit(player_t *player)
|| (splitscreen && player == &players[secondarydisplayplayer])
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|| (splitscreen > 2 && player == &players[fourthdisplayplayer]))
&& (!player->spectator && ((!modifiedgame || savemoddata) && !demoplayback)))
&& (!player->spectator && !demoplayback))
legitimateexit = true;
if (G_RaceGametype()) // If in Race Mode, allow
@ -9287,6 +9287,13 @@ void P_PlayerThink(player_t *player)
player->pflags |= PF_TIMEOVER;
if ((player == &players[consoleplayer]
|| (splitscreen && player == &players[secondarydisplayplayer])
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|| (splitscreen > 2 && player == &players[fourthdisplayplayer]))
&& !demoplayback)
legitimateexit = true; // SRB2kart: losing a race is still seeing it through to the end :p
if (player->pflags & PF_NIGHTSMODE)
{
P_DeNightserizePlayer(player);

View file

@ -2770,7 +2770,7 @@ void I_Quit(void)
#ifndef NONET
D_SaveBan(); // save the ban list
#endif
G_SaveGameData(); // Tails 12-08-2002
G_SaveGameData(false); // Tails 12-08-2002
//added:16-02-98: when recording a demo, should exit using 'q' key,
// but sometimes we forget and use 'F10'.. so save here too.
@ -2853,7 +2853,7 @@ void I_Error(const char *error, ...)
if (errorcount == 9)
{
M_SaveConfig(NULL);
G_SaveGameData();
G_SaveGameData(false);
}
if (errorcount > 20)
{
@ -2887,7 +2887,7 @@ void I_Error(const char *error, ...)
#ifndef NONET
D_SaveBan(); // save the ban list
#endif
G_SaveGameData(); // Tails 12-08-2002
G_SaveGameData(false); // Tails 12-08-2002
// Shutdown. Here might be other errors.
if (demorecording)

View file

@ -781,10 +781,10 @@ void Y_Ticker(void)
// Update when done with tally
if ((!modifiedgame || savemoddata) && !(netgame || multiplayer) && !demoplayback)
{
if (M_UpdateUnlockablesAndExtraEmblems())
if (M_UpdateUnlockablesAndExtraEmblems(false))
S_StartSound(NULL, sfx_ncitem);
G_SaveGameData();
G_SaveGameData(false);
}
}
else if (!(intertic & 1))
@ -848,10 +848,10 @@ void Y_Ticker(void)
// Update when done with tally
if ((!modifiedgame || savemoddata) && !(netgame || multiplayer) && !demoplayback)
{
if (M_UpdateUnlockablesAndExtraEmblems())
if (M_UpdateUnlockablesAndExtraEmblems(false))
S_StartSound(NULL, sfx_ncitem);
G_SaveGameData();
G_SaveGameData(false);
}
}
else if (!(intertic & 1))