Use legacy checkpoint threshold for patched maps
This commit is contained in:
parent
d0ed82a540
commit
b7afe4f347
4 changed files with 15 additions and 15 deletions
22
src/k_hud.c
22
src/k_hud.c
|
|
@ -4790,21 +4790,15 @@ static void K_drawCheckpointDebugger(void)
|
|||
if (stplyr != &players[displayplayers[0]]) // only for p1
|
||||
return;
|
||||
|
||||
if (K_UsingLegacyCheckpoints())
|
||||
{
|
||||
if (stplyr->starpostnum >= (numstarposts - (numstarposts/2)))
|
||||
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Can finish)", stplyr->starpostnum, numstarposts));
|
||||
else
|
||||
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Skip: %d)", stplyr->starpostnum, numstarposts, ((numstarposts/2) + stplyr->starpostnum)));
|
||||
V_DrawString(8, 192, 0, va("Waypoint dist: Prev %d, Next %d", stplyr->prevcheck, stplyr->nextcheck));
|
||||
}
|
||||
if (stplyr->starpostnum >= K_CheckpointThreshold())
|
||||
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Can finish)", stplyr->starpostnum, numstarposts));
|
||||
else if (K_CheckpointThreshold() != numstarposts)
|
||||
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Skip: %d)", stplyr->starpostnum, numstarposts, ((numstarposts/2) + stplyr->starpostnum)));
|
||||
else
|
||||
{
|
||||
if (stplyr->starpostnum == numstarposts)
|
||||
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Can finish)", stplyr->starpostnum, numstarposts));
|
||||
else
|
||||
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d", stplyr->starpostnum, numstarposts));
|
||||
}
|
||||
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d", stplyr->starpostnum, numstarposts));
|
||||
|
||||
if (K_UsingLegacyCheckpoints())
|
||||
V_DrawString(8, 192, 0, va("Waypoint dist: Prev %d, Next %d", stplyr->prevcheck, stplyr->nextcheck));
|
||||
}
|
||||
|
||||
static void K_DrawWaypointDebugger(void)
|
||||
|
|
|
|||
|
|
@ -11009,6 +11009,11 @@ boolean K_UsingPatchedMap(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
INT32 K_CheckpointThreshold(void)
|
||||
{
|
||||
return K_UsingLegacyCheckpoints() || K_UsingPatchedMap() ? numstarposts - numstarposts/2 : numstarposts;
|
||||
}
|
||||
|
||||
void K_UpdateMobjItemOverlay(mobj_t *part, SINT8 itemType, UINT8 itemCount)
|
||||
{
|
||||
switch (itemType)
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ boolean K_BoostChain(player_t *player, INT32 timer, boolean chainsound);
|
|||
INT32 K_ChainOrDeincrementTime(player_t *player, INT32 timer, INT32 deincrement, boolean chainsound);
|
||||
boolean K_UsingLegacyCheckpoints(void);
|
||||
boolean K_UsingPatchedMap(void);
|
||||
INT32 K_CheckpointThreshold(void);
|
||||
|
||||
void K_UpdateMobjItemOverlay(mobj_t *part, SINT8 itemType, UINT8 itemCount);
|
||||
|
||||
|
|
|
|||
|
|
@ -1988,7 +1988,7 @@ static void K_HandleLapIncrement(player_t *player)
|
|||
{
|
||||
if (K_IgnoreFinishLine(player))
|
||||
return;
|
||||
if (((K_UsingLegacyCheckpoints()) ? (player->starpostnum >= (numstarposts - (numstarposts/2))) : (player->starpostnum == numstarposts)) || (player->laps == 0))
|
||||
if ((player->starpostnum >= K_CheckpointThreshold()) || (player->laps == 0))
|
||||
{
|
||||
size_t i = 0;
|
||||
UINT8 nump = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue