Removed GapUpdateInterval (no longer required)

This commit is contained in:
EvilFactory
2023-06-15 13:53:28 -03:00
parent da670e791c
commit fd74c08a8f
2 changed files with 5 additions and 10 deletions
@@ -155,8 +155,8 @@ namespace Barotrauma
public int GapUpdateInterval public int GapUpdateInterval
{ {
get { return MapEntity.GapUpdateInterval; } get { return 1; }
set { MapEntity.GapUpdateInterval = value; } set { }
} }
public int PoweredUpdateInterval public int PoweredUpdateInterval
@@ -533,7 +533,6 @@ namespace Barotrauma
public void Stop() public void Stop()
{ {
MapEntityUpdateInterval = 1; MapEntityUpdateInterval = 1;
GapUpdateInterval = 4;
CharacterUpdateInterval = 1; CharacterUpdateInterval = 1;
foreach (var cmd in luaAddedCommand) foreach (var cmd in luaAddedCommand)
@@ -20,7 +20,6 @@ namespace Barotrauma
public List<ushort> unresolvedLinkedToID; public List<ushort> unresolvedLinkedToID;
public static int MapEntityUpdateInterval = 1; public static int MapEntityUpdateInterval = 1;
public static int GapUpdateInterval = 1;
public static int PoweredUpdateInterval = 1; public static int PoweredUpdateInterval = 1;
private static int mapEntityUpdateTick; 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, //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 //which may lead to weird behavior like water draining down only through
//one gap in a room even if there are several //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, cam);
{
gap.Update(deltaTime * GapUpdateInterval, cam);
}
} }
if (mapEntityUpdateTick % PoweredUpdateInterval == 0) if (mapEntityUpdateTick % PoweredUpdateInterval == 0)
@@ -906,4 +902,4 @@ namespace Barotrauma
} }
} }
} }
} }