diff options
Diffstat (limited to '')
4 files changed, 26 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b6eae8e..7602d6b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3450,9 +3450,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
3450 | 3450 | ||
3451 | Vector3 pVec = AbsolutePosition; | 3451 | Vector3 pVec = AbsolutePosition; |
3452 | 3452 | ||
3453 | /* | ||
3453 | PhysicsActor = scene.AddAvatar( | 3454 | PhysicsActor = scene.AddAvatar( |
3454 | LocalId, Firstname + "." + Lastname, pVec, | 3455 | LocalId, Firstname + "." + Lastname, pVec, |
3455 | new Vector3(0.45f, 0.6f, Appearance.AvatarHeight), isFlying); | 3456 | new Vector3(0.45f, 0.6f, Appearance.AvatarHeight), isFlying); |
3457 | */ | ||
3458 | |||
3459 | PhysicsActor = scene.AddAvatar( | ||
3460 | LocalId, Firstname + "." + Lastname, pVec, | ||
3461 | Appearance.AvatarBoxSize,Appearance.AvatarFeetOffset, isFlying); | ||
3456 | 3462 | ||
3457 | //PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; | 3463 | //PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; |
3458 | PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; | 3464 | PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index ce269fa..c07213e 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -127,8 +127,10 @@ namespace OpenSim.Region.Physics.Manager | |||
127 | /// <param name="size"></param> | 127 | /// <param name="size"></param> |
128 | /// <param name="isFlying"></param> | 128 | /// <param name="isFlying"></param> |
129 | /// <returns></returns> | 129 | /// <returns></returns> |
130 | public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying); | 130 | public virtual PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying) |
131 | 131 | { | |
132 | return null; | ||
133 | } | ||
132 | /// <summary> | 134 | /// <summary> |
133 | /// Add an avatar | 135 | /// Add an avatar |
134 | /// </summary> | 136 | /// </summary> |
@@ -145,6 +147,18 @@ namespace OpenSim.Region.Physics.Manager | |||
145 | return ret; | 147 | return ret; |
146 | } | 148 | } |
147 | 149 | ||
150 | public virtual PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size,float feetOffset, bool isFlying) | ||
151 | { | ||
152 | return null; | ||
153 | } | ||
154 | |||
155 | public virtual PhysicsActor AddAvatar(uint localID,string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying) | ||
156 | { | ||
157 | PhysicsActor ret = AddAvatar(avName, position, size,feetOffset, isFlying); | ||
158 | if (ret != null) ret.LocalID = localID; | ||
159 | return ret; | ||
160 | } | ||
161 | |||
148 | /// <summary> | 162 | /// <summary> |
149 | /// Remove an avatar. | 163 | /// Remove an avatar. |
150 | /// </summary> | 164 | /// </summary> |
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs index 9c245e6..15bdc57 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | |||
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
156 | 156 | ||
157 | 157 | ||
158 | 158 | ||
159 | public OdeCharacter(String avName, OdeScene parent_scene, Vector3 pos, Vector3 pSize, float density, float walk_divisor, float rundivisor) | 159 | public OdeCharacter(String avName, OdeScene parent_scene, Vector3 pos, Vector3 pSize, float pfeetOffset, float density, float walk_divisor, float rundivisor) |
160 | { | 160 | { |
161 | m_uuid = UUID.Random(); | 161 | m_uuid = UUID.Random(); |
162 | 162 | ||
@@ -192,6 +192,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
192 | if(m_size.Z <0.01f) | 192 | if(m_size.Z <0.01f) |
193 | m_size.Z = 0.01f; | 193 | m_size.Z = 0.01f; |
194 | 194 | ||
195 | m_feetOffset = pfeetOffset; | ||
195 | m_orientation = Quaternion.Identity; | 196 | m_orientation = Quaternion.Identity; |
196 | m_density = density; | 197 | m_density = density; |
197 | 198 | ||
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index 7d1d2fe..2ba5940 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | |||
@@ -1388,13 +1388,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1388 | 1388 | ||
1389 | #region Add/Remove Entities | 1389 | #region Add/Remove Entities |
1390 | 1390 | ||
1391 | public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying) | 1391 | public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying) |
1392 | { | 1392 | { |
1393 | Vector3 pos; | 1393 | Vector3 pos; |
1394 | pos.X = position.X; | 1394 | pos.X = position.X; |
1395 | pos.Y = position.Y; | 1395 | pos.Y = position.Y; |
1396 | pos.Z = position.Z; | 1396 | pos.Z = position.Z; |
1397 | OdeCharacter newAv = new OdeCharacter(avName, this, pos, size, avDensity, avMovementDivisorWalk, avMovementDivisorRun); | 1397 | OdeCharacter newAv = new OdeCharacter(avName, this, pos, size, feetOffset, avDensity, avMovementDivisorWalk, avMovementDivisorRun); |
1398 | newAv.Flying = isFlying; | 1398 | newAv.Flying = isFlying; |
1399 | newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset; | 1399 | newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset; |
1400 | 1400 | ||