diff options
Diffstat (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs')
-rw-r--r-- | OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index cacb9eb..6a27f46 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | |||
@@ -152,7 +152,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
152 | actor.Position.X = 255.9F; | 152 | actor.Position.X = 255.9F; |
153 | } | 153 | } |
154 | 154 | ||
155 | float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 1.0f; | 155 | float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z; |
156 | if (actor.Flying) | 156 | if (actor.Flying) |
157 | { | 157 | { |
158 | if (actor.Position.Z + (actor.Velocity.Z*timeStep) < | 158 | if (actor.Position.Z + (actor.Velocity.Z*timeStep) < |
@@ -210,15 +210,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
210 | private PhysicsVector _position; | 210 | private PhysicsVector _position; |
211 | private PhysicsVector _velocity; | 211 | private PhysicsVector _velocity; |
212 | private PhysicsVector _acceleration; | 212 | private PhysicsVector _acceleration; |
213 | private PhysicsVector _size; | ||
213 | private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; | 214 | private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; |
214 | private bool flying; | 215 | private bool flying; |
215 | private bool iscolliding; | 216 | private bool iscolliding; |
216 | |||
217 | public BasicActor() | 217 | public BasicActor() |
218 | { | 218 | { |
219 | _velocity = new PhysicsVector(); | 219 | _velocity = new PhysicsVector(); |
220 | _position = new PhysicsVector(); | 220 | _position = new PhysicsVector(); |
221 | _acceleration = new PhysicsVector(); | 221 | _acceleration = new PhysicsVector(); |
222 | _size = new PhysicsVector(); | ||
222 | } | 223 | } |
223 | 224 | ||
224 | public override int PhysicsActorType | 225 | public override int PhysicsActorType |
@@ -315,8 +316,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
315 | 316 | ||
316 | public override PhysicsVector Size | 317 | public override PhysicsVector Size |
317 | { | 318 | { |
318 | get { return PhysicsVector.Zero; } | 319 | get { return _size; } |
319 | set { } | 320 | set { |
321 | _size = value; | ||
322 | _size.Z = _size.Z / 2.0f; | ||
323 | } | ||
320 | } | 324 | } |
321 | 325 | ||
322 | public override PrimitiveBaseShape Shape | 326 | public override PrimitiveBaseShape Shape |