aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world/World.cs
diff options
context:
space:
mode:
authorMW2007-03-02 18:24:54 +0000
committerMW2007-03-02 18:24:54 +0000
commitacc98fca7b3890ce865fb440737865aa7765a671 (patch)
treec0f56f7ea5c6bd98a15a65fcc1fb508523b982ec /src/world/World.cs
parentA example of how the physics plugins might work (diff)
downloadopensim-SC_OLD-acc98fca7b3890ce865fb440737865aa7765a671.zip
opensim-SC_OLD-acc98fca7b3890ce865fb440737865aa7765a671.tar.gz
opensim-SC_OLD-acc98fca7b3890ce865fb440737865aa7765a671.tar.bz2
opensim-SC_OLD-acc98fca7b3890ce865fb440737865aa7765a671.tar.xz
r105 somehow got put in wrong place, so replacing files
Diffstat (limited to '')
-rw-r--r--src/world/World.cs30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/world/World.cs b/src/world/World.cs
index 920220f..ebbd61e 100644
--- a/src/world/World.cs
+++ b/src/world/World.cs
@@ -3,7 +3,6 @@ using libsecondlife;
3using libsecondlife.Packets; 3using libsecondlife.Packets;
4using System.Collections.Generic; 4using System.Collections.Generic;
5using System.Text; 5using System.Text;
6using PhysicsManager;
7 6
8namespace OpenSim.world 7namespace OpenSim.world
9{ 8{
@@ -14,8 +13,6 @@ namespace OpenSim.world
14 public ScriptEngine Scripts; 13 public ScriptEngine Scripts;
15 public TerrainDecode terrainengine = new TerrainDecode(); 14 public TerrainDecode terrainengine = new TerrainDecode();
16 public uint _localNumber=0; 15 public uint _localNumber=0;
17 private PhysicsScene phyScene;
18 private float timeStep= 0.1f;
19 16
20 private Random Rand = new Random(); 17 private Random Rand = new Random();
21 18
@@ -35,30 +32,9 @@ namespace OpenSim.world
35 // Initialise this only after the world has loaded 32 // Initialise this only after the world has loaded
36 Scripts = new ScriptEngine(this); 33 Scripts = new ScriptEngine(this);
37 } 34 }
38 35
39 public PhysicsScene PhysScene
40 {
41 set
42 {
43 this.phyScene = value;
44 }
45 }
46
47 public void Update() 36 public void Update()
48 { 37 {
49 if(this.phyScene.IsThreaded)
50 {
51 this.phyScene.GetResults();
52
53 }
54
55 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
56 {
57 Entities[UUID].addFroces();
58 }
59
60 this.phyScene.Simulate(timeStep);
61
62 foreach (libsecondlife.LLUUID UUID in Entities.Keys) 38 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
63 { 39 {
64 Entities[UUID].update(); 40 Entities[UUID].update();
@@ -79,9 +55,7 @@ namespace OpenSim.world
79 this.Entities.Add(AgentClient.AgentID, NewAvatar); 55 this.Entities.Add(AgentClient.AgentID, NewAvatar);
80 Console.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake "); 56 Console.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake ");
81 NewAvatar.SendRegionHandshake(this); 57 NewAvatar.SendRegionHandshake(this);
82 58 this.Update(); // will work for now, but needs to be optimised so we don't update everything in the sim for each new user
83 NewAvatar.PhysActor = this.phyScene.AddAvatar(new PhysicsVector(NewAvatar.position.x, NewAvatar.position.y, NewAvatar.position.z));
84 //this.Update(); // will work for now, but needs to be optimised so we don't update everything in the sim for each new user
85 } 59 }
86 60
87 public bool Backup() { 61 public bool Backup() {