mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-22 10:55:19 -04:00
Fixed bug recording level playtime.
This commit is contained in:
parent
8fdd2c0688
commit
e04a0f33a1
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ module.exports = class LevelBus extends Bus
|
|||
incrementSessionPlaytime: =>
|
||||
if @playerIsIdle then return
|
||||
@changedSessionProperties.playtime = true
|
||||
@session.set('playtime', @session.get('playtime') + 1)
|
||||
if _.isNaN @session.get('playtime')
|
||||
@session.set 'playtime', 0 # Oops, corrupted some playtimes when moving to new defaults system. Fixed on 2014-10-06, but lost playtime data in between.
|
||||
@session.set('playtime', @session.get('playtime', true) + 1)
|
||||
|
||||
onPoint: ->
|
||||
return true unless @session?.get('multiplayer')
|
||||
|
|
Loading…
Reference in a new issue