diff --git a/Subsurface/Barotrauma.csproj b/Subsurface/Barotrauma.csproj index e3a848d2e..633791f28 100644 --- a/Subsurface/Barotrauma.csproj +++ b/Subsurface/Barotrauma.csproj @@ -148,6 +148,7 @@ + @@ -991,6 +992,9 @@ PreserveNewest + + PreserveNewest + diff --git a/Subsurface/Content/Jobs.xml b/Subsurface/Content/Jobs.xml index 4e9bd5773..15abeb486 100644 --- a/Subsurface/Content/Jobs.xml +++ b/Subsurface/Content/Jobs.xml @@ -79,7 +79,7 @@ - + diff --git a/Subsurface/Source/Items/CharacterInventory.cs b/Subsurface/Source/Items/CharacterInventory.cs index 717b28ea8..5bdbe1da2 100644 --- a/Subsurface/Source/Items/CharacterInventory.cs +++ b/Subsurface/Source/Items/CharacterInventory.cs @@ -82,7 +82,7 @@ namespace Barotrauma default: SlotPositions[i] = new Vector2( spacing * 2 + rectWidth + (spacing + rectWidth) * ((i - 6)%5), - GameMain.GraphicsHeight - (spacing + rectHeight) * ((i>10) ? 1 : 2)); + GameMain.GraphicsHeight - (spacing + rectHeight) * ((i>10) ? 2 : 1)); break; } } diff --git a/Subsurface/Source/Map/Lights/LightManager.cs b/Subsurface/Source/Map/Lights/LightManager.cs index 69b0d530f..25d86b263 100644 --- a/Subsurface/Source/Map/Lights/LightManager.cs +++ b/Subsurface/Source/Map/Lights/LightManager.cs @@ -132,10 +132,17 @@ namespace Barotrauma.Lights light.Draw(spriteBatch); } - if (Character.Controlled != null && Character.Controlled.ClosestItem != null) + if (Character.Controlled != null) { - Character.Controlled.ClosestItem.Draw(spriteBatch, false, true); - Character.Controlled.ClosestItem.IsHighlighted = true; + if (Character.Controlled.ClosestItem != null) + { + Character.Controlled.ClosestItem.Draw(spriteBatch, false, true); + Character.Controlled.ClosestItem.IsHighlighted = true; + } + else if (Character.Controlled.ClosestCharacter != null) + { + Character.Controlled.ClosestCharacter.Draw(spriteBatch); + } } spriteBatch.End(); diff --git a/Subsurface/Source/Networking/RespawnManager.cs b/Subsurface/Source/Networking/RespawnManager.cs index f09b89408..df89056fb 100644 --- a/Subsurface/Source/Networking/RespawnManager.cs +++ b/Subsurface/Source/Networking/RespawnManager.cs @@ -398,7 +398,11 @@ namespace Barotrauma.Networking List characterInfos = clients.Select(c => c.characterInfo).ToList(); if (server.Character != null && server.Character.IsDead) characterInfos.Add(server.CharacterInfo); - var waypoints = WayPoint.SelectCrewSpawnPoints(characterInfos, respawnShuttle); + //the spawnpoints where the characters will spawn + var shuttleSpawnPoints = WayPoint.SelectCrewSpawnPoints(characterInfos, respawnShuttle); + //the spawnpoints where they would spawn if they were spawned inside the main sub + //(in order to give them appropriate ID card tags) + var mainSubSpawnPoints = WayPoint.SelectCrewSpawnPoints(characterInfos, Submarine.MainSub); ItemPrefab divingSuitPrefab = ItemPrefab.list.Find(ip => ip.Name == "Diving Suit") as ItemPrefab; ItemPrefab oxyPrefab = ItemPrefab.list.Find(ip => ip.Name == "Oxygen Tank") as ItemPrefab; @@ -411,7 +415,7 @@ namespace Barotrauma.Networking { bool myCharacter = i >= clients.Count; - var character = Character.Create(characterInfos[i], waypoints[i].WorldPosition, !myCharacter, false); + var character = Character.Create(characterInfos[i], shuttleSpawnPoints[i].WorldPosition, !myCharacter, false); if (myCharacter) { @@ -426,11 +430,10 @@ namespace Barotrauma.Networking spawnedCharacters.Add(character); - Vector2 pos = cargoSp == null ? character.Position : cargoSp.Position; + Vector2 pos = cargoSp == null ? character.Position : cargoSp.Position; if (divingSuitPrefab != null && oxyPrefab != null) { - var divingSuit = new Item(divingSuitPrefab, pos, respawnShuttle); var oxyTank = new Item(oxyPrefab, pos, respawnShuttle); @@ -452,8 +455,8 @@ namespace Barotrauma.Networking } spawnedItems.ForEach(s => Item.Spawner.AddToSpawnedList(s)); - - character.GiveJobItems(waypoints[i]); + + character.GiveJobItems(mainSubSpawnPoints[i]); GameMain.GameSession.CrewManager.characters.Add(character); } diff --git a/Subsurface/wrap_oal.dll b/Subsurface/wrap_oal.dll new file mode 100644 index 000000000..2713dae65 Binary files /dev/null and b/Subsurface/wrap_oal.dll differ