Optimization: FindHull spatial hashing, itemcomponent sounds in a dictionary, got rid of Item.Updated, rendering fixes, disposing shadow vertex buffers

This commit is contained in:
Regalis11
2015-12-21 11:01:35 +02:00
parent a62c6d6711
commit 2ff8643c02
16 changed files with 354 additions and 136 deletions
+4 -3
View File
@@ -63,10 +63,11 @@ namespace Barotrauma.Lights
get { return range; }
set
{
float newRange = MathHelper.Clamp(value, 0.0f, 2048.0f);
if (range == newRange) return;
range = newRange;
float prevRange = range;
range = MathHelper.Clamp(value, 0.0f, 2048.0f);
if (Math.Abs(prevRange - range)<5.0f) return;
UpdateHullsInRange();
}
}