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

View File

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

View File

@@ -20,7 +20,6 @@ namespace Barotrauma
public List<ushort> 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
}
}
}
}
}