mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
simplify combatmodule npc kill check
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user