From ca611c6668c5a063ce92feb72ce14866fc3322a3 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 20 Sep 2007 23:47:32 +0000 Subject: * even more renaming and refactoring; the cleaning woman is on call. --- OpenSim/Region/Application/OpenSimMain.cs | 2 +- OpenSim/Region/Environment/EstateManager.cs | 4 +- OpenSim/Region/Environment/LandManagement/Land.cs | 2 +- OpenSim/Region/Environment/Modules/ChatModule.cs | 12 +-- OpenSim/Region/Environment/Scenes/Entity.cs | 26 +++--- .../Region/Environment/Scenes/Scene.Inventory.cs | 4 +- .../Environment/Scenes/Scene.PacketHandlers.cs | 4 +- OpenSim/Region/Environment/Scenes/Scene.cs | 26 +++--- OpenSim/Region/Environment/Scenes/SceneManager.cs | 2 +- .../Region/Environment/Scenes/SceneObjectGroup.cs | 2 +- .../Region/Environment/Scenes/SceneObjectPart.cs | 4 +- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 101 +++++++++++---------- OpenSim/Region/Examples/SimpleApp/Program.cs | 2 - 13 files changed, 95 insertions(+), 96 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 66ae987..c40b018 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -588,7 +588,7 @@ namespace OpenSim avatar.Firstname, avatar.Lastname, avatar.UUID, - avatar.ControllingClient.AgentId, + avatar._ControllingClient.AgentId, "Unknown", "Unknown", regionName)); diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index ac710ad..8aaeace 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs @@ -335,7 +335,7 @@ namespace OpenSim.Region.Environment for (int i = 0; i < avatars.Count; i++) { - sendRegionInfoPacket(avatars[i].ControllingClient); + sendRegionInfoPacket(avatars[i]._ControllingClient); } } @@ -343,7 +343,7 @@ namespace OpenSim.Region.Environment { m_scene.ForEachScenePresence( delegate( ScenePresence scenePresence ) { - sendRegionHandshake(scenePresence.ControllingClient); + sendRegionHandshake(scenePresence._ControllingClient); }); } diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs index 6c177cd..0ec77c5 100644 --- a/OpenSim/Region/Environment/LandManagement/Land.cs +++ b/OpenSim/Region/Environment/LandManagement/Land.cs @@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.LandManagement (int) Math.Round(avatars[i].AbsolutePosition.Y)); if (over.landData.localID == landData.localID) { - sendLandProperties(0, false, 0, avatars[i].ControllingClient); + sendLandProperties(0, false, 0, avatars[i]._ControllingClient); } } } diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index dfbb2bb..d19bae5 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs @@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules string mess = inputLine.Substring(inputLine.IndexOf(m_channel)); m_scene.ForEachScenePresence(delegate(ScenePresence presence) { - presence.ControllingClient.SendChatMessage( + presence._ControllingClient.SendChatMessage( Helpers.StringToField(mess), 255, pos, "IRC:", LLUUID.Zero); }); @@ -159,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules int dis = -1000; //err ??? the following code seems to be request a scenePresence when it already has a ref to it - avatar = m_scene.GetScenePresence(presence.ControllingClient.AgentId); + avatar = m_scene.GetScenePresence(presence._ControllingClient.AgentId); if (avatar != null) { dis = (int) avatar.AbsolutePosition.GetDistanceTo(fromPos); @@ -171,7 +171,7 @@ namespace OpenSim.Region.Environment.Modules if ((dis < 10) && (dis > -10)) { //should change so the message is sent through the avatar rather than direct to the ClientView - presence.ControllingClient.SendChatMessage(message, + presence._ControllingClient.SendChatMessage(message, type, fromPos, fromName, @@ -182,7 +182,7 @@ namespace OpenSim.Region.Environment.Modules if ((dis < 30) && (dis > -30)) { //Console.WriteLine("sending chat"); - presence.ControllingClient.SendChatMessage(message, + presence._ControllingClient.SendChatMessage(message, type, fromPos, fromName, @@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules case 2: // Shout if ((dis < 100) && (dis > -100)) { - presence.ControllingClient.SendChatMessage(message, + presence._ControllingClient.SendChatMessage(message, type, fromPos, fromName, @@ -201,7 +201,7 @@ namespace OpenSim.Region.Environment.Modules break; case 0xff: // Broadcast - presence.ControllingClient.SendChatMessage(message, type, + presence._ControllingClient.SendChatMessage(message, type, fromPos, fromName, fromAgentID); diff --git a/OpenSim/Region/Environment/Scenes/Entity.cs b/OpenSim/Region/Environment/Scenes/Entity.cs index b67e816..49802ac 100644 --- a/OpenSim/Region/Environment/Scenes/Entity.cs +++ b/OpenSim/Region/Environment/Scenes/Entity.cs @@ -33,7 +33,7 @@ namespace OpenSim.Region.Environment.Scenes { public abstract class Entity : EntityBase //this class (Entity) will be phased out { - protected PhysicsActor _physActor; + protected PhysicsActor m_physicsActor; /// /// @@ -42,24 +42,24 @@ namespace OpenSim.Region.Environment.Scenes { get { - if (_physActor != null) + if (m_physicsActor != null) { - m_pos.X = _physActor.Position.X; - m_pos.Y = _physActor.Position.Y; - m_pos.Z = _physActor.Position.Z; + m_pos.X = m_physicsActor.Position.X; + m_pos.Y = m_physicsActor.Position.Y; + m_pos.Z = m_physicsActor.Position.Z; } return m_pos; } set { - if (_physActor != null) + if (m_physicsActor != null) { try { lock (m_scene.SyncRoot) { - _physActor.Position = new PhysicsVector(value.X, value.Y, value.Z); + m_physicsActor.Position = new PhysicsVector(value.X, value.Y, value.Z); } } catch (Exception e) @@ -80,24 +80,24 @@ namespace OpenSim.Region.Environment.Scenes { get { - if (_physActor != null) + if (m_physicsActor != null) { - m_velocity.X = _physActor.Velocity.X; - m_velocity.Y = _physActor.Velocity.Y; - m_velocity.Z = _physActor.Velocity.Z; + m_velocity.X = m_physicsActor.Velocity.X; + m_velocity.Y = m_physicsActor.Velocity.Y; + m_velocity.Z = m_physicsActor.Velocity.Z; } return m_velocity; } set { - if (_physActor != null) + if (m_physicsActor != null) { try { lock (m_scene.SyncRoot) { - _physActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); + m_physicsActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); } } catch (Exception e) diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index a6e47f3..b0e2b80 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -21,7 +21,7 @@ namespace OpenSim.Region.Environment.Scenes if ( TryGetAvatar( avatarId, out avatar )) { - AddInventoryItem(avatar.ControllingClient, item); + AddInventoryItem(avatar._ControllingClient, item); } } @@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes if (TryGetAvatar(avatarId, out avatar)) { - return CapsUpdateInventoryItemAsset(avatar.ControllingClient, itemID, data); + return CapsUpdateInventoryItemAsset(avatar._ControllingClient, itemID, data); } return LLUUID.Zero; diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 91b9634..53da016 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -77,7 +77,7 @@ namespace OpenSim.Region.Environment.Scenes ScenePresence fromAvatar = m_scenePresences[fromAgentID]; ScenePresence toAvatar = m_scenePresences[toAgentID]; string fromName = fromAvatar.Firstname + " " + fromAvatar.Lastname; - toAvatar.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, toAgentID, + toAvatar._ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, toAgentID, imSessionID, fromName, dialog, timestamp); } else @@ -508,7 +508,7 @@ namespace OpenSim.Region.Environment.Scenes { ForEachScenePresence(delegate(ScenePresence presence) { - presence.ControllingClient.SendAnimation(animID, seq, client.AgentId); + presence._ControllingClient.SendAnimation(animID, seq, client.AgentId); }); } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index e683bce..5b08155 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -310,7 +310,7 @@ namespace OpenSim.Region.Environment.Scenes { if (Terrain.Tainted(x * 16, y * 16)) { - SendLayerData(x, y, presence.ControllingClient, + SendLayerData(x, y, presence._ControllingClient, terData); } } @@ -344,7 +344,7 @@ namespace OpenSim.Region.Environment.Scenes List avatars = GetAvatars(); foreach (ScenePresence avatar in avatars) { - avatar.ControllingClient.SendViewerTime(m_timePhase); + avatar._ControllingClient.SendViewerTime(m_timePhase); } m_timeUpdateCount = 0; @@ -396,7 +396,7 @@ namespace OpenSim.Region.Environment.Scenes storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD()); - ForEachScenePresence(delegate(ScenePresence presence) { SendLayerData(presence.ControllingClient); }); + ForEachScenePresence(delegate(ScenePresence presence) { SendLayerData(presence._ControllingClient); }); foreach (LLUUID UUID in Entities.Keys) { @@ -424,7 +424,7 @@ namespace OpenSim.Region.Environment.Scenes } storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD()); - ForEachScenePresence(delegate(ScenePresence presence) { SendLayerData(presence.ControllingClient); }); + ForEachScenePresence(delegate(ScenePresence presence) { SendLayerData(presence._ControllingClient); }); foreach (LLUUID UUID in Entities.Keys) { @@ -829,10 +829,10 @@ namespace OpenSim.Region.Environment.Scenes delegate(ScenePresence presence) { presence.CoarseLocationChange(avatar); - presence.ControllingClient.SendKillObject(avatar.RegionHandle, avatar.LocalId); - if (presence.PhysActor != null) + presence._ControllingClient.SendKillObject(avatar.RegionHandle, avatar.LocalId); + if (presence.PhysicsActor != null) { - phyScene.RemoveAvatar(presence.PhysActor); + phyScene.RemoveAvatar(presence.PhysicsActor); } }); @@ -953,7 +953,7 @@ namespace OpenSim.Region.Environment.Scenes { ForEachScenePresence(delegate(ScenePresence presence) { - presence.ControllingClient.SendKillObject(m_regionHandle, localID); + presence._ControllingClient.SendKillObject(m_regionHandle, localID); }); } @@ -1181,7 +1181,7 @@ namespace OpenSim.Region.Environment.Scenes { if (m_scenePresences.ContainsKey(avatarID)) { - m_scenePresences[avatarID].ControllingClient.SendLoadURL(objectname, objectID, ownerID, groupOwned, message, url); + m_scenePresences[avatarID]._ControllingClient.SendLoadURL(objectname, objectID, ownerID, groupOwned, message, url); } } @@ -1197,7 +1197,7 @@ namespace OpenSim.Region.Environment.Scenes { foreach (ScenePresence presence in m_scenePresences.Values) { - presence.ControllingClient.SendAlertMessage(message); + presence._ControllingClient.SendAlertMessage(message); } } @@ -1205,7 +1205,7 @@ namespace OpenSim.Region.Environment.Scenes { if (m_scenePresences.ContainsKey(agentID)) { - m_scenePresences[agentID].ControllingClient.SendAgentAlertMessage(message, modal); + m_scenePresences[agentID]._ControllingClient.SendAgentAlertMessage(message, modal); } } @@ -1215,7 +1215,7 @@ namespace OpenSim.Region.Environment.Scenes { if ((presence.Firstname == firstName) && (presence.Lastname == lastName)) { - presence.ControllingClient.SendAgentAlertMessage(message, modal); + presence._ControllingClient.SendAgentAlertMessage(message, modal); break; } } @@ -1303,7 +1303,7 @@ namespace OpenSim.Region.Environment.Scenes scenePrescence.Firstname, scenePrescence.Lastname, scenePrescence.UUID, - scenePrescence.ControllingClient.AgentId, + scenePrescence._ControllingClient.AgentId, "Unknown", "Unknown", RegionInfo.RegionName)); diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index a97020e..27331ee 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs @@ -151,7 +151,7 @@ namespace OpenSim.Region.Environment.Scenes scenePrescence.Firstname, scenePrescence.Lastname, newDebug)); - scenePrescence.ControllingClient.SetDebug(newDebug); + scenePrescence._ControllingClient.SetDebug(newDebug); } } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 890008d..d1c4ae8 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1236,7 +1236,7 @@ namespace OpenSim.Region.Environment.Scenes List avatars = GetScenePresences(); for (int i = 0; i < avatars.Count; i++) { - avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalID); + avatars[i]._ControllingClient.SendKillObject(m_regionHandle, part.LocalID); } } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 468def0..1b667b8 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -700,7 +700,7 @@ namespace OpenSim.Region.Environment.Scenes List avatars = m_parentGroup.GetScenePresences(); for (int i = 0; i < avatars.Count; i++) { - m_parentGroup.SendPartFullUpdate(avatars[i].ControllingClient, this); + m_parentGroup.SendPartFullUpdate(avatars[i]._ControllingClient, this); } } @@ -764,7 +764,7 @@ namespace OpenSim.Region.Environment.Scenes List avatars = m_parentGroup.GetScenePresences(); for (int i = 0; i < avatars.Count; i++) { - m_parentGroup.SendPartTerseUpdate(avatars[i].ControllingClient, this); + m_parentGroup.SendPartTerseUpdate(avatars[i]._ControllingClient, this); } } diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index bcffe39..c75136f 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -40,10 +40,8 @@ namespace OpenSim.Region.Environment.Scenes { public partial class ScenePresence : Entity { - public static bool PhysicsEngineFlying = false; public static AvatarAnimations Animations; public static byte[] DefaultTexture; - public IClientAPI ControllingClient; public LLUUID current_anim; public int anim_seq; private bool updateflag = false; @@ -56,8 +54,6 @@ namespace OpenSim.Region.Environment.Scenes private AvatarWearable[] Wearables; private LLObject.TextureEntry m_textureEntry; - private ulong m_regionHandle; - public bool childAgent = true; public bool IsRestrictedToRegion = false; @@ -105,10 +101,10 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// - public PhysicsActor PhysActor + public PhysicsActor PhysicsActor { - set { _physActor = value; } - get { return _physActor; } + set { m_physicsActor = value; } + get { return m_physicsActor; } } public bool Updated @@ -117,25 +113,30 @@ namespace OpenSim.Region.Environment.Scenes get { return updateflag; } } + private readonly ulong m_regionHandle; public ulong RegionHandle { get { return m_regionHandle; } } - private string m_firstname; - + private readonly string m_firstname; public string Firstname { get { return m_firstname; } } - private string m_lastname; - + private readonly string m_lastname; public string Lastname { get { return m_lastname; } } + private readonly IClientAPI m_controllingClient; + public IClientAPI _ControllingClient + { + get { return m_controllingClient; } + } + #endregion #region Constructor(s) @@ -143,23 +144,23 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// - /// + /// /// /// /// - public ScenePresence(IClientAPI theClient, Scene world, RegionInfo reginfo) + public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) { m_scene = world; - m_uuid = theClient.AgentId; + m_uuid = client.AgentId; m_regionInfo = reginfo; m_regionHandle = reginfo.RegionHandle; MainLog.Instance.Verbose("Avatar.cs "); - ControllingClient = theClient; - m_firstname = ControllingClient.FirstName; - m_lastname = ControllingClient.LastName; + m_controllingClient = client; + m_firstname = m_controllingClient.FirstName; + m_lastname = m_controllingClient.LastName; m_localId = m_scene.NextLocalId; - AbsolutePosition = ControllingClient.StartPos; + AbsolutePosition = m_controllingClient.StartPos; visualParams = new byte[218]; for (int i = 0; i < 218; i++) @@ -172,11 +173,11 @@ namespace OpenSim.Region.Environment.Scenes Animations.LoadAnims(); //register for events - ControllingClient.OnRequestWearables += SendOurAppearance; - ControllingClient.OnSetAppearance += new SetAppearance(SetAppearance); - ControllingClient.OnCompleteMovementToRegion += CompleteMovement; - ControllingClient.OnCompleteMovementToRegion += SendInitialData; - ControllingClient.OnAgentUpdate += HandleAgentUpdate; + m_controllingClient.OnRequestWearables += SendOurAppearance; + m_controllingClient.OnSetAppearance += new SetAppearance(SetAppearance); + m_controllingClient.OnCompleteMovementToRegion += CompleteMovement; + m_controllingClient.OnCompleteMovementToRegion += SendInitialData; + m_controllingClient.OnAgentUpdate += HandleAgentUpdate; // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); @@ -221,7 +222,7 @@ namespace OpenSim.Region.Environment.Scenes while (terse) { SceneObjectPart part = m_tersePartUpdates.Dequeue(); - part.SendTerseUpdate(ControllingClient); + part.SendTerseUpdate(m_controllingClient); terseCount++; if ((m_tersePartUpdates.Count < 1) | (terseCount > 30)) @@ -238,7 +239,7 @@ namespace OpenSim.Region.Environment.Scenes while (full) { SceneObjectPart part = m_fullPartUpdates.Dequeue(); - part.SendFullUpdate(ControllingClient); + part.SendFullUpdate(m_controllingClient); fullCount++; if ((m_fullPartUpdates.Count < 1) | (fullCount > 40)) { @@ -273,7 +274,7 @@ namespace OpenSim.Region.Environment.Scenes AbsolutePosition = pos; AddToPhysicalScene( ); - _physActor.Flying = isFlying; + m_physicsActor.Flying = isFlying; m_scene.SendAllSceneObjectsToClient(this); @@ -291,7 +292,7 @@ namespace OpenSim.Region.Environment.Scenes private void RemoveFromPhysicalScene() { - m_scene.PhysScene.RemoveAvatar( this.PhysActor ); + m_scene.PhysScene.RemoveAvatar( this.PhysicsActor ); } /// @@ -343,7 +344,7 @@ namespace OpenSim.Region.Environment.Scenes { look = new LLVector3(0.99f, 0.042f, 0); } - ControllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); + m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); if (childAgent) { childAgent = false; @@ -364,9 +365,9 @@ namespace OpenSim.Region.Environment.Scenes bool DCFlagKeyPressed = false; Vector3 agent_control_v3 = new Vector3(0, 0, 0); Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); - bool oldflying = PhysActor.Flying; - PhysActor.Flying = ((flags & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0); - if (PhysActor.Flying != oldflying) + bool oldflying = PhysicsActor.Flying; + PhysicsActor.Flying = ((flags & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0); + if (PhysicsActor.Flying != oldflying) { update_movementflag = true; } @@ -411,7 +412,7 @@ namespace OpenSim.Region.Environment.Scenes { if (movementflag != 0) { - if (_physActor.Flying) + if (m_physicsActor.Flying) { SendAnimPack(Animations.AnimsLLUUID["FLY"], 1); } @@ -435,7 +436,7 @@ namespace OpenSim.Region.Environment.Scenes direc.Normalize(); direc = direc*((0.03f)*128f); - if (_physActor.Flying) + if (m_physicsActor.Flying) direc *= 4; newVelocity.X = direc.x; @@ -528,7 +529,7 @@ namespace OpenSim.Region.Environment.Scenes { m_scene.ForEachScenePresence(delegate(ScenePresence presence) { - SendTerseUpdateToClient(presence.ControllingClient); + SendTerseUpdateToClient(presence.m_controllingClient); }); } @@ -545,7 +546,7 @@ namespace OpenSim.Region.Environment.Scenes } } - ControllingClient.SendCoarseLocationUpdate(CoarseLocations); + m_controllingClient.SendCoarseLocationUpdate(CoarseLocations); } public void CoarseLocationChange(ScenePresence avatar) @@ -571,7 +572,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar) { - remoteAvatar.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, + remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, AbsolutePosition, m_textureEntry.ToBytes()); } @@ -597,11 +598,11 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendInitialData() { - ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, + m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, AbsolutePosition, m_textureEntry.ToBytes()); if (!childAgent) { - m_scene.InformClientOfNeighbours(ControllingClient); + m_scene.InformClientOfNeighbours(m_controllingClient); newAvatar = false; } @@ -615,13 +616,13 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendOurAppearance(IClientAPI OurClient) { - ControllingClient.SendWearables(Wearables); + m_controllingClient.SendWearables(Wearables); //this.SendFullUpdateToAllClients(); //this.SendArrearanceToAllOtherAgents(); m_scene.SendAllSceneObjectsToClient(this); - ControllingClient.SendViewerTime(m_scene.TimePhase); + m_controllingClient.SendViewerTime(m_scene.TimePhase); //Please don't remove the following code (at least not yet), just leave it commented out //gives the user god powers, should help with debuging things in the future @@ -651,7 +652,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendAppearanceToOtherAgent(ScenePresence avatarInfo) { - avatarInfo.ControllingClient.SendAppearance(ControllingClient.AgentId, visualParams, + avatarInfo.m_controllingClient.SendAppearance(m_controllingClient.AgentId, visualParams, m_textureEntry.ToBytes()); } @@ -667,8 +668,8 @@ namespace OpenSim.Region.Environment.Scenes m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) { - scenePresence.ControllingClient.SendAnimation(animID, seq, - ControllingClient.AgentId); + scenePresence.m_controllingClient.SendAnimation(animID, seq, + m_controllingClient.AgentId); }); } @@ -691,7 +692,7 @@ namespace OpenSim.Region.Environment.Scenes posLastSignificantMove = AbsolutePosition; if (OnSignificantClientMovement != null) { - OnSignificantClientMovement(ControllingClient); + OnSignificantClientMovement(m_controllingClient); NotifyMyCoarseLocationChange(); } } @@ -762,14 +763,14 @@ namespace OpenSim.Region.Environment.Scenes if (neighbourRegion != null) { bool res = - m_scene.InformNeighbourOfCrossing(neighbourHandle, ControllingClient.AgentId, newpos, - _physActor.Flying); + m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, + m_physicsActor.Flying); if (res) { //TODO: following line is hard coded to port 9000, really need to change this as soon as possible - AgentCircuitData circuitdata = ControllingClient.RequestClientInfo(); - string capsPath = Util.GetCapsURL(ControllingClient.AgentId); - ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, + AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); + string capsPath = Util.GetCapsURL(m_controllingClient.AgentId); + m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, capsPath); MakeChildAgent(); m_scene.SendKillObject(m_localId); @@ -850,7 +851,7 @@ namespace OpenSim.Region.Environment.Scenes new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); - _physActor = scene.AddAvatar(pVec); + m_physicsActor = scene.AddAvatar(pVec); } } } \ No newline at end of file diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 7e6fd7a..a7b92f4 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs @@ -52,8 +52,6 @@ namespace SimpleApp m_log.Notice(m_log.LineInfo); - ScenePresence.PhysicsEngineFlying = true; - IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000); RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost"); -- cgit v1.1