* Fixing an issue with NPC's and Circuit Codes.

arthursv
Adam Frisby 2009-08-21 13:12:51 +10:00
parent 7ef3e5f41c
commit bce98f9670
1 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom)
{ {
NPCAvatar npcAvatar = new NPCAvatar(firstname, lastname, position, scene); NPCAvatar npcAvatar = new NPCAvatar(firstname, lastname, position, scene);
npcAvatar.CircuitCode = (uint) Util.RandomClass.Next(0, int.MaxValue);
scene.ClientManager.Add(npcAvatar.CircuitCode, npcAvatar);
scene.AddNewClient(npcAvatar); scene.AddNewClient(npcAvatar);
ScenePresence sp; ScenePresence sp;