void Objects_AvatarUpdate(object sender, AvatarUpdateEventArgs e) { if (e.Avatar.LocalID == Self.LocalID) { SetDefaultCamera(); } }
void Objects_AvatarUpdate(object sender, AvatarUpdateEventArgs e) { // Check if we already know about this avatar. If not, add it and announce the callback. // Otherwise just update the cache with the new information (e.g. changed position) if (!this.nearbyAvatars.ContainsKey(e.Avatar.LocalID)) { lock(this.nearbyAvatars) this.nearbyAvatars.Add(e.Avatar.LocalID, e.Avatar); //@todo trigger avatar added event } else { lock(this.nearbyAvatars) this.nearbyAvatars[e.Avatar.LocalID] = e.Avatar; } }
void Objects_OnNewAvatar(object sender, AvatarUpdateEventArgs e) { Avatar avatar = e.Avatar; if (enabled) { // Search this avatar for textures for (int i = 0; i < avatar.Textures.FaceTextures.Length; i++) { Primitive.TextureEntryFace face = avatar.Textures.FaceTextures[i]; if (face != null) { if (!alreadyRequested.ContainsKey(face.TextureID)) { alreadyRequested[face.TextureID] = face.TextureID; // Determine if this is a baked outfit texture or a normal texture ImageType type = ImageType.Normal; AvatarTextureIndex index = (AvatarTextureIndex)i; switch (index) { case AvatarTextureIndex.EyesBaked: case AvatarTextureIndex.HeadBaked: case AvatarTextureIndex.LowerBaked: case AvatarTextureIndex.SkirtBaked: case AvatarTextureIndex.UpperBaked: type = ImageType.Baked; break; } Client.Assets.RequestImage(face.TextureID, type, Assets_OnImageReceived); } } } } }
///<summary>Raises the AvatarUpdate Event</summary> /// <param name="e">A AvatarUpdateEventArgs object containing /// the data sent from the simulator</param> protected virtual void OnAvatarUpdate(AvatarUpdateEventArgs e) { EventHandler<AvatarUpdateEventArgs> handler = m_AvatarUpdate; if (handler != null) handler(this, e); }
void Objects_AvatarUpdate(object sender, AvatarUpdateEventArgs e) { if (e.Simulator.Handle != Client.Network.CurrentSim.Handle) return; AddAvatarToScene(e.Avatar); }
//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); }
void Objects_OnNewAvatar(object sender, AvatarUpdateEventArgs e) { UpdateAvatar(e.Avatar); }
public void OnAvatarUpdate(object sender, AvatarUpdateEventArgs e) { /* * NOP * Avatar avatar = e.Avatar; if ((avatar != null) && (avatar.Name == CONDUCTOR)) m_ir.UpdateState(m_GridClient.Self.RelativePosition, avatar.Position); */ Avatar avatar = e.Avatar; if (avatar != null) { m_avatarTable[avatar.Name] = avatar.Position; Console.WriteLine("OnAvatarUpdated: " + avatar.Name); } }
public virtual void Objects_OnNewAvatar(object sender, AvatarUpdateEventArgs e) { OnEvent("On-New-Avatar", paramNamesOnNewAvatar, paramTypesOnNewAvatar, e); }
//Receive all the avatars' models void Objects_AvatarUpdate(object sender, AvatarUpdateEventArgs e) { //leave other regions out temporarily if (e.Simulator.Handle != Client.Network.CurrentSim.Handle) return; Radegast.Rendering.GLAvatar ga = new Radegast.Rendering.GLAvatar(); OpenMetaverse.Avatar av = e.Avatar; Radegast.Rendering.RenderAvatar ra = new Radegast.Rendering.RenderAvatar(); ra.avatar = av; ra.glavatar = ga; newAvatars.Add(av.LocalID, ra); ra.glavatar.morph(av); }
private void Objects_OnAvatarUpdate(object sender, AvatarUpdateEventArgs e) { if (e.Avatar.ID == client.Self.AgentID) { ResetCamera(); } }