aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.World/World.cs
diff options
context:
space:
mode:
authorlbsa712007-06-09 21:45:58 +0000
committerlbsa712007-06-09 21:45:58 +0000
commit4224b695acc2e1ad0199dc0ad7f560494182ed54 (patch)
tree8fae1cf25a058bc4e378ef2b6ce264d7f9f0b910 /OpenSim/OpenSim.World/World.cs
parent*Fixed casting mishap in last commit - client now starts up without crashing (diff)
downloadopensim-SC_OLD-4224b695acc2e1ad0199dc0ad7f560494182ed54.zip
opensim-SC_OLD-4224b695acc2e1ad0199dc0ad7f560494182ed54.tar.gz
opensim-SC_OLD-4224b695acc2e1ad0199dc0ad7f560494182ed54.tar.bz2
opensim-SC_OLD-4224b695acc2e1ad0199dc0ad7f560494182ed54.tar.xz
* LogFile now defaults to "{apptype}.log"
* cleaned away suo and user files. * added handy string chat variety to the API * Moved LockPhysicsEngine on World to SyncRoot on IWorld * Introduced NextLocalId instead of World fuggliness. * Transformed GetRegionInfo to Property on IWorld for great justice * Extracted default wearables (good to have) * Deleted unused BaseServer * Used IWorld instead of World wherever possible * The client constructor's not getting unused port any longer. * Extracted ClientView factoring so PacketServer can be tweaked. * Added SendLayerData to World * Made WorldBase abstract and cleaned it up a bit * added OpenGrid.Framework.Communications.dll.build and OpenSim.World.dll.build to svn * Added code for two examples (but not in prebuild yet)
Diffstat (limited to 'OpenSim/OpenSim.World/World.cs')
-rw-r--r--OpenSim/OpenSim.World/World.cs18
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/OpenSim.World/World.cs b/OpenSim/OpenSim.World/World.cs
index 011e39a..7ef06e2 100644
--- a/OpenSim/OpenSim.World/World.cs
+++ b/OpenSim/OpenSim.World/World.cs
@@ -23,10 +23,8 @@ namespace OpenSim.world
23 public partial class World : WorldBase, ILocalStorageReceiver, IScriptAPI 23 public partial class World : WorldBase, ILocalStorageReceiver, IScriptAPI
24 { 24 {
25 protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer(); 25 protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer();
26 public object LockPhysicsEngine = new object();
27 protected Dictionary<libsecondlife.LLUUID, Avatar> Avatars; 26 protected Dictionary<libsecondlife.LLUUID, Avatar> Avatars;
28 protected Dictionary<libsecondlife.LLUUID, Primitive> Prims; 27 protected Dictionary<libsecondlife.LLUUID, Primitive> Prims;
29 public uint _localNumber = 0;
30 private PhysicsScene phyScene; 28 private PhysicsScene phyScene;
31 private float timeStep = 0.1f; 29 private float timeStep = 0.1f;
32 public ILocalStorage localStorage; 30 public ILocalStorage localStorage;
@@ -59,6 +57,7 @@ namespace OpenSim.world
59 return (this.phyScene); 57 return (this.phyScene);
60 } 58 }
61 } 59 }
60
62 #endregion 61 #endregion
63 62
64 #region Constructors 63 #region Constructors
@@ -155,7 +154,7 @@ namespace OpenSim.world
155 Entities[UUID].addForces(); 154 Entities[UUID].addForces();
156 } 155 }
157 156
158 lock (this.LockPhysicsEngine) 157 lock (this.m_syncRoot)
159 { 158 {
160 this.phyScene.Simulate(timeStep); 159 this.phyScene.Simulate(timeStep);
161 } 160 }
@@ -203,7 +202,7 @@ namespace OpenSim.world
203 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving."); 202 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving.");
204 localStorage.SaveMap(Terrain.getHeights1D()); 203 localStorage.SaveMap(Terrain.getHeights1D());
205 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics."); 204 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics.");
206 lock (this.LockPhysicsEngine) 205 lock (this.m_syncRoot)
207 { 206 {
208 phyScene.SetTerrain(Terrain.getHeights1D()); 207 phyScene.SetTerrain(Terrain.getHeights1D());
209 } 208 }
@@ -297,7 +296,7 @@ namespace OpenSim.world
297 { 296 {
298 Terrain.hills(); 297 Terrain.hills();
299 298
300 lock (this.LockPhysicsEngine) 299 lock (this.m_syncRoot)
301 { 300 {
302 this.phyScene.SetTerrain(Terrain.getHeights1D()); 301 this.phyScene.SetTerrain(Terrain.getHeights1D());
303 } 302 }
@@ -328,7 +327,7 @@ namespace OpenSim.world
328 try 327 try
329 { 328 {
330 this.Terrain.setHeights2D(newMap); 329 this.Terrain.setHeights2D(newMap);
331 lock (this.LockPhysicsEngine) 330 lock (this.m_syncRoot)
332 { 331 {
333 this.phyScene.SetTerrain(this.Terrain.getHeights1D()); 332 this.phyScene.SetTerrain(this.Terrain.getHeights1D());
334 } 333 }
@@ -483,7 +482,7 @@ namespace OpenSim.world
483 this.estateManager.sendRegionHandshake(remoteClient); 482 this.estateManager.sendRegionHandshake(remoteClient);
484 483
485 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); 484 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
486 lock (this.LockPhysicsEngine) 485 lock (this.m_syncRoot)
487 { 486 {
488 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); 487 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec);
489 } 488 }
@@ -612,5 +611,10 @@ namespace OpenSim.world
612 } 611 }
613 612
614 #endregion 613 #endregion
614
615 public override void SendLayerData(int px, int py, IClientAPI RemoteClient)
616 {
617 RemoteClient.SendLayerData( Terrain.getHeights1D() );
618 }
615 } 619 }
616} 620}