simplify combatmodule npc kill check

This commit is contained in:
UbitUmarov
2021-10-24 21:06:42 +01:00
parent 3db0bf7996
commit 74a0bb3837
2 changed files with 6 additions and 4 deletions

View File

@@ -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<INPCModule>();
if (NPCmodule != null && NPCmodule.DeleteNPC(deadAvatar.UUID, deadAvatar.Scene))
if(deadAvatar.IsNPC)
{
INPCModule NPCmodule = deadAvatar.Scene.RequestModuleInterface<INPCModule>();
if (NPCmodule != null)
NPCmodule.DeleteNPC(deadAvatar.UUID, deadAvatar.Scene);
return;
}

View File

@@ -501,8 +501,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
/// <returns>boolean</returns>
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);