Spawnpoints for different jobs, spawning crew members with job-specific items, fixed issues with non-matching entity IDs between client and server, Unity-like coroutine system (connecting to server doesn't freeze the game anymore), map drawing improvements

This commit is contained in:
Regalis
2015-07-09 01:40:27 +03:00
parent d56f7f3f77
commit 2254585dac
35 changed files with 831 additions and 312 deletions
+13 -4
View File
@@ -117,17 +117,26 @@ namespace Subsurface
listBox.ClearChildren();
characters.Clear();
foreach (CharacterInfo ci in characterInfos)
WayPoint[] waypoints = WayPoint.SelectCrewSpawnPoints(characterInfos);
for (int i = 0; i < waypoints.Length; i++)
{
WayPoint randomWayPoint = WayPoint.GetRandom(SpawnType.Human);
Vector2 position = (randomWayPoint == null) ? Vector2.Zero : randomWayPoint.SimPosition;
Character character = new Character(ci.File, position, ci);
Character character = new Character(characterInfos[i], waypoints[i]);
Character.Controlled = character;
if (!character.Info.StartItemsGiven)
{
character.GiveJobItems();
character.Info.StartItemsGiven = true;
}
AddCharacter(character);
}
if (characters.Count>0) SelectCharacter(characters[0]);
if (characters.Count > 0) SelectCharacter(characters[0]);
}
public void EndShift()