mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
fix NPCs OS_NPC_OBJECT_GROUP option. group ID needs to be set during creation, before scenepresence.CompleteMovement, set tittle just after it.
This commit is contained in:
@@ -2748,7 +2748,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
UUID x = module.CreateNPC(firstname,
|
||||
lastname,
|
||||
position,
|
||||
UUID.Random(),
|
||||
ownerID,
|
||||
groupTitle,
|
||||
groupID,
|
||||
senseAsAgent,
|
||||
World,
|
||||
appearance);
|
||||
@@ -2756,9 +2759,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
ScenePresence sp;
|
||||
if (World.TryGetScenePresence(x, out sp))
|
||||
{
|
||||
sp.Grouptitle = groupTitle;
|
||||
((INPC)(sp.ControllingClient)).ActiveGroupId = groupID;
|
||||
|
||||
sp.SendAvatarDataToAllAgents();
|
||||
}
|
||||
return new LSL_Key(x.ToString());
|
||||
|
||||
Reference in New Issue
Block a user