diff options
Diffstat (limited to 'OpenSim.RegionServer/world')
-rw-r--r-- | OpenSim.RegionServer/world/Avatar.cs | 6 | ||||
-rw-r--r-- | OpenSim.RegionServer/world/AvatarUpdate.cs | 47 | ||||
-rw-r--r-- | OpenSim.RegionServer/world/World.cs | 6 |
3 files changed, 33 insertions, 26 deletions
diff --git a/OpenSim.RegionServer/world/Avatar.cs b/OpenSim.RegionServer/world/Avatar.cs index b6b8282..54043fc 100644 --- a/OpenSim.RegionServer/world/Avatar.cs +++ b/OpenSim.RegionServer/world/Avatar.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.world | |||
44 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs - Loading details from grid (DUMMY)"); | 44 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs - Loading details from grid (DUMMY)"); |
45 | ControllingClient = TheClient; | 45 | ControllingClient = TheClient; |
46 | localid = 8880000 + (this.m_world._localNumber++); | 46 | localid = 8880000 + (this.m_world._localNumber++); |
47 | Pos = ControllingClient.startpos; | 47 | Pos = ControllingClient.startpos; |
48 | visualParams = new byte[218]; | 48 | visualParams = new byte[218]; |
49 | for (int i = 0; i < 218; i++) | 49 | for (int i = 0; i < 218; i++) |
50 | { | 50 | { |
@@ -59,7 +59,7 @@ namespace OpenSim.world | |||
59 | this.Wearables[0].ItemID = LLUUID.Random(); | 59 | this.Wearables[0].ItemID = LLUUID.Random(); |
60 | 60 | ||
61 | this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); | 61 | this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); |
62 | 62 | ||
63 | } | 63 | } |
64 | 64 | ||
65 | public PhysicsActor PhysActor | 65 | public PhysicsActor PhysActor |
@@ -307,7 +307,7 @@ namespace OpenSim.world | |||
307 | handshake.RegionInfo.TerrainStartHeight11 = 10; | 307 | handshake.RegionInfo.TerrainStartHeight11 = 10; |
308 | handshake.RegionInfo.SimAccess = 13; | 308 | handshake.RegionInfo.SimAccess = 13; |
309 | handshake.RegionInfo.WaterHeight = 20; | 309 | handshake.RegionInfo.WaterHeight = 20; |
310 | handshake.RegionInfo.RegionFlags = 72458694 -32; | 310 | handshake.RegionInfo.RegionFlags = 72458694 - 32; |
311 | handshake.RegionInfo.SimName = _enc.GetBytes(m_regionName + "\0"); | 311 | handshake.RegionInfo.SimName = _enc.GetBytes(m_regionName + "\0"); |
312 | handshake.RegionInfo.SimOwner = new LLUUID("00000000-0000-0000-0000-000000000000"); | 312 | handshake.RegionInfo.SimOwner = new LLUUID("00000000-0000-0000-0000-000000000000"); |
313 | handshake.RegionInfo.TerrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); | 313 | handshake.RegionInfo.TerrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); |
diff --git a/OpenSim.RegionServer/world/AvatarUpdate.cs b/OpenSim.RegionServer/world/AvatarUpdate.cs index c2f2456..6c0ace7 100644 --- a/OpenSim.RegionServer/world/AvatarUpdate.cs +++ b/OpenSim.RegionServer/world/AvatarUpdate.cs | |||
@@ -59,24 +59,31 @@ namespace OpenSim.world | |||
59 | } | 59 | } |
60 | 60 | ||
61 | } | 61 | } |
62 | this.positionLastFrame = pos2; | 62 | this.positionLastFrame = pos2; |
63 | 63 | ||
64 | if(this._physActor.Position.X < 0) { | 64 | if (!this.ControllingClient.m_sandboxMode) |
65 | ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X,this._physActor.Position.Y,this._physActor.Position.Z)); | 65 | { |
66 | } | 66 | if (pos2.X < 0) |
67 | 67 | { | |
68 | if(this._physActor.Position.Y < 0) { | 68 | ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z)); |
69 | ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X,this._physActor.Position.Y,this._physActor.Position.Z)); | 69 | } |
70 | } | 70 | |
71 | 71 | if (pos2.Y < 0) | |
72 | if(this._physActor.Position.X > 255) { | 72 | { |
73 | ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X,this._physActor.Position.Y,this._physActor.Position.Z)); | 73 | ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z)); |
74 | } | 74 | } |
75 | 75 | ||
76 | if(this._physActor.Position.Y > 255) { | 76 | if (pos2.X > 255) |
77 | ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X,this._physActor.Position.Y,this._physActor.Position.Z)); | 77 | { |
78 | } | 78 | ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z)); |
79 | 79 | } | |
80 | |||
81 | if (pos2.Y > 255) | ||
82 | { | ||
83 | ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z)); | ||
84 | } | ||
85 | } | ||
86 | |||
80 | } | 87 | } |
81 | 88 | ||
82 | public ObjectUpdatePacket CreateUpdatePacket() | 89 | public ObjectUpdatePacket CreateUpdatePacket() |
@@ -106,8 +113,8 @@ namespace OpenSim.world | |||
106 | { | 113 | { |
107 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; | 114 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; |
108 | //send a objectupdate packet with information about the clients avatar | 115 | //send a objectupdate packet with information about the clients avatar |
109 | 116 | ||
110 | ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); | 117 | ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); |
111 | objupdate.RegionData.RegionHandle = m_regionHandle; | 118 | objupdate.RegionData.RegionHandle = m_regionHandle; |
112 | objupdate.RegionData.TimeDilation = 64096; | 119 | objupdate.RegionData.TimeDilation = 64096; |
113 | objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; | 120 | objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; |
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 425a135..749305f 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs | |||
@@ -371,13 +371,13 @@ 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 | PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); |
376 | lock (this.LockPhysicsEngine) | 376 | lock (this.LockPhysicsEngine) |
377 | { | 377 | { |
378 | newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); | 378 | newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); |
379 | } | 379 | } |
380 | } | 380 | } |
381 | lock (Entities) | 381 | lock (Entities) |
382 | { | 382 | { |
383 | this.Entities.Add(agentClient.AgentID, newAvatar); | 383 | this.Entities.Add(agentClient.AgentID, newAvatar); |
@@ -385,7 +385,7 @@ namespace OpenSim.world | |||
385 | lock (Avatars) | 385 | lock (Avatars) |
386 | { | 386 | { |
387 | this.Avatars.Add(agentClient.AgentID, newAvatar); | 387 | this.Avatars.Add(agentClient.AgentID, newAvatar); |
388 | } | 388 | } |
389 | 389 | ||
390 | } | 390 | } |
391 | 391 | ||