(a405d1aed) Check volume validity in SoundPlayer.UpdateWaterAmbience (there was a report on GameAnalytics about the method setting the gain to an invalid value) + Merge fix

This commit is contained in:
Joonas Rikkonen
2019-04-15 13:44:05 +03:00
parent 53f9202909
commit b8b61ebb02
7 changed files with 9 additions and 510 deletions
@@ -906,30 +906,7 @@ namespace Barotrauma
{
if (GameMain.Client != null)
{
foreach (var mapEntity in MapEntity.SelectedList)
{
if (mapEntity is Item item)
{
item.Rect = new Rectangle(item.Rect.X, item.Rect.Y,
(int)(item.Prefab.sprite.size.X * item.Prefab.Scale),
(int)(item.Prefab.sprite.size.Y * item.Prefab.Scale));
}
else if (mapEntity is Structure structure)
{
if (!structure.ResizeHorizontal)
{
structure.Rect = new Rectangle(structure.Rect.X, structure.Rect.Y,
(int)structure.Prefab.ScaledSize.X,
structure.Rect.Height);
}
if (!structure.ResizeVertical)
{
structure.Rect = new Rectangle(structure.Rect.X, structure.Rect.Y,
structure.Rect.Width,
(int)structure.Prefab.ScaledSize.Y);
}
}
}
GameMain.Client.SendChatMessage(ToolBox.RandomSeed(msgLength));
}
}
}));