Giving crew members an ID card with clearances based on spawnpoint, level collision bugfixes, level exit/enter "shafts", moar entity ID bugfixes

This commit is contained in:
Regalis
2015-07-09 20:33:53 +03:00
parent 2254585dac
commit 257835e609
25 changed files with 279 additions and 204 deletions
+3 -3
View File
@@ -121,15 +121,15 @@ namespace Subsurface
for (int i = 0; i < waypoints.Length; i++)
{
WayPoint randomWayPoint = WayPoint.GetRandom(SpawnType.Human);
Vector2 position = (randomWayPoint == null) ? Vector2.Zero : randomWayPoint.SimPosition;
//WayPoint randomWayPoint = WayPoint.GetRandom(SpawnType.Human);
//Vector2 position = (randomWayPoint == null) ? Vector2.Zero : randomWayPoint.SimPosition;
Character character = new Character(characterInfos[i], waypoints[i]);
Character.Controlled = character;
if (!character.Info.StartItemsGiven)
{
character.GiveJobItems();
character.GiveJobItems(waypoints[i]);
character.Info.StartItemsGiven = true;
}
+2 -3
View File
@@ -120,7 +120,7 @@ namespace Subsurface
public void StartShift(TimeSpan duration, Level level)
{
//if (crewManager.characterInfos.Count == 0) return;
Lights.LightManager.FowEnabled = (Game1.Server==null);
this.level = level;
@@ -131,10 +131,9 @@ namespace Subsurface
if (level != null)
{
level.Generate(submarine == null ? 100.0f : Math.Max(Submarine.Borders.Width, Submarine.Borders.Height));
submarine.SetPosition(level.StartPosition);
submarine.SetPosition(level.StartPosition - new Vector2(0.0f, 2000.0f));
}
//crewManager.StartShift();
taskManager.StartShift(level);
}