mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Attachments module only registers when enabled. This enables alternative attachments module implementations. All calls to Scene.AttachmentsModule are checking for null. Ideally, if we support disabling attachments then we need a null attachments module to register with the scene.
This commit is contained in:
@@ -116,7 +116,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
return false;
|
||||
|
||||
// Delete existing npc attachments
|
||||
scene.AttachmentsModule.DeleteAttachmentsFromScene(npc, false);
|
||||
if(scene.AttachmentsModule != null)
|
||||
scene.AttachmentsModule.DeleteAttachmentsFromScene(npc, false);
|
||||
|
||||
// XXX: We can't just use IAvatarFactoryModule.SetAppearance() yet
|
||||
// since it doesn't transfer attachments
|
||||
@@ -125,7 +126,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
npc.Appearance = npcAppearance;
|
||||
|
||||
// Rez needed npc attachments
|
||||
scene.AttachmentsModule.RezAttachments(npc);
|
||||
if (scene.AttachmentsModule != null)
|
||||
scene.AttachmentsModule.RezAttachments(npc);
|
||||
|
||||
IAvatarFactoryModule module =
|
||||
scene.RequestModuleInterface<IAvatarFactoryModule>();
|
||||
|
||||
Reference in New Issue
Block a user