reliable network messages aren't sent as frequently, equippable grenades/detonators

This commit is contained in:
Regalis
2015-08-01 13:48:20 +03:00
parent 85b0cda4ca
commit 01b1dfe0df
12 changed files with 90 additions and 32 deletions

View File

@@ -38,7 +38,12 @@ namespace Subsurface.Items.Components
get { return ToolBox.Vector4ToString(lightColor.ToVector4()); }
set
{
lightColor = new Color(ToolBox.ParseToVector4(value));
Vector4 newColor = ToolBox.ParseToVector4(value);
newColor.X = MathHelper.Clamp(newColor.X, 0.0f, 1.0f);
newColor.Y = MathHelper.Clamp(newColor.Y, 0.0f, 1.0f);
newColor.Z = MathHelper.Clamp(newColor.Z, 0.0f, 1.0f);
newColor.W = MathHelper.Clamp(newColor.W, 0.0f, 1.0f);
lightColor = new Color(newColor);
}
}