From 8886409d56d7f190b8e9ffbc662d3444d0261d74 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Wed, 7 Jun 2017 21:14:38 +0300 Subject: [PATCH] Respawning characters get ID card tags for both the shuttle and the main sub --- Barotrauma/Source/Networking/RespawnManager.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Barotrauma/Source/Networking/RespawnManager.cs b/Barotrauma/Source/Networking/RespawnManager.cs index 8758fa84c..400953b97 100644 --- a/Barotrauma/Source/Networking/RespawnManager.cs +++ b/Barotrauma/Source/Networking/RespawnManager.cs @@ -469,7 +469,19 @@ namespace Barotrauma.Networking scooter.Combine(battery); } + //give the character the items they would've gotten if they had spawned in the main sub character.GiveJobItems(mainSubSpawnPoints[i]); + + //add the ID card tags they should've gotten when spawning in the shuttle + foreach (Item item in character.Inventory.Items) + { + if (item == null || item.Prefab.Name != "ID Card") continue; + foreach (string s in shuttleSpawnPoints[i].IdCardTags) + { + item.AddTag(s); + } + } + GameMain.GameSession.CrewManager.characters.Add(character); }