This commit is contained in:
Regalis
2016-02-20 21:52:05 +02:00
parent 619390ab72
commit 308ae7a8b0
19 changed files with 109 additions and 78 deletions
+7 -2
View File
@@ -57,7 +57,8 @@ namespace Barotrauma
float[] leftDelta;
float[] rightDelta;
float lastSentVolume;
private float lastSentVolume;
private float lastNetworkUpdate;
public List<Gap> ConnectedGaps;
@@ -705,7 +706,7 @@ namespace Barotrauma
message.WriteRangedSingle(MathHelper.Clamp(volume/FullVolume, 0.0f, 1.5f), 0.0f, 1.5f, 6);
message.Write((byte)fireSources.Count, 4);
for (int i = 0; i < Math.Min(fireSources.Count, 16) ;i++ )
for (int i = 0; i < Math.Min(fireSources.Count, 16); i++)
{
var fireSource = fireSources[i];
@@ -725,6 +726,8 @@ namespace Barotrauma
{
data = null;
if (sendingTime < lastNetworkUpdate) return;
float newVolume = this.volume;
try
@@ -785,6 +788,8 @@ namespace Barotrauma
toBeRemoved[i].Remove(true);
}
fireSources = newFireSources;
lastNetworkUpdate = sendingTime;
}
+2
View File
@@ -711,6 +711,8 @@ namespace Barotrauma
}
Vector2 center = (topLeft + bottomRight) / 2.0f;
center.X -= center.X % GridSize.X;
center.Y -= center.Y % GridSize.Y;
foreach (Item item in Item.ItemList)
{