aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index a32bca5..d767eab 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
137 { 137 {
138 actor.Position.Y = 0.1F; 138 actor.Position.Y = 0.1F;
139 } 139 }
140 else if (actor.Position.Y >= 256) 140 else if (actor.Position.Y >= Constants.RegionSize)
141 { 141 {
142 actor.Position.Y = 255.9F; 142 actor.Position.Y = 255.9F;
143 } 143 }
@@ -146,16 +146,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
146 { 146 {
147 actor.Position.X = 0.1F; 147 actor.Position.X = 0.1F;
148 } 148 }
149 else if (actor.Position.X >= 256) 149 else if (actor.Position.X >= Constants.RegionSize)
150 { 150 {
151 actor.Position.X = 255.9F; 151 actor.Position.X = 255.9F;
152 } 152 }
153 153
154 float height = _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 1.0f; 154 float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 1.0f;
155 if (actor.Flying) 155 if (actor.Flying)
156 { 156 {
157 if (actor.Position.Z + (actor.Velocity.Z*timeStep) < 157 if (actor.Position.Z + (actor.Velocity.Z*timeStep) <
158 _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 2) 158 _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 2)
159 { 159 {
160 actor.Position.Z = height; 160 actor.Position.Z = height;
161 actor.Velocity.Z = 0; 161 actor.Velocity.Z = 0;