fix sprees not being shown/updated (issue #50)

This commit is contained in:
Timo Smit 2016-02-16 12:36:01 +01:00
parent 776695b074
commit b2e68bd99c
2 changed files with 4 additions and 4 deletions

View file

@ -112,10 +112,10 @@ end
events.handle("onClientConnect", sprees.onconnect) events.handle("onClientConnect", sprees.onconnect)
function sprees.ongamestatechange(gameState) function sprees.ongamestatechange(gameState)
if gameState == constants.GAME_RUNNING then if gameState == constants.GAME_STATE_RUNNING then
events.handle("onPlayerDeath", sprees.ondeath) events.handle("onPlayerDeath", sprees.ondeath)
events.handle("onPlayerRevive", sprees.onrevive) events.handle("onPlayerRevive", sprees.onrevive)
elseif gameState == constants.GAME_INTERMISSION then elseif gameState == constants.GAME_STATE_INTERMISSION then
if currentRecords["ksrecord"] and currentRecords["ksrecord"] > 0 then if currentRecords["ksrecord"] and currentRecords["ksrecord"] > 0 then
if db.getrecord(currentMapId, constants.RECORD_KILL) then if db.getrecord(currentMapId, constants.RECORD_KILL) then
db.updaterecord(currentMapId, os.time(), constants.RECORD_KILL, currentRecords["ksrecord"], currentRecords["ksplayer"]) db.updaterecord(currentMapId, os.time(), constants.RECORD_KILL, currentRecords["ksrecord"], currentRecords["ksplayer"])

View file

@ -17,8 +17,8 @@
local constants = {} local constants = {}
constants.GAME_RUNNING = 0 constants.GAME_STATE_RUNNING = 0
constants.GAME_WARMUP = 1 constants.GAME_STATE_WARMUP = 1
constants.GAME_STATE_INTERMISSION = 3 constants.GAME_STATE_INTERMISSION = 3
constants.COLOR_MAIN = "^7" constants.COLOR_MAIN = "^7"