diff options
author | dan miller | 2007-11-17 22:43:05 +0000 |
---|---|---|
committer | dan miller | 2007-11-17 22:43:05 +0000 |
commit | 7c18c6966836700e4c5528429b8a2aa2e37a65e6 (patch) | |
tree | ba08ac97ba54db0a7603babd2a631c42b0e50f30 /OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | |
parent | * Fix Null comparison for Mono (diff) | |
download | opensim-SC-7c18c6966836700e4c5528429b8a2aa2e37a65e6.zip opensim-SC-7c18c6966836700e4c5528429b8a2aa2e37a65e6.tar.gz opensim-SC-7c18c6966836700e4c5528429b8a2aa2e37a65e6.tar.bz2 opensim-SC-7c18c6966836700e4c5528429b8a2aa2e37a65e6.tar.xz |
minor POS tweak for speed
Diffstat (limited to 'OpenSim/Region/Physics/POSPlugin/POSPlugin.cs')
-rw-r--r-- | OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index 635e430..6906451 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | |||
@@ -135,20 +135,19 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
135 | " absX: " + Math.Abs(p.Position.X - c.Position.X) + | 135 | " absX: " + Math.Abs(p.Position.X - c.Position.X) + |
136 | " sizeX: " + p.Size.X * 0.5 + 0.5); | 136 | " sizeX: " + p.Size.X * 0.5 + 0.5); |
137 | */ | 137 | */ |
138 | bool collides = true; | ||
139 | if (Math.Abs(p.Position.X - c.Position.X) >= (p.Size.X * 0.5 + 0.5)) | 138 | if (Math.Abs(p.Position.X - c.Position.X) >= (p.Size.X * 0.5 + 0.5)) |
140 | { | 139 | { |
141 | collides = false; | 140 | return false; |
142 | } | 141 | } |
143 | if (Math.Abs(p.Position.Y - c.Position.Y) >= (p.Size.Y * 0.5 + 0.5)) | 142 | if (Math.Abs(p.Position.Y - c.Position.Y) >= (p.Size.Y * 0.5 + 0.5)) |
144 | { | 143 | { |
145 | collides = false; | 144 | return false; |
146 | } | 145 | } |
147 | if (Math.Abs(p.Position.Z - c.Position.Z) >= (p.Size.Z * 0.5 + 1.0)) | 146 | if (Math.Abs(p.Position.Z - c.Position.Z) >= (p.Size.Z * 0.5 + 1.0)) |
148 | { | 147 | { |
149 | collides = false; | 148 | return false; |
150 | } | 149 | } |
151 | return collides; | 150 | return true; |
152 | } | 151 | } |
153 | 152 | ||
154 | public override void Simulate(float timeStep) | 153 | public override void Simulate(float timeStep) |