Fixed LobbyScreen item grouping & light.hullsInRange updating

This commit is contained in:
Regalis
2016-01-02 16:40:24 +02:00
parent 325bf0c66b
commit 8717a2259f
8 changed files with 46 additions and 28 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ namespace Barotrauma.Lights
foreach (LightSource light in lights)
{
if (light.hullsInRange.Count > 0 || light.Color.A < 0.01f || light.Range < 1.0f) continue;
if (!MathUtils.CircleIntersectsRectangle(light.Position, light.Range, viewRect)) continue;
if (!MathUtils.CircleIntersectsRectangle(light.WorldPosition, light.Range, viewRect)) continue;
light.Draw(spriteBatch);
}
+1 -1
View File
@@ -68,7 +68,7 @@ namespace Barotrauma.Lights
{
range = MathHelper.Clamp(value, 0.0f, 2048.0f);
if (Math.Abs(prevHullUpdateRange - range)>5.0f) return;
if (Math.Abs(prevHullUpdateRange - range)<5.0f) return;
UpdateHullsInRange();
prevHullUpdateRange = range;