Skip to content

Commit

Permalink
Load materials if isClient instead of game.isClient
Browse files Browse the repository at this point in the history
  • Loading branch information
deathcap committed Jan 29, 2014
1 parent d640213 commit e412a1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ createArtpacks = require 'artpacks'
main = () ->
console.log 'voxpopuli starting'

isClient = window?
isClient = process.browser # TODO: game

if isClient and window.performance && window.performance.timing
loadingTime = Date.now() - window.performance.timing.navigationStart
Expand Down Expand Up @@ -162,7 +162,7 @@ main = () ->
# load textures after all plugins loaded (since they may add their own)
registry = plugins.get('voxel-registry')

if game.isClient
if isClient
game.materials.load registry.getBlockPropsAll 'texture' # TODO: have voxel-registry do this

game.buttons.down.on 'pov', () -> plugins.get('voxel-player')?.toggle()
Expand Down

0 comments on commit e412a1b

Please sign in to comment.