From 61f929168eebbbbb9645275668dd2b3349029e29 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 23 Mar 2018 22:50:42 -0400 Subject: [PATCH 01/31] Splitscreen sound improvements - Fixed a simple oversight that prevented P3 and P4's sounds from ever playing - Changed how sound priority works, now compares distances between (Untested as of commit since my computer wants a quick restart before it compiles :V) --- src/s_sound.c | 134 +++++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 72 deletions(-) diff --git a/src/s_sound.c b/src/s_sound.c index cb310176d..b93eb972b 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -585,6 +585,8 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) channels[cnum].handle = I_StartSound(sfx_id, volume, sep, pitch, priority); } +dontplay: + if (splitscreen > 1 && listenmobj3) // Copy the sound for the third player { // Check to see if it is audible, and if not, modify the params @@ -594,7 +596,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) rc = S_AdjustSoundParams(listenmobj3, origin, &volume, &sep, &pitch, sfx); if (!rc) - goto dontplay; // Maybe the other player can hear it... + goto dontplay3; // Maybe the other player can hear it... if (origin->x == listener3.x && origin->y == listener3.y) sep = NORM_SEP; @@ -603,7 +605,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) // Do not play origin-less sounds for the second player. // The first player will be able to hear it just fine, // we really don't want it playing twice. - goto dontplay; + goto dontplay3; else sep = NORM_SEP; @@ -639,6 +641,8 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) channels[cnum].handle = I_StartSound(sfx_id, volume, sep, pitch, priority); } +dontplay3: + if (splitscreen > 2 && listenmobj4) // Copy the sound for the split player { // Check to see if it is audible, and if not, modify the params @@ -648,7 +652,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) rc = S_AdjustSoundParams(listenmobj4, origin, &volume, &sep, &pitch, sfx); if (!rc) - goto dontplay; // Maybe the other player can hear it... + goto dontplay4; // Maybe the other player can hear it... if (origin->x == listener4.x && origin->y == listener4.y) sep = NORM_SEP; @@ -657,7 +661,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) // Do not play origin-less sounds for the second player. // The first player will be able to hear it just fine, // we really don't want it playing twice. - goto dontplay; + goto dontplay4; else sep = NORM_SEP; @@ -693,7 +697,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) channels[cnum].handle = I_StartSound(sfx_id, volume, sep, pitch, priority); } -dontplay: +dontplay4: // Check to see if it is audible, and if not, modify the params if (origin && origin != listenmobj) @@ -1015,83 +1019,69 @@ void S_UpdateSounds(void) || (splitscreen > 2 && c->origin != players[fourthdisplayplayer].mo))) { // Whomever is closer gets the sound, but only in splitscreen. - if (listenmobj && listenmobj2 && splitscreen) + if (splitscreen) { const mobj_t *soundmobj = c->origin; + fixed_t recdist; + INT32 i, p = -1; - fixed_t dist1, dist2; - dist1 = P_AproxDistance(listener.x-soundmobj->x, listener.y-soundmobj->y); - dist2 = P_AproxDistance(listener2.x-soundmobj->x, listener2.y-soundmobj->y); + for (i = 0; i < 4; i++) + { + fixed_t thisdist; - if (dist1 <= dist2) - { - // Player 1 gets the sound - audible = S_AdjustSoundParams(listenmobj, c->origin, &volume, &sep, &pitch, - c->sfxinfo); - } - else - { - // Player 2 gets the sound - audible = S_AdjustSoundParams(listenmobj2, c->origin, &volume, &sep, &pitch, - c->sfxinfo); + if (i > splitscreen) + break; + + if (i == 0 && listenmobj) + thisdist = P_AproxDistance(listener.x-soundmobj->x, listener.y-soundmobj->y); + else if (i == 1 && listenmobj2) + thisdist = P_AproxDistance(listener2.x-soundmobj->x, listener2.y-soundmobj->y); + else if (i == 2 && listenmobj3) + thisdist = P_AproxDistance(listener3.x-soundmobj->x, listener3.y-soundmobj->y); + else if (i == 3 && listenmobj4) + thisdist = P_AproxDistance(listener4.x-soundmobj->x, listener4.y-soundmobj->y); + else + continue; + + if (recdist == NULL || (thisdist != NULL && thisdist < recdist)) + { + recdist = thisdist; + p = i; + } } - if (audible) - I_UpdateSoundParams(c->handle, volume, sep, pitch); - else - S_StopChannel(cnum); - } - else if (listenmobj && listenmobj3 && splitscreen > 1) // TODO: make 3/4P compare their distances with all players, not just the first player and themselves V: - { - const mobj_t *soundmobj = c->origin; - - fixed_t dist1, dist2; - dist1 = P_AproxDistance(listener.x-soundmobj->x, listener.y-soundmobj->y); - dist2 = P_AproxDistance(listener3.x-soundmobj->x, listener3.y-soundmobj->y); - - if (dist1 <= dist2) + if (p != -1) { - // Player 1 gets the sound - audible = S_AdjustSoundParams(listenmobj, c->origin, &volume, &sep, &pitch, + if (p == 0) + { + // Player 1 gets the sound + audible = S_AdjustSoundParams(listenmobj, c->origin, &volume, &sep, &pitch, + c->sfxinfo); + } + else if (p == 1) + { + // Player 2 gets the sound + audible = S_AdjustSoundParams(listenmobj2, c->origin, &volume, &sep, &pitch, + c->sfxinfo); + } + else if (p == 2) + { + // Player 3 gets the sound + audible = S_AdjustSoundParams(listenmobj3, c->origin, &volume, &sep, &pitch, c->sfxinfo); - } - else - { - // Player 3 gets the sound - audible = S_AdjustSoundParams(listenmobj3, c->origin, &volume, &sep, &pitch, - c->sfxinfo); - } + } + else if (p == 3) + { + // Player 4 gets the sound + audible = S_AdjustSoundParams(listenmobj4, c->origin, &volume, &sep, &pitch, + c->sfxinfo); + } - if (audible) - I_UpdateSoundParams(c->handle, volume, sep, pitch); - else - S_StopChannel(cnum); - } - else if (listenmobj && listenmobj4 && splitscreen > 2) - { - const mobj_t *soundmobj = c->origin; - - fixed_t dist1, dist2; - dist1 = P_AproxDistance(listener.x-soundmobj->x, listener.y-soundmobj->y); - dist2 = P_AproxDistance(listener4.x-soundmobj->x, listener4.y-soundmobj->y); - - if (dist1 <= dist2) - { - // Player 1 gets the sound - audible = S_AdjustSoundParams(listenmobj, c->origin, &volume, &sep, &pitch, - c->sfxinfo); + if (audible) + I_UpdateSoundParams(c->handle, volume, sep, pitch); + else + S_StopChannel(cnum); } - else - { - // Player 4 gets the sound - audible = S_AdjustSoundParams(listenmobj4, c->origin, &volume, &sep, &pitch, - c->sfxinfo); - } - - if (audible) - I_UpdateSoundParams(c->handle, volume, sep, pitch); - else - S_StopChannel(cnum); } else if (listenmobj && !splitscreen) { From 8bc2fa7b6c15fe173ab8e44c68e812c3ec114310 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 24 Mar 2018 08:13:33 -0400 Subject: [PATCH 02/31] Fix errors --- src/s_sound.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/s_sound.c b/src/s_sound.c index b93eb972b..7ea09e987 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1022,12 +1022,12 @@ void S_UpdateSounds(void) if (splitscreen) { const mobj_t *soundmobj = c->origin; - fixed_t recdist; + fixed_t recdist = -1; INT32 i, p = -1; for (i = 0; i < 4; i++) { - fixed_t thisdist; + fixed_t thisdist = -1; if (i > splitscreen) break; @@ -1043,7 +1043,7 @@ void S_UpdateSounds(void) else continue; - if (recdist == NULL || (thisdist != NULL && thisdist < recdist)) + if (recdist == -1 || (thisdist != -1 && thisdist < recdist)) { recdist = thisdist; p = i; @@ -1052,13 +1052,7 @@ void S_UpdateSounds(void) if (p != -1) { - if (p == 0) - { - // Player 1 gets the sound - audible = S_AdjustSoundParams(listenmobj, c->origin, &volume, &sep, &pitch, - c->sfxinfo); - } - else if (p == 1) + if (p == 1) { // Player 2 gets the sound audible = S_AdjustSoundParams(listenmobj2, c->origin, &volume, &sep, &pitch, @@ -1076,6 +1070,12 @@ void S_UpdateSounds(void) audible = S_AdjustSoundParams(listenmobj4, c->origin, &volume, &sep, &pitch, c->sfxinfo); } + else + { + // Player 1 gets the sound + audible = S_AdjustSoundParams(listenmobj, c->origin, &volume, &sep, &pitch, + c->sfxinfo); + } if (audible) I_UpdateSoundParams(c->handle, volume, sep, pitch); From e16bf1cf7578a1174eeccda8d289f10ef812cd5f Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 26 Mar 2018 20:36:16 -0400 Subject: [PATCH 03/31] WIP karma item stuff --- src/dehacked.c | 1 + src/info.c | 3 ++- src/info.h | 3 ++- src/k_kart.c | 17 ++++++++++++++--- src/p_enemy.c | 5 ++--- src/p_inter.c | 37 +++++++++---------------------------- src/p_map.c | 39 +++++++++++++++++++++++++++++++++------ src/p_mobj.c | 13 ++++++------- src/p_setup.c | 2 +- 9 files changed, 70 insertions(+), 50 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 27fa61e70..3e113072a 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -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 diff --git a/src/info.c b/src/info.c index f7b6fed7c..4a75ac2c0 100644 --- a/src/info.c +++ b/src/info.c @@ -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 diff --git a/src/info.h b/src/info.h index c8e6758a2..f619b5984 100644 --- a/src/info.h +++ b/src/info.h @@ -3430,7 +3430,8 @@ typedef enum state S_PLAYERARROW_ROULETTE, S_PLAYERBOMB, - S_PLAYERBOMB_WHEEL, + S_PLAYERITEM, + S_PLAYERWHEEL, #ifdef SEENAMES S_NAMECHECK, diff --git a/src/k_kart.c b/src/k_kart.c index 4f04f46a2..ceee25f2e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3266,6 +3266,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 +3276,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); } } diff --git a/src/p_enemy.c b/src/p_enemy.c index 788cafa15..b84866835 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -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; diff --git a/src/p_inter.c b/src/p_inter.c index e24a3ddff..d77940dc4 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -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 } diff --git a/src/p_map.c b/src/p_map.c index 15b8f7d8f..6935be9d1 100644 --- a/src/p_map.c +++ b/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; + } } } diff --git a/src/p_mobj.c b/src/p_mobj.c index 353f78443..6374c407f 100644 --- a/src/p_mobj.c +++ b/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,12 @@ 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() && numgotboxes < (4*nummapboxes/5)) + { + mobj->fuse = 2; + break; + } + numgotboxes = 0; // Respawn from mapthing if you have one! if (mobj->spawnpoint) { diff --git a/src/p_setup.c b/src/p_setup.c index 4cecb9414..1986380da 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -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; From acc9abca550d9be7798ba25ae57ddfd7426ed0d0 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 27 Mar 2018 17:53:47 -0400 Subject: [PATCH 04/31] Items respawn in Battle properly again and in a slightly less wasteful way. --- src/p_local.h | 1 - src/p_mobj.c | 133 +++++++++++++------------------------------------- 2 files changed, 34 insertions(+), 100 deletions(-) diff --git a/src/p_local.h b/src/p_local.h index 1bf1471b9..47cb545ef 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -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); diff --git a/src/p_mobj.c b/src/p_mobj.c index 6374c407f..a77b97b7e 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8275,12 +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() && numgotboxes < (4*nummapboxes/5)) - { - mobj->fuse = 2; + if (G_BattleGametype()) break; - } - numgotboxes = 0; + // Respawn from mapthing if you have one! if (mobj->spawnpoint) { @@ -9371,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 @@ -9468,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. From ac6a996c0dd46304c164311686eeabc716f2b018 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 27 Mar 2018 18:22:33 -0400 Subject: [PATCH 05/31] HUD improvements Most notably, Karma & Boo no longer appear on the minimap --- src/k_kart.c | 58 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index ceee25f2e..a41e244fd 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4757,7 +4757,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) @@ -4765,7 +4765,7 @@ static void K_drawKartMinimap(void) else V_DrawScaledPatch(x, y, splitflags, AutomapPic); - if (splitscreen != 2) + if (!splitscreen) { splitflags &= ~minimaptrans; splitflags |= V_HUDTRANSHALF; @@ -4774,13 +4774,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; @@ -4793,13 +4808,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); @@ -4807,7 +4827,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; @@ -4826,9 +4847,9 @@ static void K_drawBattleFullscreen(void) if (stplyr == &players[displayplayer]) V_DrawFadeScreen(); if (stplyr->kartstuff[k_balloon]) - V_DrawFixedPatch(x<kartstuff[k_balloon] <= 0 && stplyr->kartstuff[k_comebacktimer] && comeback) { @@ -4852,23 +4873,24 @@ 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< 1) - V_DrawString(x-(txoff/2), ty, 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE)); + V_DrawString(x-(txoff/2), ty, splitflags, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE)); else { - V_DrawFixedPatch(x<kartstuff[k_comebacktimer]/TICRATE)); + V_DrawFixedPatch(x<kartstuff[k_comebacktimer]/TICRATE)); } } } @@ -4998,9 +5020,13 @@ void K_drawKartHUD(void) && comeback && stplyr->playerstate == PST_LIVE))) { + if (splitscreen == 2) + K_drawKartMinimap(); K_drawBattleFullscreen(); return; } + else if (splitscreen == 2) + K_drawKartMinimap(); // Draw Lakitu // This is done first so that regardless of HUD layers, @@ -5018,8 +5044,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]) From 84944f1a52839aa95211f6c921930fd107e5fa24 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Tue, 27 Mar 2018 18:30:02 -0400 Subject: [PATCH 06/31] Idea: Make Boo make you invisible instead of flash in splitscreen There's no way atm to make you flash on your screen but not on everyone else's, so I think just making you invisible on all of them keeps the original SMK intent of "you have to pay extra close attention to their screen to know where they are at all" better --- src/k_kart.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index a41e244fd..008cf7513 100644 --- a/src/k_kart.c +++ b/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) From 8e9d09121edb6013da8fcbc6d14e6b8753c56a03 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 28 Mar 2018 15:28:50 -0400 Subject: [PATCH 07/31] Actually, this makes more sense :U --- src/k_kart.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 008cf7513..205e13039 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5006,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 @@ -5014,13 +5017,9 @@ void K_drawKartHUD(void) && comeback && stplyr->playerstate == PST_LIVE))) { - if (splitscreen == 2) - K_drawKartMinimap(); K_drawBattleFullscreen(); return; } - else if (splitscreen == 2) - K_drawKartMinimap(); // Draw Lakitu // This is done first so that regardless of HUD layers, From caa000d5d6a06660c9e6a33021e51c3d4d21f344 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 28 Mar 2018 16:17:04 -0400 Subject: [PATCH 08/31] A quick credits draft Please give me corrections and people to add. I've not been here as long as some people, so there is 100% probably people I missed --- src/f_finale.c | 123 ++++++++++--------------------------------------- src/k_kart.c | 6 +-- 2 files changed, 28 insertions(+), 101 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 710ff78fb..efd54d5ae 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -451,128 +451,55 @@ boolean F_IntroResponder(event_t *event) // CREDITS // ========= static const char *credits[] = { - "\1Sonic Robo Blast II", + "\1Sonic Robo Blast II Kart", "\1Credits", "", "\1Game Design", - "Ben \"Mystic\" Geyer", - "\"SSNTails\"", - "Johnny \"Sonikku\" Wallbank", + "\"Iceman404\"", + "\"ZarroTsu\"", + "Julio \"Chaos Zero 64\" Guir", "", "\1Programming", - "Alam \"GBC\" Arias", - "Logan \"GBA\" Arias", - "Tim \"RedEnchilada\" Bordelon", - "Callum Dickinson", - "Scott \"Graue\" Feeney", - "Nathan \"Jazz\" Giroux", - "Thomas \"Shadow Hog\" Igoe", + "\"ZarroTsu\"", + "Sean \"Sryder13\" Ryder", "Iestyn \"Monster Iestyn\" Jealous", - "Ronald \"Furyhunter\" Kinard", // The SDL2 port - "John \"JTE\" Muniz", + "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) "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", + "Sally \"TehRealSalt\" Cochenour", + "\"Lat\'\"", "", - "\1Sprite Artists", - "Odi \"Iceman404\" Atunzu", - "Victor \"VAdaPEGA\" Ara\x1Fjo", // Araújo -- sorry for our limited font! D: - "Jim \"MotorRoach\" DeMello", + "\1Artists", + "\"Iceman404\"", "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", + "Sally \"TehRealSalt\" Cochenour", // Eggman "", "\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", "", "\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", - "", - "\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", + "\"Blitz-T\"", + "\"Chromatian\"", + "\"Tyrannosaur Chao\"", + "\"Ryuspark\"", + "James \"SeventhSentinel\" Hall", + "Sally \"TehRealSalt\" Cochenour", "", + //"\1Testing", // Should we have this? If so, please gimmie who would be on here + //"", "\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", - "", - "\1Published By", - "A 28K dialup modem", + "Kart Krew", "", "\1Thank you", "\1for playing!", diff --git a/src/k_kart.c b/src/k_kart.c index 205e13039..4c2568a12 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4880,11 +4880,11 @@ static void K_drawBattleFullscreen(void) V_DrawFixedPatch(x< 1) - V_DrawString(x-(txoff/2), ty, splitflags, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE)); + V_DrawString(x-(txoff/2), ty, 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE)); else { - V_DrawFixedPatch(x<kartstuff[k_comebacktimer]/TICRATE)); + V_DrawFixedPatch(x<kartstuff[k_comebacktimer]/TICRATE)); } } } From 38b59aaaf1ef1ff44b443f6c5609682abc0a0008 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 28 Mar 2018 16:25:43 -0400 Subject: [PATCH 09/31] Actually, ehhh, let's remove full names for everyone who hasn't went "yes, I want my full name on Kart's credits --- src/f_finale.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index efd54d5ae..013499b23 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -457,23 +457,23 @@ static const char *credits[] = { "\1Game Design", "\"Iceman404\"", "\"ZarroTsu\"", - "Julio \"Chaos Zero 64\" Guir", + "\"Chaos Zero 64\"", "", "\1Programming", "\"ZarroTsu\"", - "Sean \"Sryder13\" Ryder", - "Iestyn \"Monster Iestyn\" Jealous", - "John \"JTE\" Muniz", // ? - "Ehab \"Wolfy\" Saeed", - "Vivian \"toaster\" Grannell", - "Julio \"Chaos Zero 64\" Guir", + "\"Sryder13\"", + "\"Monster Iestyn\"", + "\"JTE\"", // Did they do anything for Kart, or was it just TD? + "\"Wolfy\"", + "\"toaster\"", + "\"Chaos Zero 64\"", "Sally \"TehRealSalt\" Cochenour", "\"Lat\'\"", "", "\1Artists", "\"Iceman404\"", - "Desmond \"Blade\" DesJardins", - "Sherman \"CoatRack\" DesJardins", + "\"Blade\"", + "\"CoatRack\"", "Sally \"TehRealSalt\" Cochenour", // Eggman "", "\1Music and Sound", @@ -482,9 +482,9 @@ static const char *credits[] = { "James \"SeventhSentinel\" Hall", "", "\1Level Design", - "Paul \"Boinciel\" Clempson", - "Desmond \"Blade\" DesJardins", - "Sherman \"CoatRack\" DesJardins", + "\"Boinciel\"", + "\"Blade\"", + "\"CoatRack\"", "\"Blitz-T\"", "\"Chromatian\"", "\"Tyrannosaur Chao\"", From 9dd14531ee5770fb611509ee26abe188b33703e2 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 28 Mar 2018 19:27:26 -0400 Subject: [PATCH 10/31] More credit stuff --- src/f_finale.c | 63 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 013499b23..f20ac7b32 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -451,49 +451,63 @@ boolean F_IntroResponder(event_t *event) // CREDITS // ========= static const char *credits[] = { - "\1Sonic Robo Blast II Kart", + "\1SRBTwo Kart", "\1Credits", "", "\1Game Design", - "\"Iceman404\"", + "\"Iceman404\" aka \"VelocitOni\"", "\"ZarroTsu\"", "\"Chaos Zero 64\"", "", "\1Programming", + "\"Sryder\"", + "\"wolfs\"", "\"ZarroTsu\"", - "\"Sryder13\"", - "\"Monster Iestyn\"", - "\"JTE\"", // Did they do anything for Kart, or was it just TD? - "\"Wolfy\"", - "\"toaster\"", - "\"Chaos Zero 64\"", "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\"", + "\"ZarroTsu\"", + "\"Spherallic\"", "", "\1Music and Sound", - "\1Production", "\"Charyb\"", "James \"SeventhSentinel\" Hall", + "Karl Brueggemann", + "\"MaxieDaMan\"", "", "\1Level Design", - "\"Boinciel\"", - "\"Blade\"", - "\"CoatRack\"", "\"Blitz-T\"", "\"Chromatian\"", - "\"Tyrannosaur Chao\"", + "\"Sryder\"", + "\"Blade\"", + "\"CoatRack\"", + "\"Boinciel\"", "\"Ryuspark\"", + "\"ZarroTsu\"", + "\"Tyrannosaur Chao\" aka \"Chaotic Chao\"", "James \"SeventhSentinel\" Hall", "Sally \"TehRealSalt\" Cochenour", + "\"Chaos Zero 64\"", + "\"D00D64-X\"", + "\"Simsmagic\"", + "", + "\1Testing", + "\"Jeck Jims\"", + "\"Fooruman\"", + "\"CyberIF\"", + "\"Dani\"", + "\"VirtAnderson\"", "", - //"\1Testing", // Should we have this? If so, please gimmie who would be on here - //"", "\1Special Thanks", "Sonic Team Jr. & SRB2", "Bandit \"Bippy\" Cochenour", // i <3 my dog @@ -501,6 +515,9 @@ static const char *credits[] = { "\1Produced By", "Kart Krew", "", + "\1In Memory of", + "\"Tyler52\"", + "", "\1Thank you", "\1for playing!", NULL @@ -510,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"}, @@ -518,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} }; @@ -563,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<>1); From ad42a9f63cace18cd4357a2b4f57232ed4a931d1 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 28 Mar 2018 20:32:53 -0400 Subject: [PATCH 11/31] Some more credit adjustments --- src/f_finale.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index f20ac7b32..c576c4dac 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -451,7 +451,7 @@ boolean F_IntroResponder(event_t *event) // CREDITS // ========= static const char *credits[] = { - "\1SRBTwo Kart", + "\1SRB2 Kart", "\1Credits", "", "\1Game Design", @@ -460,8 +460,8 @@ static const char *credits[] = { "\"Chaos Zero 64\"", "", "\1Programming", - "\"Sryder\"", - "\"wolfs\"", + "Sean \"Sryder\" Ryder", + "Ehab \"wolfs\" Saeed", "\"ZarroTsu\"", "Sally \"TehRealSalt\" Cochenour", "\"Lat\'\"", @@ -488,7 +488,7 @@ static const char *credits[] = { "\1Level Design", "\"Blitz-T\"", "\"Chromatian\"", - "\"Sryder\"", + "Sean \"Sryder\" Ryder", "\"Blade\"", "\"CoatRack\"", "\"Boinciel\"", From d07419b6accf03875cdce739d8a393ead7650c77 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 28 Mar 2018 21:52:35 -0400 Subject: [PATCH 12/31] Allow skipping --- src/f_finale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/f_finale.c b/src/f_finale.c index c576c4dac..280d6831b 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -666,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) From f2bc7d16c9354997892c67566497a946e790ca53 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 28 Mar 2018 22:12:45 -0400 Subject: [PATCH 13/31] Allow skipping (for real this time) --- src/f_finale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 280d6831b..207d4025c 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -666,8 +666,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; From 84a5fac5e921a858a27785a0db2360aa4674a6fc Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Mar 2018 01:14:29 -0400 Subject: [PATCH 14/31] Start of a better unlockable checklist Still WIP, doesn't display properly --- src/m_cond.c | 2 +- src/m_cond.h | 1 + src/m_menu.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 88 insertions(+), 10 deletions(-) diff --git a/src/m_cond.c b/src/m_cond.c index 729323655..9025c5214 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -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) { diff --git a/src/m_cond.h b/src/m_cond.h index d34b2cbf5..aadf301b6 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -151,6 +151,7 @@ void M_ClearSecrets(void); // Updating conditions and unlockables void M_CheckUnlockConditions(void); +UINT8 M_CheckCondition(condition_t *cn); UINT8 M_UpdateUnlockablesAndExtraEmblems(void); void M_SilentUpdateUnlockablesAndEmblems(void); UINT8 M_CheckLevelEmblems(void); diff --git a/src/m_menu.c b/src/m_menu.c index 72f7bc58e..349838bd4 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4263,26 +4263,103 @@ static void M_LevelSelectWarp(INT32 choice) UINT8 skyRoomMenuTranslations[MAXUNLOCKABLES]; -#define NUMCHECKLIST 8 +{ + char *tempstr = ""; + + switch(cond.type) + { + case UC_PLAYTIME: + tempstr = va("Play for %i:%02i:%02i", + G_TicsToHours(cond.requirement), + G_TicsToMinutes(cond.requirement, false), + G_TicsToSeconds(cond.requirement)); + break; + case UC_MATCHESPLAYED: + tempstr = va("Play %d matches", cond.requirement); + break; + case UC_GAMECLEAR: + if (cond.requirement > 1) + tempstr = va("Beat game %d times", cond.requirement); + else + tempstr = va("Beat the game"); + break; + case UC_ALLEMERALDS: + if (cond.requirement > 1) + tempstr = va("Beat game w/ all emeralds %d times", cond.requirement); + else + tempstr = va("Beat game w/ all emeralds"); + break; + case UC_OVERALLTIME: + tempstr = va("Get overall time of %i:%02i:%02i", + G_TicsToHours(cond.requirement), + G_TicsToMinutes(cond.requirement, false), + G_TicsToSeconds(cond.requirement)); + break; + case UC_MAPVISITED: + tempstr = va("Visit %s", G_BuildMapTitle(cond.requirement-1)); + break; + case UC_MAPBEATEN: + tempstr = va("Beat %s", G_BuildMapTitle(cond.requirement-1)); + break; + case UC_MAPALLEMERALDS: + tempstr = va("Beat %s w/ all emeralds", G_BuildMapTitle(cond.requirement-1)); + break; + case UC_MAPTIME: + tempstr = 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)); + break; + case UC_TOTALEMBLEMS: + tempstr = va("Get %d emblems", cond.requirement); + break; + case UC_EXTRAEMBLEM: + tempstr = va("Get \"%s\" emblem", extraemblems[cond.requirement-1].name); + break; + default: + break; + } + + return tempstr; +} + +#define NUMCHECKLIST 32 static void M_DrawChecklist(void) { - INT32 i, j = 0; + INT32 i, line = 0; for (i = 0; i < MAXUNLOCKABLES; i++) { + INT32 c, lastid = -1; + if (unlockables[i].name[0] == 0 || unlockables[i].nochecklist || !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)); + V_DrawString(8, 8+(line*8), V_RETURN8|(unlockables[i].unlocked ? V_GREENMAP : V_REDMAP), unlockables[i].name); + ++line; - if (unlockables[i].unlocked) - V_DrawString(308, 8+(24*j), V_YELLOWMAP, "Y"); - else - V_DrawString(308, 8+(24*j), V_YELLOWMAP, "N"); + for (c = 0; c < conditionSets[unlockables[i].conditionset].numconditions; c++) + { + condition_t cond = conditionSets[unlockables[i].conditionset].condition[c]; + UINT8 achieved = M_CheckCondition(&cond); + char *str = M_GetConditionString(cond); - if (++j >= NUMCHECKLIST) + if (!str) + continue; + + ++line; + + if (cond.id != lastid) + V_DrawString(16, 8+(line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), va("* %s", str)); + else + V_DrawString(16, 8+(line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), va(" AND %s", str)); + + lastid = cond.id; + } + line += 2; + + if (line >= NUMCHECKLIST) break; } } From d4fba3be497e0dd38d4c58b35c55cc73f0fac192 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Mar 2018 01:14:47 -0400 Subject: [PATCH 15/31] :( --- src/m_menu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/m_menu.c b/src/m_menu.c index 349838bd4..03e622810 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -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,6 +4264,7 @@ static void M_LevelSelectWarp(INT32 choice) UINT8 skyRoomMenuTranslations[MAXUNLOCKABLES]; +static char *M_GetConditionString(condition_t cond) { char *tempstr = ""; From 713fba711119d1d71388789515a9084268efc32f Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Mar 2018 01:34:31 -0400 Subject: [PATCH 16/31] More full names, and more names --- src/f_finale.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 207d4025c..8931f3562 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -473,14 +473,16 @@ static const char *credits[] = { "\"Iceman404\"", "\"Blade\"", "\"CoatRack\"", + "Wesley \"Charyb\" Gillebaard", "James \"SeventhSentinel\" Hall", - "Sally \"TehRealSalt\" Cochenour", // Eggman + "Sally \"TehRealSalt\" Cochenour", "\"Chaos Zero 64\"", "\"ZarroTsu\"", - "\"Spherallic\"", + "\"MotorRoach\"", + "\"VAdaPEGA\"", "", "\1Music and Sound", - "\"Charyb\"", + "Wesley \"Charyb\" Gillebaard", "James \"SeventhSentinel\" Hall", "Karl Brueggemann", "\"MaxieDaMan\"", @@ -491,9 +493,9 @@ static const char *credits[] = { "Sean \"Sryder\" Ryder", "\"Blade\"", "\"CoatRack\"", - "\"Boinciel\"", "\"Ryuspark\"", "\"ZarroTsu\"", + "Paul \"Boinciel\" Clempson", "\"Tyrannosaur Chao\" aka \"Chaotic Chao\"", "James \"SeventhSentinel\" Hall", "Sally \"TehRealSalt\" Cochenour", @@ -510,7 +512,10 @@ static const char *credits[] = { "", "\1Special Thanks", "Sonic Team Jr. & SRB2", - "Bandit \"Bippy\" Cochenour", // i <3 my dog + "\"Nev3r\"", + "\"Ritz\"", + "\"Spherallic\"", + "Bandit \"Boppy\" Cochenour", // i <3 my dog "", "\1Produced By", "Kart Krew", From cde733f850e94d3be4666fef22693fd622e31802 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Mar 2018 11:43:56 -0400 Subject: [PATCH 17/31] Finished checklist --- src/m_menu.c | 110 ++++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 54 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 03e622810..7d64c6c69 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4266,105 +4266,107 @@ UINT8 skyRoomMenuTranslations[MAXUNLOCKABLES]; static char *M_GetConditionString(condition_t cond) { - char *tempstr = ""; - switch(cond.type) { case UC_PLAYTIME: - tempstr = va("Play for %i:%02i:%02i", + return va("Play for %i:%02i:%02i", G_TicsToHours(cond.requirement), G_TicsToMinutes(cond.requirement, false), G_TicsToSeconds(cond.requirement)); - break; case UC_MATCHESPLAYED: - tempstr = va("Play %d matches", cond.requirement); - break; + return va("Play %d matches", cond.requirement); case UC_GAMECLEAR: if (cond.requirement > 1) - tempstr = va("Beat game %d times", cond.requirement); + return va("Beat game %d times", cond.requirement); else - tempstr = va("Beat the game"); - break; + return va("Beat the game"); case UC_ALLEMERALDS: if (cond.requirement > 1) - tempstr = va("Beat game w/ all emeralds %d times", cond.requirement); + return va("Beat game w/ all emeralds %d times", cond.requirement); else - tempstr = va("Beat game w/ all emeralds"); - break; + return va("Beat game w/ all emeralds"); case UC_OVERALLTIME: - tempstr = va("Get overall time of %i:%02i:%02i", + return va("Get overall time of %i:%02i:%02i", G_TicsToHours(cond.requirement), G_TicsToMinutes(cond.requirement, false), G_TicsToSeconds(cond.requirement)); - break; case UC_MAPVISITED: - tempstr = va("Visit %s", G_BuildMapTitle(cond.requirement-1)); - break; + return va("Visit %s", G_BuildMapTitle(cond.requirement-1)); case UC_MAPBEATEN: - tempstr = va("Beat %s", G_BuildMapTitle(cond.requirement-1)); - break; + return va("Beat %s", G_BuildMapTitle(cond.requirement-1)); case UC_MAPALLEMERALDS: - tempstr = va("Beat %s w/ all emeralds", G_BuildMapTitle(cond.requirement-1)); - break; + return va("Beat %s w/ all emeralds", G_BuildMapTitle(cond.requirement-1)); case UC_MAPTIME: - tempstr = va("Beat %s in %i:%02i.%02i", G_BuildMapTitle(cond.extrainfo1-1), + 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)); - break; case UC_TOTALEMBLEMS: - tempstr = va("Get %d emblems", cond.requirement); - break; + return va("Get %d emblems", cond.requirement); case UC_EXTRAEMBLEM: - tempstr = va("Get \"%s\" emblem", extraemblems[cond.requirement-1].name); - break; + return va("Get \"%s\" emblem", extraemblems[cond.requirement-1].name); default: - break; + return ""; } - - return tempstr; } -#define NUMCHECKLIST 32 +#define NUMCHECKLIST 64 static void M_DrawChecklist(void) { - INT32 i, line = 0; + INT32 i, line = 0, c, lastid; for (i = 0; i < MAXUNLOCKABLES; i++) { - INT32 c, lastid = -1; - if (unlockables[i].name[0] == 0 || unlockables[i].nochecklist || !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS) continue; - V_DrawString(8, 8+(line*8), V_RETURN8|(unlockables[i].unlocked ? V_GREENMAP : V_REDMAP), unlockables[i].name); + ++line; + V_DrawString(8, (line*8), V_RETURN8|(unlockables[i].unlocked ? V_GREENMAP : V_REDMAP), unlockables[i].name); + + if (conditionSets[unlockables[i].conditionset - 1].numconditions) + { + c = 0; + lastid = -1; + + 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); + + CONS_Printf("%d-%d\n", i, c); + + 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; - for (c = 0; c < conditionSets[unlockables[i].conditionset].numconditions; c++) - { - condition_t cond = conditionSets[unlockables[i].conditionset].condition[c]; - UINT8 achieved = M_CheckCondition(&cond); - char *str = M_GetConditionString(cond); - - if (!str) - continue; - - ++line; - - if (cond.id != lastid) - V_DrawString(16, 8+(line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), va("* %s", str)); - else - V_DrawString(16, 8+(line*8), V_MONOSPACE|V_ALLOWLOWERCASE|(achieved ? V_YELLOWMAP : 0), va(" AND %s", str)); - - lastid = cond.id; - } - line += 2; - if (line >= NUMCHECKLIST) + { + CONS_Printf("out of space\n"); break; + } } } +#undef NUMCHECKLIST #define NUMHINTS 5 static void M_EmblemHints(INT32 choice) From e9c2b09c246f9b0523d002afb2be94d973145462 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Mar 2018 12:01:04 -0400 Subject: [PATCH 18/31] Forgot to remove some debug stuff --- src/m_menu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 7d64c6c69..b654c89bf 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4310,7 +4310,7 @@ static char *M_GetConditionString(condition_t cond) } } -#define NUMCHECKLIST 64 +#define NUMCHECKLIST 23 static void M_DrawChecklist(void) { INT32 i, line = 0, c, lastid; @@ -4335,8 +4335,6 @@ static void M_DrawChecklist(void) UINT8 achieved = M_CheckCondition(&cond); char *str = M_GetConditionString(cond); - CONS_Printf("%d-%d\n", i, c); - if (!str) continue; @@ -4360,10 +4358,7 @@ static void M_DrawChecklist(void) ++line; if (line >= NUMCHECKLIST) - { - CONS_Printf("out of space\n"); break; - } } } #undef NUMCHECKLIST From 6fa54576f6632cbbb9bc0669c7cc7a5bf698a0db Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Mar 2018 12:57:41 -0400 Subject: [PATCH 19/31] Real naaaames --- src/f_finale.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 8931f3562..cb1aee8dd 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -472,7 +472,7 @@ static const char *credits[] = { "\1Artists", "\"Iceman404\"", "\"Blade\"", - "\"CoatRack\"", + "Sherman \"CoatRack\" DesJardin", "Wesley \"Charyb\" Gillebaard", "James \"SeventhSentinel\" Hall", "Sally \"TehRealSalt\" Cochenour", @@ -492,7 +492,7 @@ static const char *credits[] = { "\"Chromatian\"", "Sean \"Sryder\" Ryder", "\"Blade\"", - "\"CoatRack\"", + "Sherman \"CoatRack\" DesJardin", "\"Ryuspark\"", "\"ZarroTsu\"", "Paul \"Boinciel\" Clempson", @@ -504,8 +504,8 @@ static const char *credits[] = { "\"Simsmagic\"", "", "\1Testing", - "\"Jeck Jims\"", - "\"Fooruman\"", + "Jesse \"Jeck Jims\" Emerick", + "Karol \"Fooruman\" Dabrowski", // Dąbrowski, accents in srb2 :ytho: "\"CyberIF\"", "\"Dani\"", "\"VirtAnderson\"", @@ -515,7 +515,7 @@ static const char *credits[] = { "\"Nev3r\"", "\"Ritz\"", "\"Spherallic\"", - "Bandit \"Boppy\" Cochenour", // i <3 my dog + "Bandit \"Bobby\" Cochenour", // i <3 my dog "", "\1Produced By", "Kart Krew", From 0fe06a0089416904c421ca37e7ff719a82591007 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Mar 2018 13:35:40 -0400 Subject: [PATCH 20/31] Add the accent --- src/f_finale.c | 2 +- src/hu_stuff.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index cb1aee8dd..9931e2faf 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -505,7 +505,7 @@ static const char *credits[] = { "", "\1Testing", "Jesse \"Jeck Jims\" Emerick", - "Karol \"Fooruman\" Dabrowski", // Dąbrowski, accents in srb2 :ytho: + "Karol \"Fooruman\" D""\x1E""browski", // Dąbrowski, accents in srb2 :ytho: "\"CyberIF\"", "\"Dani\"", "\"VirtAnderson\"", diff --git a/src/hu_stuff.h b/src/hu_stuff.h index 21bc40a8e..451cc8d89 100644 --- a/src/hu_stuff.h +++ b/src/hu_stuff.h @@ -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) From 2cc2b68e38836316d648c5e859b692098cf0795e Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Mar 2018 14:48:45 -0400 Subject: [PATCH 21/31] Oh boy another real name --- src/f_finale.c | 2 +- src/p_floor.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 9931e2faf..90c2a7a73 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -489,7 +489,7 @@ static const char *credits[] = { "", "\1Level Design", "\"Blitz-T\"", - "\"Chromatian\"", + "Jeffery \"Chromatian\" Scott", "Sean \"Sryder\" Ryder", "\"Blade\"", "Sherman \"CoatRack\" DesJardin", diff --git a/src/p_floor.c b/src/p_floor.c index 9e37e70f8..397483127 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -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 From e86aa94f740eea63ffccd93128212f90a5d85a32 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 29 Mar 2018 18:11:06 -0400 Subject: [PATCH 22/31] Zigs & better scroll --- src/f_finale.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 90c2a7a73..5f018e7dd 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -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; @@ -584,10 +585,10 @@ void F_CreditDrawer(void) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); // Draw background - V_DrawSciencePatch(0, 0 - FixedMul(32< Date: Thu, 29 Mar 2018 21:43:02 -0400 Subject: [PATCH 23/31] Unsuck start boosts --- src/k_kart.c | 39 ++++++++++++++++++++++----------------- src/k_kart.h | 2 +- src/lua_baselib.c | 3 +-- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 4c2568a12..2134d7a0f 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -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); } } } @@ -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); diff --git a/src/k_kart.h b/src/k_kart.h index 3ebd418ff..f615e247e 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -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); diff --git a/src/lua_baselib.c b/src/lua_baselib.c index e2cf4cd28..3aaf3b1d1 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -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; } From e974b6e4b78c0a29efb7f01938fefefeab8d59d7 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 30 Mar 2018 00:53:25 -0400 Subject: [PATCH 24/31] MK rules for Battle scoring and quick fix for karma items --- src/g_game.c | 8 ++------ src/k_kart.c | 14 +++++++------- src/p_inter.c | 39 ++++++++++++++++++--------------------- src/p_map.c | 2 -- 4 files changed, 27 insertions(+), 36 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index d02edcb52..b896c30f1 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -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; diff --git a/src/k_kart.c b/src/k_kart.c index 2134d7a0f..54ae147f6 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -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) @@ -3437,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++) diff --git a/src/p_inter.c b/src/p_inter.c index d77940dc4..98481ebbf 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -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) diff --git a/src/p_map.c b/src/p_map.c index 6935be9d1..0dea23b63 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1682,7 +1682,6 @@ static boolean PIT_CheckThing(mobj_t *thing) 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]++; @@ -1695,7 +1694,6 @@ static boolean PIT_CheckThing(mobj_t *thing) 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]++; From a10a068f15a231fee79d45322c83be9f7d71a941 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 30 Mar 2018 00:53:32 -0400 Subject: [PATCH 25/31] zzzzz --- src/p_map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_map.c b/src/p_map.c index 0dea23b63..c36d8efab 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1682,6 +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 && P_CanPickupItem(tmthing->player, true))) { thing->player->kartstuff[k_comebackmode] = 0; thing->player->kartstuff[k_comebackpoints]++; @@ -1694,6 +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 && P_CanPickupItem(thing->player, true))) { tmthing->player->kartstuff[k_comebackmode] = 0; tmthing->player->kartstuff[k_comebackpoints]++; From 7516a1dc0cbc9a4444992794a7f34eb9de9edc1b Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 30 Mar 2018 12:16:15 -0400 Subject: [PATCH 26/31] Doing one more step to totally ensure that matchesplayed is unlocking stuff --- src/dehacked.c | 2 +- src/f_finale.c | 4 ++-- src/g_game.c | 9 +++++---- src/g_game.h | 2 +- src/m_cond.c | 5 +++-- src/m_cond.h | 2 +- src/p_inter.c | 4 ++-- src/p_spec.c | 4 ++-- src/p_user.c | 3 ++- src/sdl/i_system.c | 6 +++--- src/y_inter.c | 8 ++++---- 11 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 3e113072a..a44a26b07 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -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); diff --git a/src/f_finale.c b/src/f_finale.c index 5f018e7dd..5d77e63b6 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -775,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); } } diff --git a/src/g_game.c b/src/g_game.c index b896c30f1..d6b3e8dd7 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -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 } } @@ -3643,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; @@ -3661,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; diff --git a/src/g_game.h b/src/g_game.h index 78f08e365..f59641fb0 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -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); diff --git a/src/m_cond.c b/src/m_cond.c index 9025c5214..f2b163ea7 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -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(); diff --git a/src/m_cond.h b/src/m_cond.h index aadf301b6..052c31f2f 100644 --- a/src/m_cond.h +++ b/src/m_cond.h @@ -152,7 +152,7 @@ void M_ClearSecrets(void); // Updating conditions and unlockables void M_CheckUnlockConditions(void); UINT8 M_CheckCondition(condition_t *cn); -UINT8 M_UpdateUnlockablesAndExtraEmblems(void); +UINT8 M_UpdateUnlockablesAndExtraEmblems(boolean force); void M_SilentUpdateUnlockablesAndEmblems(void); UINT8 M_CheckLevelEmblems(void); diff --git a/src/p_inter.c b/src/p_inter.c index 98481ebbf..da84a1fcb 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -607,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; } diff --git a/src/p_spec.c b/src/p_spec.c index 46e6685d4..2c097884d 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -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 } } } diff --git a/src/p_user.c b/src/p_user.c index f2cf84f4b..92dc9d0d3 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -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 @@ -9286,6 +9286,7 @@ void P_PlayerThink(player_t *player) CONS_Printf(M_GetText("%s ran out of time.\n"), player_names[player-players]); player->pflags |= PF_TIMEOVER; + legitimateexit = true; // SRB2kart: losing a race is still seeing it through to the end :p if (player->pflags & PF_NIGHTSMODE) { diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 4a9876097..9ee17cc31 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -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) diff --git a/src/y_inter.c b/src/y_inter.c index d2fe08e99..d6f2aa309 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -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)) From fe645f8a53a0314300d7482eb5d397ac2e0ddfcd Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 30 Mar 2018 12:17:48 -0400 Subject: [PATCH 27/31] Actually, I messed this up --- src/p_user.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index 92dc9d0d3..d11fbf1fa 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -9286,7 +9286,13 @@ void P_PlayerThink(player_t *player) CONS_Printf(M_GetText("%s ran out of time.\n"), player_names[player-players]); player->pflags |= PF_TIMEOVER; - legitimateexit = true; // SRB2kart: losing a race is still seeing it through to the end :p + + 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) { From 88b278e7bb9740b4a877512038238c7ef4f5842e Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 30 Mar 2018 13:33:01 -0400 Subject: [PATCH 28/31] oop --- src/p_spec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_spec.c b/src/p_spec.c index 2c097884d..9a510fd06 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -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; From 1c0e9eb12c0cce34ed5e67783de661a06556c85e Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 30 Mar 2018 14:14:08 -0400 Subject: [PATCH 29/31] I just realized that SRB2's credits are listed in alphabetical order of last name (I had to research the Polish alphabet to figure out where Fooruman's name should've been, hah) --- src/f_finale.c | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 5d77e63b6..e6cd6d0ee 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -456,67 +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\"", + "\"Chaos Zero 64\"", + "Sally \"TehRealSalt\" Cochenour", + "Desmond \"Blade\" DesJardins", "Sherman \"CoatRack\" DesJardin", "Wesley \"Charyb\" Gillebaard", "James \"SeventhSentinel\" Hall", - "Sally \"TehRealSalt\" Cochenour", - "\"Chaos Zero 64\"", - "\"ZarroTsu\"", + "\"Iceman404\"", "\"MotorRoach\"", "\"VAdaPEGA\"", + "\"ZarroTsu\"", "", "\1Music and Sound", + "Karl Brueggemann", "Wesley \"Charyb\" Gillebaard", "James \"SeventhSentinel\" Hall", - "Karl Brueggemann", "\"MaxieDaMan\"", "", "\1Level Design", "\"Blitz-T\"", - "Jeffery \"Chromatian\" Scott", - "Sean \"Sryder\" Ryder", - "\"Blade\"", - "Sherman \"CoatRack\" DesJardin", - "\"Ryuspark\"", - "\"ZarroTsu\"", - "Paul \"Boinciel\" Clempson", - "\"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", - "Jesse \"Jeck Jims\" Emerick", - "Karol \"Fooruman\" D""\x1E""browski", // Dąbrowski, accents in srb2 :ytho: "\"CyberIF\"", "\"Dani\"", + "Karol \"Fooruman\" D""\x1E""browski", // Dąbrowski, accents in srb2 :ytho: + "Jesse \"Jeck Jims\" Emerick", "\"VirtAnderson\"", "", "\1Special Thanks", "Sonic Team Jr. & SRB2", + "Bandit \"Bobby\" Cochenour", // i <3 my dog "\"Nev3r\"", "\"Ritz\"", "\"Spherallic\"", - "Bandit \"Bobby\" Cochenour", // i <3 my dog "", "\1Produced By", "Kart Krew", From 8f69d147162c0b514792bdce23ed9c28fb76571a Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 31 Mar 2018 00:11:03 -0400 Subject: [PATCH 30/31] reset randmapbuffer in G_DeferedInitNew --- src/g_game.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/g_game.c b/src/g_game.c index d6b3e8dd7..a7491bac8 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3971,6 +3971,9 @@ void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, U COM_BufAddText("stopdemo\n"); ghosts = NULL; + for (i = 0; i < NUMMAPS; i++) + randmapbuffer[i] = -1; // Reset this + // this leave the actual game if needed SV_StartSinglePlayerServer(); From 0f6c79d9834037eaf3fbbc92e7af4190dc96b209 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 31 Mar 2018 00:12:26 -0400 Subject: [PATCH 31/31] I'm a huge idiot --- src/g_game.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index a7491bac8..bca9be057 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3964,6 +3964,7 @@ void G_SaveGame(UINT32 savegameslot) // void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, UINT8 ssplayers, boolean FLS) { + INT32 i; UINT8 color = 0; paused = false; @@ -3972,7 +3973,7 @@ void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, U ghosts = NULL; for (i = 0; i < NUMMAPS; i++) - randmapbuffer[i] = -1; // Reset this + randmapbuffer[i] = -1; // this leave the actual game if needed SV_StartSinglePlayerServer();