Fixed LobbyScreen item grouping & light.hullsInRange updating
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user