     return if _.isUndefined(dude)
     dude.position.x = x
     dude.position.y = y
-    dude.animations.play(anim)
+    if dude.animations.currentAnim.name != anim
+      dude.animations.play(anim)
 
   update:->
     moves = @pollController()

          channel = @peer.connect(peerId)
          channel.on 'open', =>
            console.info('Joining peer ' + peerId)
            channel.send({ message: "arrive", x: @player.body.x, y: @player.body.y, @avatar })
          channel
        console.log('all peers: ' + _.map @allPeers, (channel)->channel.peer )
    @peer.on 'connection', (remote)=>
      remote.on 'data', (data)=>
        if data.message == "arrive"
          console.info('Remote peer has arrived ' + remote.peer)
          @addDude(remote.peer, data.x, data.y, data.avatar)
          channel = @peer.connect remote.peer
          channel.on 'open', =>
            console.info('Initializing ourselves on peer ' + remote.peer)


  addDude:(dudeId, x, y, sprite)->
    dude = @dudes.create(x, y, sprite)
    dude.animations.add("down", [0, 1, 2, 1], 20, true)
    dude.animations.add("left", [4, 5, 6, 5], 10, true)
    dude.animations.add("right", [8, 9, 10, 9], 10, true)
    dude.animations.add("up", [12, 13, 14, 13], 20, true)
    dude.animations.add("idle", [1], 20, true)
    @dudesById[dudeId] = dude
    dude

  removeDude:(dudeId)->
