HUD: fix GOAL not turning rainbow if point limit is less than 5

This commit is contained in:
James R 2024-01-13 16:54:20 -08:00
parent 99a2a3fb74
commit 26b03a810c

View file

@ -2226,7 +2226,13 @@ struct PositionFacesInfo
player_t* top() const { return &players[rankplayer[0]]; }
UINT32 top_score() const { return top()->roundscore; }
bool near_goal() const { return g_pointlimit - 5 <= top_score(); }
bool near_goal() const
{
constexpr tic_t kThreshold = 5;
return std::max(kThreshold, g_pointlimit) - kThreshold <= top_score();
}
skincolornum_t vomit_color() const
{
if (!near_goal())