popcaphotfix: misused a max that could have rendered the hard popcap useless

This commit is contained in:
Incoming
2015-02-23 23:34:17 -05:00
parent b49a5a934c
commit 76b9fbb874
+5 -1
View File
@@ -126,7 +126,11 @@
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
usr << "<span class='danger'>The round is either not ready, or has already finished...</span>"
return
var/relevent_cap = max(config.hard_popcap, config.extreme_popcap)
var/relevent_cap
if(config.hard_popcap && config.extreme_popcap)
relevent_cap = min(config.hard_popcap, config.extreme_popcap)
else
relevent_cap = max(config.hard_popcap, config.extreme_popcap)
if(relevent_cap && living_player_count() >= relevent_cap && !(ckey(key) in admin_datums))
usr << "<span class='danger'>[config.hard_popcap_message]</span>"
return