From 55e9d9cdf5e2c15700be5565cb24d83b513b90b2 Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Fri, 7 Sep 2007 22:27:28 +0000 Subject: [PATCH] fixed smooth movement popping after reparenting --- direct/src/deadrec/smoothMover.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/direct/src/deadrec/smoothMover.cxx b/direct/src/deadrec/smoothMover.cxx index 7ec4aa46de..c8efbdc1ae 100644 --- a/direct/src/deadrec/smoothMover.cxx +++ b/direct/src/deadrec/smoothMover.cxx @@ -789,5 +789,16 @@ handle_wrt_reparent(NodePath &old_parent, NodePath &new_parent) { (*pi)._pos = np.get_pos(new_parent); (*pi)._hpr = np.get_hpr(new_parent); } + + np.set_pos_hpr(_sample._pos, _sample._hpr); + _sample._pos = np.get_pos(new_parent); + _sample._hpr = np.get_hpr(new_parent); + + np.set_pos_hpr(_smooth_pos, _smooth_hpr); + _smooth_pos = np.get_pos(new_parent); + _smooth_hpr = np.get_hpr(new_parent); + + compose_smooth_mat(); + np.detach_node(); }