aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world
diff options
context:
space:
mode:
Diffstat (limited to 'src/world')
-rw-r--r--src/world/PhysicsEngine.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/world/PhysicsEngine.cs b/src/world/PhysicsEngine.cs
index d9351af..4abf1f2 100644
--- a/src/world/PhysicsEngine.cs
+++ b/src/world/PhysicsEngine.cs
@@ -20,12 +20,12 @@ namespace OpenSim.world
20 public void DoStuff(World simworld) { 20 public void DoStuff(World simworld) {
21 foreach (libsecondlife.LLUUID UUID in simworld.Entities.Keys) 21 foreach (libsecondlife.LLUUID UUID in simworld.Entities.Keys)
22 { 22 {
23 if((simworld.Entities[UUID].position.X>0) & (simworld.Entities[UUID].position.X<256) & (simworld.Entities[UUID].position.Y>1) & (simworld.Entities[UUID].position.Y<256)) {
24 simworld.Entities[UUID].position += simworld.Entities[UUID].velocity; 23 simworld.Entities[UUID].position += simworld.Entities[UUID].velocity;
25 simworld.Entities[UUID].position.Z = simworld.LandMap[(int)simworld.Entities[UUID].position.Y * 256 + (int)simworld.Entities[UUID].position.X]+1; 24 simworld.Entities[UUID].position.Z = simworld.LandMap[(int)simworld.Entities[UUID].position.Y * 256 + (int)simworld.Entities[UUID].position.X]+1;
26 } else { 25 if(simworld.Entities[UUID].position.X<0) simworld.Entities[UUID].position.X=0;
27 simworld.Entities[UUID].velocity = new LLVector3(0f,0f,0f); 26 if(simworld.Entities[UUID].position.Y<0) simworld.Entities[UUID].position.Y=0;
28 } 27 if(simworld.Entities[UUID].position.X>255) simworld.Entities[UUID].position.X=255;
28 if(simworld.Entities[UUID].position.Y>255) simworld.Entities[UUID].position.Y=255;
29 } 29 }
30 } 30 }
31 } 31 }