From f94b7ddd69dfffc2e03eafefeee505956524967d Mon Sep 17 00:00:00 2001 From: Yimura Date: Sun, 17 Jan 2021 00:44:48 +0100 Subject: [PATCH] refactor(DeleteGun): Use function to delete ent instead of code --- BigBaseV2/src/features/looped/custom_guns/delete_gun.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/BigBaseV2/src/features/looped/custom_guns/delete_gun.cpp b/BigBaseV2/src/features/looped/custom_guns/delete_gun.cpp index 47f4756b..7785fdbf 100644 --- a/BigBaseV2/src/features/looped/custom_guns/delete_gun.cpp +++ b/BigBaseV2/src/features/looped/custom_guns/delete_gun.cpp @@ -45,10 +45,7 @@ namespace big { if (functions::take_control_of_entity(entity)) { - ENTITY::DETACH_ENTITY(entity, 1, 1); - ENTITY::SET_ENTITY_COORDS_NO_OFFSET(entity, 0, 0, 0, 0, 0, 0); - ENTITY::SET_ENTITY_AS_MISSION_ENTITY(entity, 0, 1); - ENTITY::DELETE_ENTITY(&entity); + functions::delete_entity(entity); } else notify::above_map("~r~Failed to take control of entity."); }