fixed railgun, fixed repairtools radar ping & improved rendering, waypoint bugfixes, inventory bugfixes, syncing wires between clients

This commit is contained in:
Regalis
2015-07-15 23:34:13 +03:00
parent 44b9a63c94
commit 237df18765
39 changed files with 461 additions and 405 deletions
+2 -2
View File
@@ -116,7 +116,7 @@ namespace Subsurface
if (startNode == null || endNode == null)
{
DebugConsole.ThrowError("Pathfinding error, couldn't find pathnodes");
return null;
return new SteeringPath();
}
return FindPath(startNode,endNode);
@@ -141,7 +141,7 @@ namespace Subsurface
if (startNode==null || endNode==null)
{
DebugConsole.ThrowError("Pathfinding error, couldn't find matching pathnodes to waypoints");
return null;
return new SteeringPath();;
}
}
+6 -3
View File
@@ -86,9 +86,12 @@ namespace Subsurface
foreach (XElement subElement in element.Elements())
{
if (subElement.Name.ToString().ToLower() != "skill") continue;
string skillName = ToolBox.GetAttributeString(subElement, "name", "");
if (string.IsNullOrEmpty(name)) continue;
skills.Add(
subElement.Name.ToString(),
new Skill(subElement.Name.ToString(), ToolBox.GetAttributeInt(subElement, "level", 0)));
skillName,
new Skill(skillName, ToolBox.GetAttributeInt(subElement, "level", 0)));
}
}
@@ -115,7 +118,7 @@ namespace Subsurface
foreach (KeyValuePair<string, Skill> skill in skills)
{
jobElement.Add(new XElement(skill.Key, new XAttribute("level", skill.Value.Level)));
jobElement.Add(new XElement("skill", new XAttribute("name", skill.Value.Name), new XAttribute("level", skill.Value.Level)));
}
parentElement.Add(jobElement);
+1 -1
View File
@@ -609,7 +609,7 @@ namespace Subsurface
float dist = Vector2.Distance(limbPos, gapPos);
force += Vector2.Normalize(gap.FlowForce)*(Math.Max(gap.FlowForce.Length() - dist, 0.0f)/500.0f);
force += Vector2.Normalize(gap.FlowForce)*(Math.Max(gap.FlowForce.Length() - dist, 0.0f)/1000.0f);
}
if (force.Length() > 20.0f) return force;