Fix the recycle of RMV.

This commit is contained in:
2023-04-19 13:56:13 +08:00
parent 2b3898655f
commit 56fd0936bb

View File

@@ -14,6 +14,10 @@ namespace Cryville.Crtr.Event {
protected override RealtimeMotionValue Construct() {
return new RealtimeMotionValue().Init(_reg.InitValue);
}
protected override void Reset(RealtimeMotionValue obj) {
base.Reset(obj);
obj.ReturnAllRelativeNodes();
}
}
readonly IntKeyedDictionary<ObjectPool<RealtimeMotionValue>> m_buckets;
protected override IReadOnlyDictionary<int, ObjectPool<RealtimeMotionValue>> Buckets { get { return m_buckets; } }