From 74a0bb38374b28d053341dd1dc91db0278256f9d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 24 Oct 2021 21:06:42 +0100 Subject: [PATCH] simplify combatmodule npc kill check --- OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | 6 ++++-- .../Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 10bc6aa188..956b73a150 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -117,9 +117,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule // string killingAvatarMessage; // check to see if it is an NPC and just remove it - INPCModule NPCmodule = deadAvatar.Scene.RequestModuleInterface(); - if (NPCmodule != null && NPCmodule.DeleteNPC(deadAvatar.UUID, deadAvatar.Scene)) + if(deadAvatar.IsNPC) { + INPCModule NPCmodule = deadAvatar.Scene.RequestModuleInterface(); + if (NPCmodule != null) + NPCmodule.DeleteNPC(deadAvatar.UUID, deadAvatar.Scene); return; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 8034544e83..5efd698f03 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -501,8 +501,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces /// boolean LSL_Integer osRegexIsMatch(string input, string pattern); - LSL_String osRequestURL(LSL_List options); - LSL_String osRequestSecureURL(LSL_List options); + LSL_Key osRequestURL(LSL_List options); + LSL_Key osRequestSecureURL(LSL_List options); void osCollisionSound(string impact_sound, double impact_volume); void osVolumeDetect(int detect);