diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Lua/LuaClasses/LuaGame.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Lua/LuaClasses/LuaGame.cs index 737ac8dec..f9bce98ab 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Lua/LuaClasses/LuaGame.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Lua/LuaClasses/LuaGame.cs @@ -155,8 +155,8 @@ namespace Barotrauma public int GapUpdateInterval { - get { return MapEntity.GapUpdateInterval; } - set { MapEntity.GapUpdateInterval = value; } + get { return 1; } + set { } } public int PoweredUpdateInterval @@ -533,7 +533,6 @@ namespace Barotrauma public void Stop() { MapEntityUpdateInterval = 1; - GapUpdateInterval = 4; CharacterUpdateInterval = 1; foreach (var cmd in luaAddedCommand) diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/MapEntity.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/MapEntity.cs index 423bbec6e..b37045b0b 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Map/MapEntity.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Map/MapEntity.cs @@ -20,7 +20,6 @@ namespace Barotrauma public List unresolvedLinkedToID; public static int MapEntityUpdateInterval = 1; - public static int GapUpdateInterval = 1; public static int PoweredUpdateInterval = 1; private static int mapEntityUpdateTick; @@ -638,12 +637,9 @@ namespace Barotrauma //the water/air will always tend to flow through the first gap in the list, //which may lead to weird behavior like water draining down only through //one gap in a room even if there are several - if (mapEntityUpdateTick % GapUpdateInterval == 0) + foreach (Gap gap in Gap.GapList.OrderBy(g => Rand.Int(int.MaxValue))) { - foreach (Gap gap in Gap.GapList.OrderBy(g => Rand.Int(int.MaxValue))) - { - gap.Update(deltaTime * GapUpdateInterval, cam); - } + gap.Update(deltaTime, cam); } if (mapEntityUpdateTick % PoweredUpdateInterval == 0) @@ -906,4 +902,4 @@ namespace Barotrauma } } } -} \ No newline at end of file +}