From 39b64564dca0e5cb57a2a8e1b60979ccaaf11ef6 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 26 Jul 2007 14:55:42 +0000 Subject: * Started renaming world to Scene * Update and UpdateMovement now first stores array to avoid collection update exceptions * Ignored some bins --- OpenSim/Region/Environment/EstateManager.cs | 10 ++--- OpenSim/Region/Environment/LandManagement/Land.cs | 33 ++++++++------- .../Environment/LandManagement/LandManager.cs | 14 +++---- OpenSim/Region/Environment/Scenes/Entity.cs | 26 ++++++------ OpenSim/Region/Environment/Scenes/EntityBase.cs | 47 ++++++---------------- OpenSim/Region/Environment/Scenes/Primitive.cs | 29 +++++-------- OpenSim/Region/Environment/Scenes/Scene.cs | 24 ++++++----- OpenSim/Region/Environment/Scenes/SceneBase.cs | 2 +- OpenSim/Region/Environment/Scenes/SceneObject.cs | 10 ++--- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 +++++----- 10 files changed, 95 insertions(+), 122 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index 3742486..3af6fb2 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs @@ -45,12 +45,12 @@ namespace OpenSim.Region.Environment /// public class EstateManager { - private Scene m_world; + private Scene m_scene; private RegionInfo m_regInfo; - public EstateManager(Scene world,RegionInfo reginfo) + public EstateManager(Scene scene,RegionInfo reginfo) { - m_world = world; //Estate settings found at world.m_regInfo.estateSettings + m_scene = scene; m_regInfo = reginfo; } @@ -243,7 +243,7 @@ namespace OpenSim.Region.Environment public void sendRegionInfoPacketToAll() { - List avatars = m_world.RequestAvatarList(); + List avatars = m_scene.RequestAvatarList(); for (int i = 0; i < avatars.Count; i++) { @@ -253,7 +253,7 @@ namespace OpenSim.Region.Environment public void sendRegionHandshakeToAll() { - List avatars = m_world.RequestAvatarList(); + List avatars = m_scene.RequestAvatarList(); for (int i = 0; i < avatars.Count; i++) { diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs index bae3b0e..625b176 100644 --- a/OpenSim/Region/Environment/LandManagement/Land.cs +++ b/OpenSim/Region/Environment/LandManagement/Land.cs @@ -18,7 +18,7 @@ namespace OpenSim.Region.Environment.LandManagement public LandData landData = new LandData(); public List primsOverMe = new List(); - public Scene m_world; + public Scene m_scene; private bool[,] landBitmap = new bool[64, 64]; @@ -26,9 +26,9 @@ namespace OpenSim.Region.Environment.LandManagement #region Constructors - public Land(LLUUID owner_id, bool is_group_owned, Scene world) + public Land(LLUUID owner_id, bool is_group_owned, Scene scene) { - m_world = world; + m_scene = scene; landData.ownerID = owner_id; landData.isGroupOwned = is_group_owned; @@ -59,7 +59,7 @@ namespace OpenSim.Region.Environment.LandManagement public Land Copy() { - Land newLand = new Land(this.landData.ownerID, this.landData.isGroupOwned, m_world); + Land newLand = new Land(this.landData.ownerID, this.landData.isGroupOwned, m_scene); //Place all new variables here! newLand.landBitmap = (bool[,])(this.landBitmap.Clone()); @@ -101,7 +101,7 @@ namespace OpenSim.Region.Environment.LandManagement updatePacket.ParcelData.LocalID = landData.localID; if (landData.area > 0) { - updatePacket.ParcelData.MaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor))); + updatePacket.ParcelData.MaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_scene.RegionInfo.estateSettings.objectBonusFactor))); } else { @@ -118,14 +118,17 @@ namespace OpenSim.Region.Environment.LandManagement updatePacket.ParcelData.OwnerID = landData.ownerID; updatePacket.ParcelData.OwnerPrims = landData.ownerPrims; updatePacket.ParcelData.ParcelFlags = landData.landFlags; - updatePacket.ParcelData.ParcelPrimBonus = m_world.RegionInfo.estateSettings.objectBonusFactor; + updatePacket.ParcelData.ParcelPrimBonus = m_scene.RegionInfo.estateSettings.objectBonusFactor; updatePacket.ParcelData.PassHours = landData.passHours; updatePacket.ParcelData.PassPrice = landData.passPrice; updatePacket.ParcelData.PublicCount = 0; //unemplemented - updatePacket.ParcelData.RegionDenyAnonymous = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0); - updatePacket.ParcelData.RegionDenyIdentified = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0); - updatePacket.ParcelData.RegionDenyTransacted = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0); - updatePacket.ParcelData.RegionPushOverride = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0); + + uint regionFlags = (uint)m_scene.RegionInfo.estateSettings.regionFlags; + updatePacket.ParcelData.RegionDenyAnonymous = ((regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0); + updatePacket.ParcelData.RegionDenyIdentified = ((regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0); + updatePacket.ParcelData.RegionDenyTransacted = ((regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0); + updatePacket.ParcelData.RegionPushOverride = ((regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0); + updatePacket.ParcelData.RentPrice = 0; updatePacket.ParcelData.RequestResult = request_result; updatePacket.ParcelData.SalePrice = landData.salePrice; @@ -134,7 +137,7 @@ namespace OpenSim.Region.Environment.LandManagement updatePacket.ParcelData.SequenceID = sequence_id; if (landData.simwideArea > 0) { - updatePacket.ParcelData.SimWideMaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.simwideArea) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor))); + updatePacket.ParcelData.SimWideMaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(landData.simwideArea) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_scene.RegionInfo.estateSettings.objectBonusFactor))); } else { @@ -180,10 +183,10 @@ namespace OpenSim.Region.Environment.LandManagement public void sendLandUpdateToAvatarsOverMe() { - List avatars = m_world.RequestAvatarList(); + List avatars = m_scene.RequestAvatarList(); for (int i = 0; i < avatars.Count; i++) { - Land over = m_world.LandManager.getLandObject((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y)); + Land over = m_scene.LandManager.getLandObject((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y)); if (over.landData.localID == this.landData.localID) { sendLandProperties(0, false, 0, avatars[i].ControllingClient); @@ -219,8 +222,8 @@ namespace OpenSim.Region.Environment.LandManagement } } } - landData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_world.Terrain.GetHeight((min_x * 4), (min_y * 4))); - landData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_world.Terrain.GetHeight((max_x * 4), (max_y * 4))); + landData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_scene.Terrain.GetHeight((min_x * 4), (min_y * 4))); + landData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_scene.Terrain.GetHeight((max_x * 4), (max_y * 4))); landData.area = tempArea; } diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index be2913b..8c359fc 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs @@ -85,16 +85,16 @@ namespace OpenSim.Region.Environment.LandManagement /// public bool landPrimCountTainted = false; - private Scene m_world; + private Scene m_scene; private RegionInfo m_regInfo; #endregion #region Constructors - public LandManager(Scene world, RegionInfo reginfo) + public LandManager(Scene scene, RegionInfo reginfo) { - m_world = world; + m_scene = scene; m_regInfo = reginfo; landIDList.Initialize(); @@ -106,7 +106,7 @@ namespace OpenSim.Region.Environment.LandManagement #region Parcel From Storage Functions public void LandFromStorage(LandData data) { - Land new_land = new Land(data.ownerID, data.isGroupOwned, m_world); + Land new_land = new Land(data.ownerID, data.isGroupOwned, m_scene); new_land.landData = data.Copy(); new_land.setLandBitmapFromByteArray(); addLandObject(new_land); @@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.LandManagement /// public Land createBaseLand() { - return new Land(new LLUUID(), false, m_world); + return new Land(new LLUUID(), false, m_scene); } /// @@ -517,7 +517,7 @@ namespace OpenSim.Region.Environment.LandManagement lastLandLocalID = START_LAND_LOCAL_ID - 1; landIDList.Initialize(); - Land fullSimParcel = new Land(LLUUID.Zero, false, m_world); + Land fullSimParcel = new Land(LLUUID.Zero, false, m_scene); fullSimParcel.setLandBitmap(Land.getSquareLandBitmap(0, 0, 256, 256)); fullSimParcel.landData.ownerID = m_regInfo.MasterAvatarAssignedUUID; @@ -529,7 +529,7 @@ namespace OpenSim.Region.Environment.LandManagement public void handleSignificantClientMovement(IClientAPI remote_client) { - ScenePresence clientAvatar = m_world.RequestAvatar(remote_client.AgentId); + ScenePresence clientAvatar = m_scene.RequestAvatar(remote_client.AgentId); if (clientAvatar != null) { Land over = getLandObject(clientAvatar.Pos.X,clientAvatar.Pos.Y); diff --git a/OpenSim/Region/Environment/Scenes/Entity.cs b/OpenSim/Region/Environment/Scenes/Entity.cs index 2456a4e..204b68f 100644 --- a/OpenSim/Region/Environment/Scenes/Entity.cs +++ b/OpenSim/Region/Environment/Scenes/Entity.cs @@ -31,8 +31,8 @@ using OpenSim.Physics.Manager; namespace OpenSim.Region.Environment.Scenes { - public abstract class Entity :EntityBase //this class (Entity) will be phased out - { + public abstract class Entity : EntityBase //this class (Entity) will be phased out + { protected PhysicsActor _physActor; /// @@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Scenes { get { - if (this._physActor != null) + if (_physActor != null) { m_pos.X = _physActor.Position.X; m_pos.Y = _physActor.Position.Y; @@ -53,14 +53,13 @@ namespace OpenSim.Region.Environment.Scenes } set { - if (this._physActor != null) + if (_physActor != null) { try { - lock (this.m_world.SyncRoot) + lock (m_scene.SyncRoot) { - - this._physActor.Position = new PhysicsVector(value.X, value.Y, value.Z); + _physActor.Position = new PhysicsVector(value.X, value.Y, value.Z); } } catch (Exception e) @@ -73,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes } } - + /// /// /// @@ -81,7 +80,7 @@ namespace OpenSim.Region.Environment.Scenes { get { - if (this._physActor != null) + if (_physActor != null) { m_velocity.X = _physActor.Velocity.X; m_velocity.Y = _physActor.Velocity.Y; @@ -92,14 +91,13 @@ namespace OpenSim.Region.Environment.Scenes } set { - if (this._physActor != null) + if (_physActor != null) { try { - lock (this.m_world.SyncRoot) + lock (m_scene.SyncRoot) { - - this._physActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); + _physActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); } } catch (Exception e) @@ -112,4 +110,4 @@ namespace OpenSim.Region.Environment.Scenes } } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 0d1e3fc..08f13c2 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs @@ -11,7 +11,7 @@ namespace OpenSim.Region.Environment.Scenes protected List m_children; - protected Scene m_world; + protected Scene m_scene; protected string m_name; /// @@ -24,19 +24,14 @@ namespace OpenSim.Region.Environment.Scenes } protected LLVector3 m_pos; + /// /// /// public virtual LLVector3 Pos { - get - { - return m_pos; - } - set - { - m_pos = value; - } + get { return m_pos; } + set { m_pos = value; } } public LLVector3 m_velocity; @@ -46,28 +41,16 @@ namespace OpenSim.Region.Environment.Scenes /// public virtual LLVector3 Velocity { - get - { - return m_velocity; - } - set - { - m_velocity = value; - } + get { return m_velocity; } + set { m_velocity = value; } } - protected Quaternion m_rotation = new Quaternion(0,0,1,0); + protected Quaternion m_rotation = new Quaternion(0, 0, 1, 0); public virtual Quaternion Rotation { - get - { - return m_rotation; - } - set - { - m_rotation = value; - } + get { return m_rotation; } + set { m_rotation = value; } } protected uint m_localId; @@ -91,19 +74,17 @@ namespace OpenSim.Region.Environment.Scenes m_name = "(basic entity)"; m_children = new List(); - } /// /// /// - public virtual void updateMovement() + public virtual void UpdateMovement() { - foreach (EntityBase child in m_children) { - child.updateMovement(); + child.UpdateMovement(); } } @@ -125,7 +106,6 @@ namespace OpenSim.Region.Environment.Scenes /// public virtual void BackUp() { - } /// @@ -134,7 +114,7 @@ namespace OpenSim.Region.Environment.Scenes /// public virtual EntityBase Copy() { - return (EntityBase)this.MemberwiseClone(); + return (EntityBase) MemberwiseClone(); } /// @@ -142,7 +122,6 @@ namespace OpenSim.Region.Environment.Scenes /// public virtual void LandRenegerated() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs index 93e4959..ce5c327 100644 --- a/OpenSim/Region/Environment/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive.cs @@ -138,22 +138,11 @@ namespace OpenSim.Region.Environment.Scenes #region Constructors - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - public Primitive(ulong regionHandle, Scene world, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, + public Primitive(ulong regionHandle, Scene scene, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos) { m_regionHandle = regionHandle; - m_world = world; + m_scene = scene; m_inventoryItems = new Dictionary(); m_Parent = parent; m_isRootPrim = isRoot; @@ -163,7 +152,7 @@ namespace OpenSim.Region.Environment.Scenes Rotation = Quaternion.Identity; - m_world.AcknowledgeNewPrim(this); + m_scene.AcknowledgeNewPrim(this); OnPrimCountTainted(); } @@ -202,10 +191,10 @@ namespace OpenSim.Region.Environment.Scenes dupe.m_children = new List(); dupe.m_Shape = m_Shape.Copy(); dupe.m_regionHandle = m_regionHandle; - dupe.m_world = m_world; + dupe.m_scene = m_scene; - uint newLocalID = m_world.PrimIDAllocate(); + uint newLocalID = m_scene.PrimIDAllocate(); dupe.m_uuid = LLUUID.Random(); dupe.LocalId = newLocalID; @@ -225,7 +214,7 @@ namespace OpenSim.Region.Environment.Scenes dupe.m_pos = new LLVector3(m_pos.X, m_pos.Y, m_pos.Z); rootParent.AddChildToList(dupe); - m_world.AcknowledgeNewPrim(dupe); + m_scene.AcknowledgeNewPrim(dupe); dupe.TriggerOnPrimCountTainted(); @@ -327,7 +316,7 @@ namespace OpenSim.Region.Environment.Scenes m_children.Add(linkObject.rootPrimitive); linkObject.rootPrimitive.SetNewParent(this, m_RootParent); - m_world.DeleteEntity(linkObject.rootUUID); + m_scene.DeleteEntity(linkObject.rootUUID); linkObject.DeleteAllChildren(); OnPrimCountTainted(); @@ -676,7 +665,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendFullUpdateToAllClients() { - List avatars = m_world.RequestAvatarList(); + List avatars = m_scene.RequestAvatarList(); for (int i = 0; i < avatars.Count; i++) { SendFullUpdateToClient(avatars[i].ControllingClient); @@ -721,7 +710,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendTerseUpdateToALLClients() { - List avatars = m_world.RequestAvatarList(); + List avatars = m_scene.RequestAvatarList(); for (int i = 0; i < avatars.Count; i++) { SendTerseUpdateToClient(avatars[i].ControllingClient); diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 0e25e54..39584ad 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -140,23 +140,23 @@ namespace OpenSim.Region.Environment.Scenes m_eventManager = new EventManager(); m_eventManager.OnParcelPrimCountAdd += - new EventManager.OnParcelPrimCountAddDelegate(m_LandManager.addPrimToLandPrimCounts); + m_LandManager.addPrimToLandPrimCounts; - MainLog.Instance.Verbose("World.cs - creating new entitities instance"); + MainLog.Instance.Verbose("Creating new entitities instance"); Entities = new Dictionary(); Avatars = new Dictionary(); Prims = new Dictionary(); - MainLog.Instance.Verbose("World.cs - loading objects from datastore"); + MainLog.Instance.Verbose("Loading objects from datastore"); List PrimsFromDB = storageManager.DataStore.LoadObjects(); foreach (SceneObject prim in PrimsFromDB) { AddEntity(prim); } - MainLog.Instance.Verbose("World.cs - loaded " + PrimsFromDB.Count.ToString() + " object(s)"); + MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " object(s)"); - MainLog.Instance.Verbose("World.cs - creating LandMap"); + MainLog.Instance.Verbose("Creating LandMap"); Terrain = new TerrainEngine(); ScenePresence.LoadAnims(); @@ -198,7 +198,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// Performs per-frame updates on the world, this should be the central world loop + /// Performs per-frame updates on the scene, this should be the central world loop /// public override void Update() { @@ -210,9 +210,11 @@ namespace OpenSim.Region.Environment.Scenes phyScene.GetResults(); } - foreach (LLUUID UUID in Entities.Keys) + List moveEntities = new List( Entities.Values ); + + foreach (EntityBase entity in moveEntities) { - Entities[UUID].updateMovement(); + entity.UpdateMovement(); } lock (m_syncRoot) @@ -220,9 +222,11 @@ namespace OpenSim.Region.Environment.Scenes phyScene.Simulate(timeStep); } - foreach (LLUUID UUID in Entities.Keys) + List updateEntities = new List(Entities.Values); + + foreach (EntityBase entity in updateEntities) { - Entities[UUID].Update(); + entity.Update(); } // General purpose event manager diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 76a8439..0038b39 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs @@ -38,7 +38,7 @@ using OpenSim.Framework; namespace OpenSim.Region.Environment.Scenes { - public abstract class SceneBase : IWorld + public abstract class SceneBase : IScene { public Dictionary Entities; protected ulong m_regionHandle; diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs index d513634..03a7f55 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObject.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs @@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Scenes public SceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) { m_regionHandle = world.RegionInfo.RegionHandle; - m_world = world; + m_scene = world; m_eventManager = eventManager; this.Pos = pos; @@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Scenes /// Need a null constructor for duplication public SceneObject() { - + } public void registerEvents() @@ -144,7 +144,7 @@ namespace OpenSim.Region.Environment.Scenes public void CreateRootFromShape(LLUUID agentID, uint localID, PrimitiveBaseShape shape, LLVector3 pos) { - this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_world, agentID, localID, true, this, this, shape, pos); + this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_scene, agentID, localID, true, this, this, shape, pos); this.m_children.Add(rootPrimitive); this.ChildPrimitives.Add(this.rootUUID, this.rootPrimitive); @@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Scenes { SceneObject dupe = new SceneObject(); - dupe.m_world = this.m_world; + dupe.m_scene = this.m_scene; dupe.m_eventManager = this.m_eventManager; dupe.m_regionHandle = this.m_regionHandle; Primitive newRoot = this.rootPrimitive.Copy(dupe, dupe); @@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Scenes dupe.m_children.Add(dupe.rootPrimitive); dupe.rootPrimitive.Pos = this.Pos; dupe.Rotation = this.Rotation; - dupe.LocalId = m_world.PrimIDAllocate(); + dupe.LocalId = m_scene.PrimIDAllocate(); dupe.registerEvents(); return dupe; diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index e81ac7b..b3255c4 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -120,7 +120,7 @@ namespace OpenSim.Region.Environment.Scenes public ScenePresence(IClientAPI theClient, Scene world, RegionInfo reginfo) { - m_world = world; + m_scene = world; this.m_uuid = theClient.AgentId; m_regionInfo = reginfo; @@ -129,7 +129,7 @@ namespace OpenSim.Region.Environment.Scenes ControllingClient = theClient; this.firstname = ControllingClient.FirstName; this.lastname = ControllingClient.LastName; - m_localId = m_world.NextLocalId; + m_localId = m_scene.NextLocalId; Pos = ControllingClient.StartPos; visualParams = new byte[218]; for (int i = 0; i < 218; i++) @@ -394,7 +394,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendTerseUpdateToALLClients() { - List avatars = this.m_world.RequestAvatarList(); + List avatars = this.m_scene.RequestAvatarList(); for (int i = 0; i < avatars.Count; i++) { this.SendTerseUpdateToClient(avatars[i].ControllingClient); @@ -412,8 +412,8 @@ namespace OpenSim.Region.Environment.Scenes public void SendFullUpdateToALLClients() { - List avatars = this.m_world.RequestAvatarList(); - foreach (ScenePresence avatar in this.m_world.RequestAvatarList()) + List avatars = this.m_scene.RequestAvatarList(); + foreach (ScenePresence avatar in this.m_scene.RequestAvatarList()) { this.SendFullUpdateToOtherClient(avatar); avatar.SendFullUpdateToOtherClient(this); @@ -428,7 +428,7 @@ namespace OpenSim.Region.Environment.Scenes this.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.m_uuid, this.LocalId, this.Pos, DefaultTexture); if (this.newAvatar) { - this.m_world.InformClientOfNeighbours(this.ControllingClient); + this.m_scene.InformClientOfNeighbours(this.ControllingClient); this.newAvatar = false; } } @@ -441,7 +441,7 @@ namespace OpenSim.Region.Environment.Scenes { this.ControllingClient.SendWearables(this.Wearables); this.SendFullUpdateToALLClients(); - this.m_world.SendAllSceneObjectsToClient(this.ControllingClient); + this.m_scene.SendAllSceneObjectsToClient(this.ControllingClient); } /// @@ -462,7 +462,7 @@ namespace OpenSim.Region.Environment.Scenes { this.current_anim = animID; this.anim_seq = seq; - List avatars = this.m_world.RequestAvatarList(); + List avatars = this.m_scene.RequestAvatarList(); for (int i = 0; i < avatars.Count; i++) { avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId); @@ -550,10 +550,10 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 vel = this.m_velocity; ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256)); - RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle); + RegionInfo neighbourRegion = this.m_scene.RequestNeighbouringRegionInfo(neighbourHandle); if (neighbourRegion != null) { - bool res = this.m_world.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos, this._physActor.Flying); + bool res = this.m_scene.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos, this._physActor.Flying); if (res) { this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint); @@ -574,7 +574,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// - public override void updateMovement() + public override void UpdateMovement() { newForce = false; lock (this.forcesList) -- cgit v1.1