diff --git a/src/p_local.h b/src/p_local.h index 91ee0c496..098b1fdd4 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -28,7 +28,7 @@ #define VIEWHEIGHTS "41" // Maximum player score. -#define MAXSCORE 999999990 +#define MAXSCORE 99999990 // 999999990 // mapblocks are used to check movement // against lines and things @@ -140,7 +140,7 @@ boolean P_IsObjectOnGround(mobj_t *mo); boolean P_IsObjectOnGroundIn(mobj_t *mo, sector_t *sec); boolean P_InSpaceSector(mobj_t *mo); boolean P_InQuicksand(mobj_t *mo); -boolean P_PlayerHitFloor(player_t *player); +boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff); void P_SetObjectMomZ(mobj_t *mo, fixed_t value, boolean relative); void P_RestoreMusic(player_t *player); diff --git a/src/p_user.c b/src/p_user.c index 60d4cd5b7..dad0520a6 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1089,9 +1089,8 @@ void P_AddPlayerScore(player_t *player, UINT32 amount) oldscore = player->score; // Don't go above MAXSCORE. - if (player->score + amount < MAXSCORE) - player->score += amount; - else + player->score += amount; + if (player->score > MAXSCORE) player->score = MAXSCORE; // check for extra lives every 50000 pts diff --git a/src/st_stuff.c b/src/st_stuff.c index ceef586a4..889eeb57d 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -132,22 +132,23 @@ hudinfo_t hudinfo[NUMHUDITEMS] = { 16, 42}, // HUD_RINGS { 220, 10}, // HUD_RINGSSPLIT - { 120, 42}, // HUD_RINGSNUM + { 104, 42}, // HUD_RINGSNUM { 296, 10}, // HUD_RINGSNUMSPLIT + { 120, 42}, // HUD_RINGSNUMTICS { 16, 10}, // HUD_SCORE { 120, 10}, // HUD_SCORENUM { 16, 26}, // HUD_TIME { 128, 10}, // HUD_TIMESPLIT - { 96, 26}, // HUD_MINUTES + { 72, 26}, // HUD_MINUTES { 188, 10}, // HUD_MINUTESSPLIT - { 96, 26}, // HUD_TIMECOLON + { 72, 26}, // HUD_TIMECOLON { 188, 10}, // HUD_TIMECOLONSPLIT - { 120, 26}, // HUD_SECONDS + { 96, 26}, // HUD_SECONDS { 212, 10}, // HUD_SECONDSSPLIT - { 120, 26}, // HUD_TIMETICCOLON - { 144, 26}, // HUD_TICS + { 96, 26}, // HUD_TIMETICCOLON + { 120, 26}, // HUD_TICS { 120, 56}, // HUD_SS_TOTALRINGS { 296, 40}, // HUD_SS_TOTALRINGS_SPLIT @@ -663,7 +664,7 @@ static void ST_drawTime(void) static inline void ST_drawRings(void) { - INT32 ringnum = max(stplyr->rings, 0); + INT32 ringnum; ST_DrawPatchFromHudWS(HUD_RINGS, ((!stplyr->spectator && stplyr->rings <= 0 && leveltime/5 & 1) ? sboredrings : sborings), ((stplyr->spectator) ? V_HUDTRANSHALF : V_HUDTRANS)); @@ -677,8 +678,13 @@ static inline void ST_drawRings(void) if (playeringame[i] && players[i].mo && players[i].rings > 0) ringnum += players[i].rings; } + else + ringnum = max(stplyr->rings, 0); - ST_DrawNumFromHudWS(HUD_RINGSNUM, ringnum, ((stplyr->spectator) ? V_HUDTRANSHALF : V_HUDTRANS)); + if (!splitscreen && (cv_timetic.value == 2 || modeattacking)) + ST_DrawNumFromHud(HUD_RINGSNUMTICS, ringnum, ((stplyr->spectator) ? V_HUDTRANSHALF : V_HUDTRANS)); + else + ST_DrawNumFromHudWS(HUD_RINGSNUM, ringnum, ((stplyr->spectator) ? V_HUDTRANSHALF : V_HUDTRANS)); } static void ST_drawLives(void) diff --git a/src/st_stuff.h b/src/st_stuff.h index ddb119fb8..9be37b502 100644 --- a/src/st_stuff.h +++ b/src/st_stuff.h @@ -86,6 +86,7 @@ typedef enum HUD_RINGSSPLIT, HUD_RINGSNUM, HUD_RINGSNUMSPLIT, + HUD_RINGSNUMTICS, HUD_SCORE, HUD_SCORENUM, diff --git a/src/y_inter.c b/src/y_inter.c index 3b7f082f9..55ceea034 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -764,6 +764,8 @@ void Y_Ticker(void) data.coop.total += data.coop.bonuses[i].points; data.coop.bonuses[i].points = 0; } + if (data.coop.score > MAXSCORE) + data.coop.score = MAXSCORE; if (data.coop.bonuses[i].points > 0) anybonuses = true; } @@ -1763,6 +1765,8 @@ static void Y_AwardCoopBonuses(void) { (bonuses_list[bonusnum][j])(&players[i], &localbonuses[j]); players[i].score += localbonuses[j].points; + if (players[i].score > MAXSCORE) + players[i].score = MAXSCORE; } ptlives = (!ultimatemode && !modeattacking) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0; @@ -1805,6 +1809,8 @@ static void Y_AwardSpecialStageBonus(void) else Y_SetRingBonus(&players[i], &localbonus); players[i].score += localbonus.points; + if (players[i].score > MAXSCORE) + players[i].score = MAXSCORE; // grant extra lives right away since tally is faked ptlives = (!ultimatemode && !modeattacking) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0;