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
#multiplayer-team-selection
for team in playableTeams
label(for="multiplayer_team_"+team)= team
input(id="multiplayer_team_"+team, type="radio", name="multiplayer", value=team)
h4
if team == me.team
em= "Playing as " + team
else
a(href=joinLink + "&skip_protect_api=true&team=" + team)= "Play as " + team
.modal-footer
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: ->
super()
@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) ->
e.target.select()

View file

@ -123,7 +123,8 @@ module.exports = class PlayLevelView extends View
@levelLoader.destroy()
@levelLoader = null
@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()
@initGod()
@initGoalManager()