mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-23 11:27:21 -04:00
Optimization for not rebuilding LevelSession defaults once a second to set playtime.
This commit is contained in:
parent
67ed73a01f
commit
ef3edfcc08
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ module.exports = class LevelBus extends Bus
|
|||
incrementSessionPlaytime: =>
|
||||
if @playerIsIdle then return
|
||||
@changedSessionProperties.playtime = true
|
||||
@session.set('playtime', @session.get('playtime', true) + 1)
|
||||
@session.set('playtime', (@session.get('playtime') ? 0) + 1)
|
||||
|
||||
onPoint: ->
|
||||
return true unless @session?.get('multiplayer')
|
||||
|
|
Loading…
Reference in a new issue