- Fixed shadows not being cast if the lightsource is outside the sub and the convexhull is not

- Option to change the texture of the "light sphere"
- Added "headlights" to the scooters
This commit is contained in:
Regalis
2016-05-03 00:27:48 +03:00
parent 26608d3f82
commit 03626c997b
9 changed files with 122 additions and 47 deletions
+6 -8
View File
@@ -229,17 +229,15 @@ namespace Barotrauma
ImpactTolerance = ToolBox.GetAttributeFloat(element, "impacttolerance", 0.0f);
string categoriesStr = ToolBox.GetAttributeString(element, "category", "Misc");
string[] categories = categoriesStr.Split(',');
MapEntityCategory category;
for (int i = 0; i < categories.Length; i++)
if (!Enum.TryParse(ToolBox.GetAttributeString(element, "category", "Misc"), true, out category))
{
MapEntityCategory category;
if (Enum.TryParse(ToolBox.GetAttributeString(element, "category", "Misc"), out category))
{
Category = i == 0 ? category : Category | category;
}
category = MapEntityCategory.Misc;
}
Category = category;
string spriteColorStr = ToolBox.GetAttributeString(element, "spritecolor", "1.0,1.0,1.0,1.0");
SpriteColor = new Color(ToolBox.ParseToVector4(spriteColorStr));