fixed DeleteBodyCommand
it caused panic on revert
@@ -427,12 +427,14 @@ impl Command for DeleteBodyCommand {
.physics
.bodies
.put_back(self.ticket.take().unwrap(), self.body.take().unwrap());
+ if self.node.is_some() {
context
.editor_scene
.physics
.binder
.insert(self.node, self.handle);
}
+ }
fn finalize(&mut self, context: &mut SceneContext) {
if let Some(ticket) = self.ticket.take() {
