Fix the lobby slots.

- lobbyInfo.Slots is now a dictionary, keyed by the name of the PlayerReference that the slot is tied to.
 - LockRace/Color/Team is now specified on the slot, avoiding map lookups in the lobby
 - Observers are no longer tied to slots -> players will join as observers instead of crashing the game if there are no available slots
 - Observers are able to change their name and color
This commit is contained in:
Paul Chote
2011-06-17 19:03:57 +12:00
parent e934baa6e9
commit d2df5722b5
13 changed files with 588 additions and 317 deletions

View File

@@ -241,6 +241,106 @@ Background@SERVER_LOBBY:
Y:0
Align:Center
Font:Bold
Container@TEMPLATE_LOCAL_SPECTATOR:
Id:TEMPLATE_LOCAL_SPECTATOR
X:5
Y:0
Width:475
Height:25
Visible:false
Children:
TextField@NAME:
Id:NAME
Text:Name
Width:150
Height:25
MaxLength:16
DropDownButton@COLOR:
Id:COLOR
Width:80
Height:25
X:160
Font:Regular
Children:
ColorBlock@COLORBLOCK:
Id:COLORBLOCK
X:5
Y:6
Width:PARENT_RIGHT-35
Height:PARENT_BOTTOM-12
Label@SPECTATOR:
Text:Spectator
Width:198
Height:25
X:240
Y:0
Align:Center
Font:Bold
Checkbox@STATUS:
Id:STATUS
X:448
Y:2
Width:20
Height:20
Container@TEMPLATE_REMOTE_SPECTATOR:
Id:TEMPLATE_REMOTE_SPECTATOR
X:5
Y:0
Width:475
Height:25
Visible:false
Children:
Label@NAME:
Id:NAME
Text:Name
Width:145
Height:25
X:5
Y:0-1
Button@KICK:
Id:KICK
Text:X
Width:25
Height:23
X:125
Y:2
Font:Bold
ColorBlock@COLOR:
Id:COLOR
X:165
Y:6
Width:45
Height:13
Label@SPECTATOR:
Text:Spectator
Width:198
Height:25
X:240
Y:0
Align:Center
Font:Bold
Checkbox@STATUS:
Id:STATUS
X:448
Y:2
Width:20
Height:20
Container@TEMPLATE_NEW_SPECTATOR:
Id:TEMPLATE_NEW_SPECTATOR
X:5
Y:0
Width:475
Height:25
Visible:false
Children:
Button@SPECTATE:
Id:SPECTATE
Text:Spectate
Font:Regular
Width:278
Height:25
X:160
Y:0
Container@LABEL_CONTAINER:
X:25
Y:40