diff options
author | diva | 2009-02-15 05:00:58 +0000 |
---|---|---|
committer | diva | 2009-02-15 05:00:58 +0000 |
commit | 3d5a9e6748ef743c4db04b427d4d76ea65269618 (patch) | |
tree | 1877a66c0ca1f4caa455a7f98dd221897e687620 /OpenSim/Region | |
parent | Set sculpt map alpha to 255 prior to scaling and meshing. Addresses Mantis #3150 (diff) | |
download | opensim-SC-3d5a9e6748ef743c4db04b427d4d76ea65269618.zip opensim-SC-3d5a9e6748ef743c4db04b427d4d76ea65269618.tar.gz opensim-SC-3d5a9e6748ef743c4db04b427d4d76ea65269618.tar.bz2 opensim-SC-3d5a9e6748ef743c4db04b427d4d76ea65269618.tar.xz |
This started as way to correct Mantis #3158, which I believe should be fixed now. The flying status was temporarily being ignored, which caused the avie to drop sometimes -- there was a race condition. In the process it also fixes that annoying bug in basic physics where the avie would drop half-way to the ground upon region crossings (SetAppearance was missing). Additionally, a lot of child-agent-related code has been cleaned up; namely child agents are now consistently not added to physical scenes, and they also don't have appearances. All of that happens in MakeRoot, consistently.
Diffstat (limited to '')
9 files changed, 47 insertions, 37 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 24cb48a..0f57b7c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2090,8 +2090,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2090 | /// <returns></returns> | 2090 | /// <returns></returns> |
2091 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client) | 2091 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client) |
2092 | { | 2092 | { |
2093 | AvatarAppearance appearance = null; | 2093 | AvatarAppearance appearance = new AvatarAppearance(); |
2094 | GetAvatarAppearance(client, out appearance); | 2094 | //GetAvatarAppearance(client, out appearance); |
2095 | 2095 | ||
2096 | ScenePresence avatar = m_sceneGraph.CreateAndAddChildScenePresence(client, appearance); | 2096 | ScenePresence avatar = m_sceneGraph.CreateAndAddChildScenePresence(client, appearance); |
2097 | //avatar.KnownRegions = GetChildrenSeeds(avatar.UUID); | 2097 | //avatar.KnownRegions = GetChildrenSeeds(avatar.UUID); |
@@ -2339,7 +2339,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2339 | } | 2339 | } |
2340 | 2340 | ||
2341 | // Don't disable this log message - it's too helpful | 2341 | // Don't disable this log message - it's too helpful |
2342 | m_log.DebugFormat( | 2342 | m_log.InfoFormat( |
2343 | "[CONNECTION BEGIN]: Region {0} told of incoming client {1} {2} {3} (circuit code {4})", | 2343 | "[CONNECTION BEGIN]: Region {0} told of incoming client {1} {2} {3} (circuit code {4})", |
2344 | RegionInfo.RegionName, agent.firstname, agent.lastname, agent.AgentID, agent.circuitcode); | 2344 | RegionInfo.RegionName, agent.firstname, agent.lastname, agent.AgentID, agent.circuitcode); |
2345 | 2345 | ||
@@ -3295,7 +3295,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3295 | } | 3295 | } |
3296 | catch (Exception e) | 3296 | catch (Exception e) |
3297 | { | 3297 | { |
3298 | m_log.Info("[BUG]: " + e.ToString()); | 3298 | m_log.Info("[BUG] in " + RegionInfo.RegionName + ": " + e.ToString()); |
3299 | } | 3299 | } |
3300 | } | 3300 | } |
3301 | } | 3301 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 2edfca8..ecce237 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -646,7 +646,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
646 | else | 646 | else |
647 | { | 647 | { |
648 | m_numRootAgents++; | 648 | m_numRootAgents++; |
649 | presence.AddToPhysicalScene(); | 649 | presence.AddToPhysicalScene(false); |
650 | } | 650 | } |
651 | 651 | ||
652 | Entities[presence.UUID] = presence; | 652 | Entities[presence.UUID] = presence; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f841707..a93fcb2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -611,7 +611,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
611 | m_controllingClient.OnRequestWearables += SendWearables; | 611 | m_controllingClient.OnRequestWearables += SendWearables; |
612 | m_controllingClient.OnSetAppearance += SetAppearance; | 612 | m_controllingClient.OnSetAppearance += SetAppearance; |
613 | m_controllingClient.OnCompleteMovementToRegion += CompleteMovement; | 613 | m_controllingClient.OnCompleteMovementToRegion += CompleteMovement; |
614 | m_controllingClient.OnCompleteMovementToRegion += SendInitialData; | 614 | //m_controllingClient.OnCompleteMovementToRegion += SendInitialData; |
615 | m_controllingClient.OnAgentUpdate += HandleAgentUpdate; | 615 | m_controllingClient.OnAgentUpdate += HandleAgentUpdate; |
616 | m_controllingClient.OnAgentRequestSit += HandleAgentRequestSit; | 616 | m_controllingClient.OnAgentRequestSit += HandleAgentRequestSit; |
617 | m_controllingClient.OnAgentSit += HandleAgentSit; | 617 | m_controllingClient.OnAgentSit += HandleAgentSit; |
@@ -829,7 +829,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
829 | pos = emergencyPos; | 829 | pos = emergencyPos; |
830 | } | 830 | } |
831 | 831 | ||
832 | m_isChildAgent = false; | ||
833 | 832 | ||
834 | float localAVHeight = 1.56f; | 833 | float localAVHeight = 1.56f; |
835 | if (m_avHeight != 127.0f) | 834 | if (m_avHeight != 127.0f) |
@@ -845,8 +844,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
845 | } | 844 | } |
846 | AbsolutePosition = pos; | 845 | AbsolutePosition = pos; |
847 | 846 | ||
848 | AddToPhysicalScene(); | 847 | AddToPhysicalScene(isFlying); |
849 | m_physicsActor.Flying = isFlying; | 848 | SetHeight(m_appearance.AvatarHeight); |
850 | 849 | ||
851 | // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying | 850 | // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying |
852 | // avatar to return to the standing position in mid-air. On login it looks like this is being sent | 851 | // avatar to return to the standing position in mid-air. On login it looks like this is being sent |
@@ -861,13 +860,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
861 | else | 860 | else |
862 | m_log.ErrorFormat("[SCENE]: Could not find user info for {0} when making it a root agent", m_uuid); | 861 | m_log.ErrorFormat("[SCENE]: Could not find user info for {0} when making it a root agent", m_uuid); |
863 | 862 | ||
864 | //m_scene.CapsModule.AddCapsHandler(m_uuid); | ||
865 | |||
866 | // On the next prim update, all objects will be sent | 863 | // On the next prim update, all objects will be sent |
867 | // | 864 | // |
868 | m_pendingObjects = null; | 865 | m_pendingObjects = null; |
869 | 866 | ||
867 | m_isChildAgent = false; | ||
868 | |||
869 | SendInitialData(); | ||
870 | |||
870 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | 871 | m_scene.EventManager.TriggerOnMakeRootAgent(this); |
872 | |||
871 | } | 873 | } |
872 | 874 | ||
873 | /// <summary> | 875 | /// <summary> |
@@ -916,10 +918,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
916 | /// <param name="pos"></param> | 918 | /// <param name="pos"></param> |
917 | public void Teleport(Vector3 pos) | 919 | public void Teleport(Vector3 pos) |
918 | { | 920 | { |
921 | bool isFlying = false; | ||
922 | if (m_physicsActor != null) | ||
923 | isFlying = m_physicsActor.Flying; | ||
924 | |||
919 | RemoveFromPhysicalScene(); | 925 | RemoveFromPhysicalScene(); |
920 | Velocity = new Vector3(0, 0, 0); | 926 | Velocity = new Vector3(0, 0, 0); |
921 | AbsolutePosition = pos; | 927 | AbsolutePosition = pos; |
922 | AddToPhysicalScene(); | 928 | AddToPhysicalScene(isFlying); |
923 | SendTerseUpdateToAllClients(); | 929 | SendTerseUpdateToAllClients(); |
924 | } | 930 | } |
925 | 931 | ||
@@ -1021,8 +1027,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1021 | if (m_isChildAgent) | 1027 | if (m_isChildAgent) |
1022 | { | 1028 | { |
1023 | m_isChildAgent = false; | 1029 | m_isChildAgent = false; |
1024 | 1030 | bool m_flying = ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); | |
1025 | MakeRootAgent(AbsolutePosition, false); | 1031 | MakeRootAgent(AbsolutePosition, m_flying); |
1026 | 1032 | ||
1027 | if ((m_callbackURI != null) && !m_callbackURI.Equals("")) | 1033 | if ((m_callbackURI != null) && !m_callbackURI.Equals("")) |
1028 | { | 1034 | { |
@@ -1068,7 +1074,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1068 | m_log.Error("[AVATAR]: NonFinite Avatar position detected... Reset Position. Mantis this please. Error# 9999903"); | 1074 | m_log.Error("[AVATAR]: NonFinite Avatar position detected... Reset Position. Mantis this please. Error# 9999903"); |
1069 | } | 1075 | } |
1070 | 1076 | ||
1071 | AddToPhysicalScene(); | 1077 | AddToPhysicalScene(false); |
1072 | } | 1078 | } |
1073 | else | 1079 | else |
1074 | { | 1080 | { |
@@ -1464,7 +1470,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1464 | 1470 | ||
1465 | if (m_physicsActor == null) | 1471 | if (m_physicsActor == null) |
1466 | { | 1472 | { |
1467 | AddToPhysicalScene(); | 1473 | AddToPhysicalScene(m_physicsActor.Flying); |
1468 | } | 1474 | } |
1469 | 1475 | ||
1470 | m_pos += m_parentPosition + new Vector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); | 1476 | m_pos += m_parentPosition + new Vector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); |
@@ -2231,7 +2237,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2231 | // just to add it back again, but it saves us from having to update | 2237 | // just to add it back again, but it saves us from having to update |
2232 | // 3 variables 10 times a second. | 2238 | // 3 variables 10 times a second. |
2233 | m_scene.PhysicsScene.RemoveAvatar(m_physicsActor); | 2239 | m_scene.PhysicsScene.RemoveAvatar(m_physicsActor); |
2234 | AddToPhysicalScene(); | 2240 | AddToPhysicalScene(m_physicsActor.Flying); |
2235 | } | 2241 | } |
2236 | m_appearance.SetAppearance(texture, visualParam); | 2242 | m_appearance.SetAppearance(texture, visualParam); |
2237 | SetHeight(m_appearance.AvatarHeight); | 2243 | SetHeight(m_appearance.AvatarHeight); |
@@ -2420,12 +2426,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
2420 | protected void CrossToNewRegion() | 2426 | protected void CrossToNewRegion() |
2421 | { | 2427 | { |
2422 | m_inTransit = true; | 2428 | m_inTransit = true; |
2429 | |||
2430 | if ((m_physicsActor != null) && m_physicsActor.Flying) | ||
2431 | m_AgentControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; | ||
2432 | else if ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0) | ||
2433 | m_AgentControlFlags &= ~(uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; | ||
2434 | |||
2423 | m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying); | 2435 | m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying); |
2424 | } | 2436 | } |
2425 | 2437 | ||
2426 | public void RestoreInCurrentScene() | 2438 | public void RestoreInCurrentScene() |
2427 | { | 2439 | { |
2428 | AddToPhysicalScene(); | 2440 | AddToPhysicalScene(false); // not exactly false |
2429 | } | 2441 | } |
2430 | 2442 | ||
2431 | /// <summary> | 2443 | /// <summary> |
@@ -2583,10 +2595,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2583 | cAgent.HeadRotation = m_headrotation; | 2595 | cAgent.HeadRotation = m_headrotation; |
2584 | cAgent.BodyRotation = m_bodyRot; | 2596 | cAgent.BodyRotation = m_bodyRot; |
2585 | cAgent.ControlFlags = m_AgentControlFlags; | 2597 | cAgent.ControlFlags = m_AgentControlFlags; |
2586 | if ((m_physicsActor != null) && (m_physicsActor.Flying)) | ||
2587 | { | ||
2588 | cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; | ||
2589 | } | ||
2590 | 2598 | ||
2591 | if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID))) | 2599 | if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID))) |
2592 | cAgent.GodLevel = (byte)m_godlevel; | 2600 | cAgent.GodLevel = (byte)m_godlevel; |
@@ -2625,10 +2633,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2625 | m_headrotation = cAgent.HeadRotation; | 2633 | m_headrotation = cAgent.HeadRotation; |
2626 | m_bodyRot = cAgent.BodyRotation; | 2634 | m_bodyRot = cAgent.BodyRotation; |
2627 | m_AgentControlFlags = cAgent.ControlFlags; // We need more flags! | 2635 | m_AgentControlFlags = cAgent.ControlFlags; // We need more flags! |
2628 | if (m_physicsActor != null) | 2636 | |
2629 | { | ||
2630 | m_physicsActor.Flying = ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); | ||
2631 | } | ||
2632 | if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID))) | 2637 | if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID))) |
2633 | m_godlevel = cAgent.GodLevel; | 2638 | m_godlevel = cAgent.GodLevel; |
2634 | m_setAlwaysRun = cAgent.AlwaysRun; | 2639 | m_setAlwaysRun = cAgent.AlwaysRun; |
@@ -2755,7 +2760,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2755 | /// <summary> | 2760 | /// <summary> |
2756 | /// Adds a physical representation of the avatar to the Physics plugin | 2761 | /// Adds a physical representation of the avatar to the Physics plugin |
2757 | /// </summary> | 2762 | /// </summary> |
2758 | public void AddToPhysicalScene() | 2763 | public void AddToPhysicalScene(bool isFlying) |
2759 | { | 2764 | { |
2760 | PhysicsScene scene = m_scene.PhysicsScene; | 2765 | PhysicsScene scene = m_scene.PhysicsScene; |
2761 | 2766 | ||
@@ -2765,13 +2770,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2765 | 2770 | ||
2766 | if (m_avHeight == 127.0f) | 2771 | if (m_avHeight == 127.0f) |
2767 | { | 2772 | { |
2768 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new PhysicsVector(0, 0, 1.56f)); | 2773 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new PhysicsVector(0, 0, 1.56f), isFlying); |
2769 | } | 2774 | } |
2770 | else | 2775 | else |
2771 | { | 2776 | { |
2772 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new PhysicsVector(0, 0, m_avHeight)); | 2777 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new PhysicsVector(0, 0, m_avHeight), isFlying); |
2773 | } | 2778 | } |
2774 | 2779 | ||
2775 | //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; | 2780 | //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; |
2776 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; | 2781 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; |
2777 | m_physicsActor.SubscribeEvents(1000); | 2782 | m_physicsActor.SubscribeEvents(1000); |
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 010d9d3..3081077 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | |||
@@ -83,10 +83,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
83 | { | 83 | { |
84 | 84 | ||
85 | } | 85 | } |
86 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) | 86 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) |
87 | { | 87 | { |
88 | BasicActor act = new BasicActor(); | 88 | BasicActor act = new BasicActor(); |
89 | act.Position = position; | 89 | act.Position = position; |
90 | act.Flying = isFlying; | ||
90 | _actors.Add(act); | 91 | _actors.Add(act); |
91 | return act; | 92 | return act; |
92 | } | 93 | } |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 29a19de..8891163 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -573,13 +573,14 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
573 | 573 | ||
574 | } | 574 | } |
575 | 575 | ||
576 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) | 576 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) |
577 | { | 577 | { |
578 | PhysicsVector pos = new PhysicsVector(); | 578 | PhysicsVector pos = new PhysicsVector(); |
579 | pos.X = position.X; | 579 | pos.X = position.X; |
580 | pos.Y = position.Y; | 580 | pos.Y = position.Y; |
581 | pos.Z = position.Z + 20; | 581 | pos.Z = position.Z + 20; |
582 | BulletXCharacter newAv = null; | 582 | BulletXCharacter newAv = null; |
583 | newAv.Flying = isFlying; | ||
583 | lock (BulletXLock) | 584 | lock (BulletXLock) |
584 | { | 585 | { |
585 | newAv = new BulletXCharacter(avName, this, pos); | 586 | newAv = new BulletXCharacter(avName, this, pos); |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 2cf4d5a..fbf92a9 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Physics.Manager | |||
62 | 62 | ||
63 | public abstract void Initialise(IMesher meshmerizer, IConfigSource config); | 63 | public abstract void Initialise(IMesher meshmerizer, IConfigSource config); |
64 | 64 | ||
65 | public abstract PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size); | 65 | public abstract PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying); |
66 | 66 | ||
67 | public abstract void RemoveAvatar(PhysicsActor actor); | 67 | public abstract void RemoveAvatar(PhysicsActor actor); |
68 | 68 | ||
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Physics.Manager | |||
162 | // Does nothing right now | 162 | // Does nothing right now |
163 | } | 163 | } |
164 | 164 | ||
165 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) | 165 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) |
166 | { | 166 | { |
167 | m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position); | 167 | m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position); |
168 | return PhysicsActor.Null; | 168 | return PhysicsActor.Null; |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index ae47636..f30de4d 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -1313,13 +1313,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1313 | 1313 | ||
1314 | #region Add/Remove Entities | 1314 | #region Add/Remove Entities |
1315 | 1315 | ||
1316 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) | 1316 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) |
1317 | { | 1317 | { |
1318 | PhysicsVector pos = new PhysicsVector(); | 1318 | PhysicsVector pos = new PhysicsVector(); |
1319 | pos.X = position.X; | 1319 | pos.X = position.X; |
1320 | pos.Y = position.Y; | 1320 | pos.Y = position.Y; |
1321 | pos.Z = position.Z; | 1321 | pos.Z = position.Z; |
1322 | OdeCharacter newAv = new OdeCharacter(avName, this, pos, ode, size, avPIDD, avPIDP, avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, avMovementDivisorWalk, avMovementDivisorRun); | 1322 | OdeCharacter newAv = new OdeCharacter(avName, this, pos, ode, size, avPIDD, avPIDP, avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, avMovementDivisorWalk, avMovementDivisorRun); |
1323 | newAv.Flying = isFlying; | ||
1323 | _characters.Add(newAv); | 1324 | _characters.Add(newAv); |
1324 | return newAv; | 1325 | return newAv; |
1325 | } | 1326 | } |
diff --git a/OpenSim/Region/Physics/POSPlugin/POSScene.cs b/OpenSim/Region/Physics/POSPlugin/POSScene.cs index 44a105d..84ffe5f 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSScene.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSScene.cs | |||
@@ -56,10 +56,11 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
56 | { | 56 | { |
57 | } | 57 | } |
58 | 58 | ||
59 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) | 59 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) |
60 | { | 60 | { |
61 | POSCharacter act = new POSCharacter(); | 61 | POSCharacter act = new POSCharacter(); |
62 | act.Position = position; | 62 | act.Position = position; |
63 | act.Flying = isFlying; | ||
63 | _characters.Add(act); | 64 | _characters.Add(act); |
64 | return act; | 65 | return act; |
65 | } | 66 | } |
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index fa59dbe..18935fb 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | |||
@@ -102,13 +102,14 @@ namespace OpenSim.Region.Physics.PhysXPlugin | |||
102 | 102 | ||
103 | } | 103 | } |
104 | 104 | ||
105 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) | 105 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) |
106 | { | 106 | { |
107 | Vec3 pos = new Vec3(); | 107 | Vec3 pos = new Vec3(); |
108 | pos.X = position.X; | 108 | pos.X = position.X; |
109 | pos.Y = position.Y; | 109 | pos.Y = position.Y; |
110 | pos.Z = position.Z; | 110 | pos.Z = position.Z; |
111 | PhysXCharacter act = new PhysXCharacter(scene.AddCharacter(pos)); | 111 | PhysXCharacter act = new PhysXCharacter(scene.AddCharacter(pos)); |
112 | act.Flying = isFlying; | ||
112 | act.Position = position; | 113 | act.Position = position; |
113 | _characters.Add(act); | 114 | _characters.Add(act); |
114 | return act; | 115 | return act; |