public void EnterMap(ExplorerTeam activeTeam, LocRay8 entryPoint) { ActiveTeam = activeTeam; //place characters around in order ActiveTeam.Leader.CharLoc = entryPoint.Loc; if (entryPoint.Dir != Dir8.None) { ActiveTeam.Leader.CharDir = entryPoint.Dir; } foreach (Character character in ActiveTeam.Players) { //TODO: there may be a problem here; the method for finding a free space searches through all characters already in the map //since the active team has already been added to the map, all characters are counted and can block themselves when reassigning locations //warp all active team allies next to the player of this floor Loc?endLoc = GetClosestTileForChar(character, entryPoint.Loc); if (endLoc == null) { endLoc = entryPoint.Loc; } character.CharLoc = endLoc.Value; if (entryPoint.Dir != Dir8.None) { character.CharDir = entryPoint.Dir; } if (!character.Dead) { UpdateExploration(character); } } }