Unify absolute value and relative node of motion event.
This commit is contained in:
@@ -170,7 +170,7 @@ namespace Cryville.Crtr {
|
||||
dest.RelativeNodes.RemoveRange(tcount, dcount - tcount);
|
||||
}
|
||||
|
||||
public MotionNode GetRelativeNode(ushort id) {
|
||||
public MotionNode GetRelativeNode(short id) {
|
||||
int i = RelativeNodes.FindIndex(n => n.Id == id);
|
||||
if (i == -1) {
|
||||
var r = GetRelativeNode((ushort)(id - 1));
|
||||
@@ -181,7 +181,7 @@ namespace Cryville.Crtr {
|
||||
return RelativeNodes[i];
|
||||
}
|
||||
|
||||
public MotionNode QueryRelativeNode(ushort id) {
|
||||
public MotionNode QueryRelativeNode(short id) {
|
||||
int i = RelativeNodes.FindIndex(n => n.Id == id);
|
||||
MotionNode cnode;
|
||||
if (i == -1) cnode = new MotionNode { Id = id };
|
||||
@@ -256,7 +256,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
|
||||
public class MotionNode : IComparable<MotionNode> {
|
||||
public ushort Id;
|
||||
public short Id = -1;
|
||||
public Vec1 Time;
|
||||
float CmpTime { get { return Time != null ? Time.Value : 0; } }
|
||||
[Obsolete]
|
||||
|
Reference in New Issue
Block a user