From a629979d8bfd0b5bf90b814079bfb36c7470c222 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 10 Sep 2015 23:59:13 -0400 Subject: [PATCH] fix tpt.reset_spark to also reset WIFI --- src/lua/LegacyLuaAPI.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/lua/LegacyLuaAPI.cpp b/src/lua/LegacyLuaAPI.cpp index 9d4531df7..4212475a7 100644 --- a/src/lua/LegacyLuaAPI.cpp +++ b/src/lua/LegacyLuaAPI.cpp @@ -1037,20 +1037,7 @@ int luatpt_reset_velocity(lua_State* l) int luatpt_reset_spark(lua_State* l) { - int i; - for (i=0; iparts[i].type == PT_SPRK) - { - if (luacon_sim->parts[i].ctype > 0 && luacon_sim->parts[i].ctype < PT_NUM && luacon_sim->elements[luacon_sim->parts[i].ctype].Enabled) - { - luacon_sim->parts[i].type = luacon_sim->parts[i].ctype; - luacon_sim->parts[i].life = luacon_sim->parts[i].ctype = 0; - } - else - luacon_sim->kill_part(i); - } - } + luacon_controller->ResetSpark(); return 0; }