From 18beea94e247e4043ccc53572c0a25f3bc24bbd3 Mon Sep 17 00:00:00 2001 From: Daniele Bartolini Date: Mon, 23 Dec 2024 16:52:10 +0100 Subject: [PATCH] tools: destroy unit's children too Part-of: #215 --- samples/core/editors/sound.lua | 2 +- samples/core/editors/unit.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/core/editors/sound.lua b/samples/core/editors/sound.lua index 977632066..1d5173319 100644 --- a/samples/core/editors/sound.lua +++ b/samples/core/editors/sound.lua @@ -26,7 +26,7 @@ function SoundObject:unit_id() end function SoundObject:destroy() - World.destroy_unit(self._world, self._unit_id) + UnitUtils.destroy_tree(self._world, self._unit_id) end function SoundObject:name() diff --git a/samples/core/editors/unit.lua b/samples/core/editors/unit.lua index cd69be154..0c126910a 100644 --- a/samples/core/editors/unit.lua +++ b/samples/core/editors/unit.lua @@ -71,7 +71,7 @@ function UnitBox:unit_id() end function UnitBox:destroy() - World.destroy_unit(self._world, self._unit_id) + UnitUtils.destroy_tree(self._world, self._unit_id) end function UnitBox:local_position()