Fixed a case where "none" was set as a gamemode by a vote

This commit is contained in:
Albert Iordache
2012-01-02 12:28:35 +02:00
parent 00a86accfa
commit 15aeca6213

View File

@@ -11,7 +11,8 @@
/world/proc/save_mode(var/the_mode)
var/F = file("data/mode.txt")
fdel(F)
if (length(the_mode) > 0)
if (length(the_mode) > 0 && the_mode != "none") // "None" is the vote set to dead people
// , who can't pick an option in a gamemode vote.
F << the_mode
else
F << "traitor" // Default mode, in case of errors