This commit is contained in:
Scott Erickson 2014-02-07 16:47:54 -08:00
commit d3111f545d
3 changed files with 7 additions and 6 deletions

View file

@ -28,8 +28,11 @@
if playableTeams.length > 1 if playableTeams.length > 1
#multiplayer-team-selection #multiplayer-team-selection
for team in playableTeams for team in playableTeams
label(for="multiplayer_team_"+team)= team h4
input(id="multiplayer_team_"+team, type="radio", name="multiplayer", value=team) if team == me.team
em= "Playing as " + team
else
a(href=joinLink + "&skip_protect_api=true&team=" + team)= "Play as " + team
.modal-footer .modal-footer
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close

View file

@ -28,9 +28,6 @@ module.exports = class MultiplayerModal extends View
afterRender: -> afterRender: ->
super() super()
@updateLinkSection() @updateLinkSection()
@$el.find('#multiplayer-team-selection input')
.prop('checked', -> $(@).val() is me.team)
.bind('change', -> Backbone.Mediator.publish 'level:set-team', team: $(@).val())
onClickLink: (e) -> onClickLink: (e) ->
e.target.select() e.target.select()

View file

@ -123,7 +123,8 @@ module.exports = class PlayLevelView extends View
@levelLoader.destroy() @levelLoader.destroy()
@levelLoader = null @levelLoader = null
@loadingScreen.destroy() @loadingScreen.destroy()
@setTeam @world.teamForPlayer _.size @session.get 'players' # TODO: players aren't initialized yet? #@setTeam @world.teamForPlayer _.size @session.get 'players' # TODO: players aren't initialized yet?
@setTeam @getQueryVariable("team") ? @world.teamForPlayer(0)
@initSurface() @initSurface()
@initGod() @initGod()
@initGoalManager() @initGoalManager()