예제 #1
0
 public void Objects_OnNewAvatar1(Simulator simulator, Avatar avatar, ulong regionHandle)
 {
     try
     {
         Objects_OnNewPrimReal(simulator, avatar, regionHandle);
         if (avatar.LocalID == client.Self.LocalID)
         {
             SimObject AV = (SimObject)GetSimObject(avatar, simulator);
             if (AV is SimActor)
             {
                 TheSimAvatar = (SimAvatarClient)AV;
                 TheSimAvatar.SetClient(client);
             }
         }
     }
     catch (Exception e)
     {
         WriteLine(String.Format("err :{0}", e.StackTrace));
     }
 }
예제 #2
0
 //object Objects_OnNewAvatarLock = new object();
 public override void Objects_OnNewAvatar(object sender, AvatarUpdateEventArgs e)
 {
     Avatar avatar = e.Avatar;
     var simulator = e.Simulator;
     var regionHandle = e.Simulator.Handle;
     if (regionHandle==0)
     {
         return;
     }
     SimObject AV = GetSimObject(avatar, simulator);
     if (avatar.ID == client.Self.AgentID)
     {
         if (AV is SimActor)
         {
             TheSimAvatar = (SimAvatarClient)AV;
             TheSimAvatar.SetClient(client);
         }
     }
     AV.IsKilled = false;
     if (IsMaster(simulator))
     //lock (Objects_OnNewAvatarLock)
     {
         AV.ResetPrim(avatar, client, simulator);
     }
     Objects_OnNewAvatar1(simulator, avatar, regionHandle);
 }