diff --git a/src/java/com/threerings/parlor/data/Table.java b/src/java/com/threerings/parlor/data/Table.java index 09c746880..e75fd1a45 100644 --- a/src/java/com/threerings/parlor/data/Table.java +++ b/src/java/com/threerings/parlor/data/Table.java @@ -203,8 +203,7 @@ public class Table { for (int i = 0; i < occupants.length; i++) { if (username.equals(occupants[i])) { - occupants[i] = null; - bodyOids[i] = 0; + clearOccupantPos(i); return true; } } @@ -223,14 +222,23 @@ public class Table { for (int i = 0; i < bodyOids.length; i++) { if (bodyOid == bodyOids[i]) { - occupants[i] = null; - bodyOids[i] = 0; + clearOccupantPos(i); return true; } } return false; } + /** + * Internal method used for clearing an occupant once we've located + * the right position. + */ + protected void clearOccupantPos (int position) + { + occupants[position] = null; + bodyOids[position] = 0; + } + /** * Returns true if this table has a sufficient number of occupants * that the game can be started.