diff options
author | teravus | 2012-10-09 09:26:11 -0400 |
---|---|---|
committer | teravus | 2012-10-09 09:26:11 -0400 |
commit | 764270a0d81ef3aeba9ceb2eb50eab74a4707a95 (patch) | |
tree | cd2e49b1c2fd58bb7578c91f4b780d739baed9da /OpenSim/Region | |
parent | minor: Add documentation to IGridService.GetRegionFlags() (diff) | |
download | opensim-SC-764270a0d81ef3aeba9ceb2eb50eab74a4707a95.zip opensim-SC-764270a0d81ef3aeba9ceb2eb50eab74a4707a95.tar.gz opensim-SC-764270a0d81ef3aeba9ceb2eb50eab74a4707a95.tar.bz2 opensim-SC-764270a0d81ef3aeba9ceb2eb50eab74a4707a95.tar.xz |
Add config option to plant avatar where they are reducing avatar avatar 'pushability' av_planted see OpenSimDefaults.ini. Use when you have unruly visitors that rudely push each other around. Still allows a small amount of movement based on the avatar movement PID controller settings. You can increase the spring tension in the PID controller and really prevent any movement if you would like.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index f3b0630..c736557 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -100,7 +100,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
100 | private bool m_hackSentFly = false; | 100 | private bool m_hackSentFly = false; |
101 | private int m_requestedUpdateFrequency = 0; | 101 | private int m_requestedUpdateFrequency = 0; |
102 | private Vector3 m_taintPosition; | 102 | private Vector3 m_taintPosition; |
103 | 103 | internal bool m_avatarplanted = false; | |
104 | /// <summary> | 104 | /// <summary> |
105 | /// Hold set forces so we can process them outside physics calculations. This prevents race conditions if we set force | 105 | /// Hold set forces so we can process them outside physics calculations. This prevents race conditions if we set force |
106 | /// while calculatios are going on | 106 | /// while calculatios are going on |
@@ -413,7 +413,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
413 | set | 413 | set |
414 | { | 414 | { |
415 | m_iscollidingObj = value; | 415 | m_iscollidingObj = value; |
416 | if (value) | 416 | if (value && !m_avatarplanted) |
417 | m_pidControllerActive = false; | 417 | m_pidControllerActive = false; |
418 | else | 418 | else |
419 | m_pidControllerActive = true; | 419 | m_pidControllerActive = true; |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 7a50c4c..8421cdf 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -501,6 +501,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
501 | public int physics_logging_interval = 0; | 501 | public int physics_logging_interval = 0; |
502 | public bool physics_logging_append_existing_logfile = false; | 502 | public bool physics_logging_append_existing_logfile = false; |
503 | 503 | ||
504 | private bool avplanted = false; | ||
505 | |||
504 | 506 | ||
505 | public d.Vector3 xyz = new d.Vector3(128.1640f, 128.3079f, 25.7600f); | 507 | public d.Vector3 xyz = new d.Vector3(128.1640f, 128.3079f, 25.7600f); |
506 | public d.Vector3 hpr = new d.Vector3(125.5000f, -17.0000f, 0.0000f); | 508 | public d.Vector3 hpr = new d.Vector3(125.5000f, -17.0000f, 0.0000f); |
@@ -644,6 +646,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
644 | avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f); | 646 | avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f); |
645 | avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f); | 647 | avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f); |
646 | avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f); | 648 | avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f); |
649 | avplanted = physicsconfig.GetBoolean("av_planted", false); | ||
650 | |||
647 | IsAvCapsuleTilted = physicsconfig.GetBoolean("av_capsule_tilted", false); | 651 | IsAvCapsuleTilted = physicsconfig.GetBoolean("av_capsule_tilted", false); |
648 | 652 | ||
649 | contactsPerCollision = physicsconfig.GetInt("contacts_per_collision", 80); | 653 | contactsPerCollision = physicsconfig.GetInt("contacts_per_collision", 80); |
@@ -1972,7 +1976,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1972 | 1976 | ||
1973 | newAv.Flying = isFlying; | 1977 | newAv.Flying = isFlying; |
1974 | newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset; | 1978 | newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset; |
1975 | 1979 | newAv.m_avatarplanted = avplanted; | |
1980 | |||
1976 | return newAv; | 1981 | return newAv; |
1977 | } | 1982 | } |
1978 | 1983 | ||
@@ -1987,6 +1992,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1987 | 1992 | ||
1988 | internal void AddCharacter(OdeCharacter chr) | 1993 | internal void AddCharacter(OdeCharacter chr) |
1989 | { | 1994 | { |
1995 | chr.m_avatarplanted = avplanted; | ||
1990 | if (!_characters.Contains(chr)) | 1996 | if (!_characters.Contains(chr)) |
1991 | { | 1997 | { |
1992 | _characters.Add(chr); | 1998 | _characters.Add(chr); |