diff --git a/src/d_player.h b/src/d_player.h index e4b1cbb9..6c2a196d 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -235,7 +235,6 @@ typedef enum { // Basic gameplay things k_position, // Used for Kart positions, mostly for deterministic stuff - k_playerahead, // Is someone ahead of me or not? k_oldposition, // Used for taunting when you pass someone k_positiondelay, // Prevents player from taunting continuously if two people were neck-and-neck k_prevcheck, // Previous checkpoint distance; for p_user.c (was "pw_pcd") @@ -257,7 +256,6 @@ typedef enum k_driftangle, // Stores player turn angle for drifting k_driftcharge, // Charge your drift so you can release a burst of speed k_driftboost, // Boost you get from drifting - k_driftfix, // Used to fix your angle after releasing drift. k_boostcharge, // Charge-up for boosting at the start of the race, or when Lakitu drops you k_jmp, // In Mario Kart, letting go of the jump button stops the drift k_lakitu, // > 0 = Lakitu fishing, < 0 = Lakitu lap counter (was "player->airtime") // NOTE: Check for ->lakitu, replace with this @@ -452,7 +450,6 @@ typedef struct player_s INT16 totalring; // Total number of rings obtained for Race Mode tic_t realtime; // integer replacement for leveltime UINT8 laps; // Number of laps (optional) - tic_t checkpointtimes[256]; // Individual checkpoint times // SRB2kart //////////////////// // CTF Mode Stuff // diff --git a/src/g_game.c b/src/g_game.c index d3ab7e50..1c986637 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1147,6 +1147,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics) } */ + /* if (PLAYER1INPUTDOWN(gc_lookback)) { if (camera.chase && !player->kartstuff[k_camspin]) @@ -1154,6 +1155,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics) } else if (player->kartstuff[k_camspin] > 0) player->kartstuff[k_camspin] = -1; + */ // jump button if (PLAYER1INPUTDOWN(gc_jump)) @@ -2185,9 +2187,6 @@ void G_PlayerReborn(INT32 player) SINT8 pity; // SRB2kart - INT32 x; - tic_t checkpointtimes[256]; - INT32 playerahead; INT32 starpostwp; INT32 lakitu; @@ -2242,8 +2241,6 @@ void G_PlayerReborn(INT32 player) pity = players[player].pity; // SRB2kart - for (x = 0; x < (256); x++) checkpointtimes[x] = players[player].checkpointtimes[x]; - playerahead = players[player].kartstuff[k_playerahead]; starpostwp = players[player].kartstuff[k_starpostwp]; lakitu = players[player].kartstuff[k_lakitu]; @@ -2299,8 +2296,6 @@ void G_PlayerReborn(INT32 player) p->pity = pity; // SRB2kart - for (x = 0; x < 256; x++) p->checkpointtimes[x] = checkpointtimes[x]; - p->kartstuff[k_playerahead] = playerahead; p->kartstuff[k_starpostwp] = starpostwp; p->kartstuff[k_lakitu] = lakitu; diff --git a/src/k_kart.c b/src/k_kart.c index 7e013303..696faf23 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1730,19 +1730,6 @@ fixed_t K_GetKartTurnValue(player_t *player, ticcmd_t *cmd) player->kartstuff[k_driftangle] = p_angle; - if (!player->kartstuff[k_drift] && player->kartstuff[k_driftfix] > 0) - { - if (P_IsObjectOnGround(player->mo)) - p_angle += FixedMul(800, adjustangle); - player->kartstuff[k_driftfix]--; - } - else if (!player->kartstuff[k_drift] && player->kartstuff[k_driftfix] < 0) - { - if (P_IsObjectOnGround(player->mo)) - p_angle -= FixedMul(800, adjustangle); - player->kartstuff[k_driftfix]++; - } - return p_angle; } diff --git a/src/p_inter.c b/src/p_inter.c index b202dd11..5884a7c0 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1186,8 +1186,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) // Save the player's time and position. player->starposttime = player->realtime; //this makes race mode's timers work correctly whilst not affecting sp -x - if (((special->health - 1) + (numstarposts+1)*player->laps) < 256) // SIGSEGV prevention - player->checkpointtimes[(special->health - 1) + (numstarposts+1)*player->laps] = player->realtime; //player->starposttime = leveltime; player->starpostx = toucher->x>>FRACBITS; player->starposty = toucher->y>>FRACBITS; @@ -1196,10 +1194,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) player->starpostnum = special->health; P_ClearStarPost(special->health); - // SRB2kart - if (gametype == GT_RACE) - player->kartstuff[k_playerahead] = P_CheckPlayerAhead(player, (special->health - 1) + (numstarposts+1)*player->laps); - // Find all starposts in the level with this value. { thinker_t *th; @@ -1498,56 +1492,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) P_KillMobj(special, NULL, toucher); } -// SRB2kart -INT32 P_CheckPlayerAhead(player_t *player, INT32 tocheck) -{ - INT32 i, retvalue = 0, me = -1; - tic_t besttime = 0xffffffff; - - if (tocheck >= 256) - return 0; //Don't SIGSEGV. - - for (i = 0; i < MAXPLAYERS; i++) - { - if (!playeringame[i]) - continue; - - if (player == &players[i]) //you're me! - { - me = i; - continue; - } - - if (!players[i].checkpointtimes[tocheck]) - continue; - - if (players[i].checkpointtimes[tocheck] >= besttime) - continue; - - besttime = players[i].checkpointtimes[tocheck]; - retvalue = i+1; - } - - if (!retvalue) - return 0; - - if (besttime >= player->realtime) // > sign is practically paranoia - { - if (!players[retvalue-1].kartstuff[k_playerahead] && me != -1 - && players[retvalue-1].laps == player->laps - && players[retvalue-1].starpostnum == player->starpostnum) - players[retvalue-1].kartstuff[k_playerahead] = 65536; - return 65536; //we're tied! - } - - //checkplayerahead does this too! - if (!players[retvalue-1].kartstuff[k_playerahead] && me != -1 - && players[retvalue-1].laps == player->laps - && players[retvalue-1].starpostnum == player->starpostnum) - players[retvalue-1].kartstuff[k_playerahead] = 257 + me; - - return retvalue; -} // /** Prints death messages relating to a dying or hit player. * diff --git a/src/p_local.h b/src/p_local.h index ec1d784d..1fd7ada0 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -388,10 +388,6 @@ void P_CheckPointLimit(void); void P_CheckSurvivors(void); boolean P_CheckRacers(void); -// SRB2kart -INT32 P_CheckPlayerAhead(player_t *player, INT32 tocheck); -// - void P_ClearStarPost(INT32 postnum); void P_ResetStarposts(void); diff --git a/src/p_spec.c b/src/p_spec.c index a1d4ca35..9b999041 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -4085,9 +4085,6 @@ DoneSection2: player->starpostx = player->starposty = player->starpostz = 0; //except the time! player->starposttime = player->realtime; - if (((numstarposts+1)*player->laps - 1) < 256) //SIGSEGV prevention - player->checkpointtimes[(numstarposts+1)*player->laps - 1] = player->realtime; - player->kartstuff[k_playerahead] = P_CheckPlayerAhead(player, (numstarposts+1)*player->laps - 1); if (P_IsLocalPlayer(player)) { diff --git a/src/p_user.c b/src/p_user.c index fa1d32be..d44be515 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4593,12 +4593,10 @@ static void P_3dMovement(player_t *player) if (player->kartstuff[k_drift] >= 1) { movepushangle = player->mo->angle+ANGLE_45; - player->kartstuff[k_driftfix] = 5; } else if (player->kartstuff[k_drift] <= -1) { movepushangle = player->mo->angle-ANGLE_45; - player->kartstuff[k_driftfix] = -5; } else movepushangle = player->mo->angle; diff --git a/src/y_inter.c b/src/y_inter.c index 95dcd02d..41aede8f 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -240,20 +240,6 @@ void Y_IntermissionDrawer(void) //if (gottimebonus && endtic != -1) // V_DrawCenteredString(BASEVIDWIDTH/2, 172, V_YELLOWMAP, "TIME BONUS UNLOCKED!"); - - V_DrawString(70, 106, V_YELLOWMAP, "LAP 1"); - V_DrawString(70, 116, V_YELLOWMAP, "LAP 2"); - V_DrawString(70, 126, V_YELLOWMAP, "LAP 3"); - - { - INT32 laptime; - laptime = stplyr->checkpointtimes[(numstarposts+1) - 1]; - V_DrawRightAlignedString(250, 106, 0, va("%d:%02d.%02d", laptime/(60*TICRATE), laptime/TICRATE % 60, (int)((laptime%TICRATE) * (100.00f/TICRATE)))); - laptime = stplyr->checkpointtimes[((numstarposts+1)*2) - 1] - stplyr->checkpointtimes[(numstarposts+1) - 1]; - V_DrawRightAlignedString(250, 116, 0, va("%d:%02d.%02d", laptime/(60*TICRATE), laptime/TICRATE % 60, (int)((laptime%TICRATE) * (100.00f/TICRATE)))); - laptime = stplyr->realtime - stplyr->checkpointtimes[((numstarposts+1)*2) - 1]; - V_DrawRightAlignedString(250, 126, 0, va("%d:%02d.%02d", laptime/(60*TICRATE), laptime/TICRATE % 60, (int)((laptime%TICRATE) * (100.00f/TICRATE)))); - } } else if (intertype == int_race) {