From 17336ed9a49cf2b41242a58ee9deb012083bdd00 Mon Sep 17 00:00:00 2001 From: Evil Factory <36804725+evilfactory@users.noreply.github.com> Date: Thu, 22 Apr 2021 17:06:34 -0300 Subject: [PATCH] respawn shuttle not moving fix --- .../ServerSource/Networking/RespawnManager.cs | 5 ++++- .../SharedSource/Networking/RespawnManager.cs | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Barotrauma/BarotraumaServer/ServerSource/Networking/RespawnManager.cs b/Barotrauma/BarotraumaServer/ServerSource/Networking/RespawnManager.cs index 7340487ea..7647ecc1a 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/Networking/RespawnManager.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/Networking/RespawnManager.cs @@ -96,7 +96,10 @@ namespace Barotrauma.Networking { if (RespawnShuttle != null) { - RespawnShuttle.Velocity = Vector2.Zero; + if (!GameMain.Lua.game.overrideRespawnSub) + { + RespawnShuttle.Velocity = Vector2.Zero; + } } int clientsToRespawn = GetClientsToRespawn().Count(); diff --git a/Barotrauma/BarotraumaShared/SharedSource/Networking/RespawnManager.cs b/Barotrauma/BarotraumaShared/SharedSource/Networking/RespawnManager.cs index c5be46c81..eb8291ce2 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Networking/RespawnManager.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Networking/RespawnManager.cs @@ -113,7 +113,12 @@ namespace Barotrauma.Networking { foreach (Wire wire in connection.Wires) { - if (wire != null) wire.Locked = true; +#if SERVER + if (GameMain.Lua.game.overrideRespawnSub) + { + if (wire != null) wire.Locked = true; + } +#endif } } } @@ -199,6 +204,14 @@ namespace Barotrauma.Networking private IEnumerable ForceShuttleToPos(Vector2 position, float speed) { + +#if SERVER + if (GameMain.Lua.game.overrideRespawnSub) + { + yield return CoroutineStatus.Success; + } +#endif + if (RespawnShuttle == null) { yield return CoroutineStatus.Success;