diff --git a/lua/copmovement.lua b/lua/copmovement.lua index 5eca069..c09c44c 100644 --- a/lua/copmovement.lua +++ b/lua/copmovement.lua @@ -64,7 +64,8 @@ Hooks:PostHook(CopMovement, "action_request", "IDC_post_action_request_tweak_uni if #self._unit:contour()._contour_list >= 1 then for i=1, #self._unit:contour()._contour_list do - if self._unit:contour()._contour_list[i].type == "friendly" then + -- yet another sanity check + if self._unit:contour()._contour_list[i] and self._unit:contour()._contour_list[i].type and self._unit:contour()._contour_list[i].type == "friendly" then self._unit:contour():remove( "friendly" , true ) end end diff --git a/main.xml b/main.xml index 9993619..58a8c2f 100644 --- a/main.xml +++ b/main.xml @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/mod.txt b/mod.txt index 3791522..3178c0a 100644 --- a/mod.txt +++ b/mod.txt @@ -3,7 +3,7 @@ "description" : "Gives immportality and visual highlights to dominated enemies.", "author" : "irbizzelus\nBased on Undeadsewer's Intimidated Outlines", "contact" : "Steam profile link is on my modworkshop account\nUndeadsewer: undeadsewer@gmail.com", - "version" : "1.6", + "version" : "1.6.1", "hooks" : [ { "hook_id" : "lib/units/enemies/cop/copmovement", "script_path" : "lua/copmovement.lua" }, { "hook_id" : "lib/units/enemies/cop/copdamage", "script_path" : "lua/copdamage.lua" },