respawn shuttle not moving fix

This commit is contained in:
Evil Factory
2021-04-22 17:06:34 -03:00
parent 54b49209ed
commit 17336ed9a4
2 changed files with 18 additions and 2 deletions

View File

@@ -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();

View File

@@ -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<object> ForceShuttleToPos(Vector2 position, float speed)
{
#if SERVER
if (GameMain.Lua.game.overrideRespawnSub)
{
yield return CoroutineStatus.Success;
}
#endif
if (RespawnShuttle == null)
{
yield return CoroutineStatus.Success;