diff options
author | MW | 2007-04-17 12:25:20 +0000 |
---|---|---|
committer | MW | 2007-04-17 12:25:20 +0000 |
commit | 2180bdf64afa27ecbccf1eed163eec4b2414f87d (patch) | |
tree | ea35db5e9a29890dd4ec891ac12fdc9c73071b00 | |
parent | A few fixes and stopped sim crossing being attempted in sandbox mode (diff) | |
download | opensim-SC_OLD-2180bdf64afa27ecbccf1eed163eec4b2414f87d.zip opensim-SC_OLD-2180bdf64afa27ecbccf1eed163eec4b2414f87d.tar.gz opensim-SC_OLD-2180bdf64afa27ecbccf1eed163eec4b2414f87d.tar.bz2 opensim-SC_OLD-2180bdf64afa27ecbccf1eed163eec4b2414f87d.tar.xz |
Hopefully undid the murder I committed in the last commit
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 4 | ||||
-rw-r--r-- | OpenSim.RegionServer/world/World.cs | 43 |
2 files changed, 25 insertions, 22 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index b729c6c..0c90dcb 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs | |||
@@ -144,7 +144,9 @@ namespace OpenSim | |||
144 | 144 | ||
145 | public void CrossSimBorder(LLVector3 avatarpos) | 145 | public void CrossSimBorder(LLVector3 avatarpos) |
146 | { // VERY VERY BASIC | 146 | { // VERY VERY BASIC |
147 | LLVector3 newpos = this.m_regionData.RegionLocX; | 147 | |
148 | LLVector3 newpos = avatarpos; | ||
149 | uint neighbourx = this.m_regionData.RegionLocX; | ||
148 | uint neighboury = this.m_regionData.RegionLocY; | 150 | uint neighboury = this.m_regionData.RegionLocY; |
149 | 151 | ||
150 | if (avatarpos.X < 0) | 152 | if (avatarpos.X < 0) |
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 749305f..56f5edb 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs | |||
@@ -24,7 +24,7 @@ namespace OpenSim.world | |||
24 | public Dictionary<libsecondlife.LLUUID, Entity> Entities; | 24 | public Dictionary<libsecondlife.LLUUID, Entity> Entities; |
25 | public Dictionary<libsecondlife.LLUUID, Avatar> Avatars; | 25 | public Dictionary<libsecondlife.LLUUID, Avatar> Avatars; |
26 | public Dictionary<libsecondlife.LLUUID, Primitive> Prims; | 26 | public Dictionary<libsecondlife.LLUUID, Primitive> Prims; |
27 | // public float[] LandMap; | 27 | // public float[] LandMap; |
28 | public ScriptEngine Scripts; | 28 | public ScriptEngine Scripts; |
29 | public TerrainEngine Terrain; //TODO: Replace TerrainManager with this. | 29 | public TerrainEngine Terrain; //TODO: Replace TerrainManager with this. |
30 | public uint _localNumber = 0; | 30 | public uint _localNumber = 0; |
@@ -88,21 +88,21 @@ namespace OpenSim.world | |||
88 | 88 | ||
89 | ScriptFactory scriptFactory; | 89 | ScriptFactory scriptFactory; |
90 | //Console.WriteLine("script string is " + substring); | 90 | //Console.WriteLine("script string is " + substring); |
91 | if(substring.StartsWith("<ScriptEngine:")) | 91 | if (substring.StartsWith("<ScriptEngine:")) |
92 | { | 92 | { |
93 | string substring1 = ""; | 93 | string substring1 = ""; |
94 | string script = ""; | 94 | string script = ""; |
95 | // Console.WriteLine("searching for script engine"); | 95 | // Console.WriteLine("searching for script engine"); |
96 | substring1 = substring.Remove(0, 14); | 96 | substring1 = substring.Remove(0, 14); |
97 | int dev = substring1.IndexOf(','); | 97 | int dev = substring1.IndexOf(','); |
98 | string sEngine = substring1.Substring(0, dev); | 98 | string sEngine = substring1.Substring(0, dev); |
99 | substring1 = substring1.Remove(0, dev+1); | 99 | substring1 = substring1.Remove(0, dev + 1); |
100 | int end = substring1.IndexOf('>'); | 100 | int end = substring1.IndexOf('>'); |
101 | string sName = substring1.Substring(0, end); | 101 | string sName = substring1.Substring(0, end); |
102 | //Console.WriteLine(" script info : " + sEngine + " , " + sName); | 102 | //Console.WriteLine(" script info : " + sEngine + " , " + sName); |
103 | int startscript = substring.IndexOf('>'); | 103 | int startscript = substring.IndexOf('>'); |
104 | script = substring.Remove(0, startscript + 1); | 104 | script = substring.Remove(0, startscript + 1); |
105 | // Console.WriteLine("script data is " + script); | 105 | // Console.WriteLine("script data is " + script); |
106 | if (this.scriptEngines.ContainsKey(sEngine)) | 106 | if (this.scriptEngines.ContainsKey(sEngine)) |
107 | { | 107 | { |
108 | this.scriptEngines[sEngine].LoadScript(script, sName, entity.localid); | 108 | this.scriptEngines[sEngine].LoadScript(script, sName, entity.localid); |
@@ -281,7 +281,7 @@ namespace OpenSim.world | |||
281 | { | 281 | { |
282 | Console.WriteLine("creating new terrain"); | 282 | Console.WriteLine("creating new terrain"); |
283 | this.Terrain.hills(); | 283 | this.Terrain.hills(); |
284 | 284 | ||
285 | //this.localStorage.SaveMap(this.Terrain.map); | 285 | //this.localStorage.SaveMap(this.Terrain.map); |
286 | } | 286 | } |
287 | else | 287 | else |
@@ -371,21 +371,22 @@ namespace OpenSim.world | |||
371 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world"); | 371 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world"); |
372 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake "); | 372 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake "); |
373 | newAvatar.SendRegionHandshake(this); | 373 | newAvatar.SendRegionHandshake(this); |
374 | if(!agentClient.m_child) { | 374 | if (!agentClient.m_child) |
375 | PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); | 375 | { |
376 | lock (this.LockPhysicsEngine) | 376 | PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); |
377 | { | 377 | lock (this.LockPhysicsEngine) |
378 | newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); | 378 | { |
379 | } | 379 | newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); |
380 | } | 380 | } |
381 | lock (Entities) | 381 | } |
382 | { | 382 | lock (Entities) |
383 | this.Entities.Add(agentClient.AgentID, newAvatar); | 383 | { |
384 | } | 384 | this.Entities.Add(agentClient.AgentID, newAvatar); |
385 | lock (Avatars) | 385 | } |
386 | { | 386 | lock (Avatars) |
387 | this.Avatars.Add(agentClient.AgentID, newAvatar); | 387 | { |
388 | } | 388 | this.Avatars.Add(agentClient.AgentID, newAvatar); |
389 | } | ||
389 | 390 | ||
390 | } | 391 | } |
391 | 392 | ||