Did away with PartyGameConfig, added getGameType() to GameConfig.
Changed the names of the 3 standard game types, but I could be convinced
of better names:
SEATED_GAME: normal match-made game, a game with a set list of players that
does not change.
SEATED_CONTINUOUS: the game starts immediately, but people join the room
and then choose a place to sit to become a player.
PARTY: no seats, anyone that enters is a player.
Also, changed SEATED_CONTINUOUS to create an occupants array and auto-sit
the creator, since I'm pretty sure we'll want to show seating in the lobby
for those types of games (but it actually does neither right now, code
needs to be written either way, depending on UI decisions.)
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@182 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -128,8 +128,7 @@ public class TableManager
|
||||
}
|
||||
table.init(_plobj.getOid(), tableConfig, config);
|
||||
|
||||
boolean isParty = table.isPartyGame();
|
||||
if (!isParty) {
|
||||
if (table.bodyOids != null && table.bodyOids.length > 0) {
|
||||
// stick the creator into the first non-AI position
|
||||
int cpos = (config.ais == null) ? 0 : config.ais.length;
|
||||
String error = table.setOccupant(cpos, creator);
|
||||
@@ -350,7 +349,7 @@ public class TableManager
|
||||
// configure the privacy of the game
|
||||
gameobj.setIsPrivate(table.tconfig.privateTable);
|
||||
|
||||
if (!table.isPartyGame()) {
|
||||
if (table.bodyOids != null) {
|
||||
// clear the occupant to table mappings as this game is underway
|
||||
for (int i = 0; i < table.bodyOids.length; i++) {
|
||||
_boidMap.remove(table.bodyOids[i]);
|
||||
@@ -399,6 +398,9 @@ public class TableManager
|
||||
// TODO: this will become more complicated
|
||||
// As we separate watchers and players
|
||||
|
||||
// TODO: for SEATED_CONTINUOUS, we will probably be showing the
|
||||
// folks in the game...
|
||||
|
||||
// finally, update the table
|
||||
_tlobj.updateTables(table);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user