Fix logic of lerping a missing relative motion node.
This commit is contained in:
@@ -171,22 +171,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
|
||||
public MotionNode GetRelativeNode(short id) {
|
||||
int i = RelativeNodes.FindIndex(n => n.Id == id);
|
||||
if (i == -1) {
|
||||
var r = GetRelativeNode((ushort)(id - 1));
|
||||
r.Time = null;
|
||||
r.Id = id;
|
||||
return r;
|
||||
}
|
||||
return RelativeNodes[i];
|
||||
}
|
||||
|
||||
public MotionNode QueryRelativeNode(short id) {
|
||||
int i = RelativeNodes.FindIndex(n => n.Id == id);
|
||||
MotionNode cnode;
|
||||
if (i == -1) cnode = new MotionNode { Id = id };
|
||||
else cnode = RelativeNodes[i];
|
||||
return cnode;
|
||||
return RelativeNodes.Find(n => n.Id == id);
|
||||
}
|
||||
|
||||
public void SetRelativeNode(MotionNode node) {
|
||||
|
Reference in New Issue
Block a user