From 41ac9edb3d8fb4c9aed0c2a50d1101fb3e20c276 Mon Sep 17 00:00:00 2001 From: Oarcinae Date: Sun, 16 Feb 2020 15:28:22 -0500 Subject: [PATCH] Taking names and fixing bugs. --- lib/oarc_enemies.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/oarc_enemies.lua b/lib/oarc_enemies.lua index a27b547..43b6038 100644 --- a/lib/oarc_enemies.lua +++ b/lib/oarc_enemies.lua @@ -78,7 +78,7 @@ function OarcModifyEnemyGroup(group) -- Target could also be a player character (more rare) if (target_player == nil) and (target_entity.type == "character") then - target_player = target_entity.associated_player + target_player = target_entity.player end -- I don't think this should happen... @@ -111,6 +111,7 @@ function OarcModifyEnemyGroup(group) if (global.buddyPairs[target_player.name] ~= nil) then SendBroadcastMsg("Enemy group released: " .. GetGPStext(group.members[1].position) .. " Target: " .. GetGPStext(target_entity.position) .. " " .. target_player.name) log("OarcModifyEnemyGroup RELEASING enemy group since someone in the BUDDY PAIR is ONLINE") + return end -- Otherwise, we delete the group.