aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-08-05 22:50:15 +0100
committerUbitUmarov2016-08-05 22:50:15 +0100
commit9102f6e5da1731aab9d1f9a449dce781ffd0ba36 (patch)
tree4f70e80611b1ea0aa5eaee19bdca735f615d1cde /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parent remove country from avatars DetectParams, since it is only used on a cm func... (diff)
downloadopensim-SC_OLD-9102f6e5da1731aab9d1f9a449dce781ffd0ba36.zip
opensim-SC_OLD-9102f6e5da1731aab9d1f9a449dce781ffd0ba36.tar.gz
opensim-SC_OLD-9102f6e5da1731aab9d1f9a449dce781ffd0ba36.tar.bz2
opensim-SC_OLD-9102f6e5da1731aab9d1f9a449dce781ffd0ba36.tar.xz
fill data for llDetected funtions of collisions closer to the event. (xengine wasn't update with this on merge bc was not used there). fix some parameters
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs52
1 files changed, 32 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3d8aad7..732d5ef 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -6037,7 +6037,11 @@ namespace OpenSim.Region.Framework.Scenes
6037 detobj.posVector = av.AbsolutePosition; 6037 detobj.posVector = av.AbsolutePosition;
6038 detobj.rotQuat = av.Rotation; 6038 detobj.rotQuat = av.Rotation;
6039 detobj.velVector = av.Velocity; 6039 detobj.velVector = av.Velocity;
6040 detobj.colliderType = 0; 6040 detobj.colliderType = av.isNPC ? 0x20 : 0x1; // OpenSim\Region\ScriptEngine\Shared\Helpers.cs
6041 if(av.IsSatOnObject)
6042 detobj.colliderType |= 0x4; //passive
6043 else if(detobj.velVector != Vector3.Zero)
6044 detobj.colliderType |= 0x2; //active
6041 detobj.groupUUID = av.ControllingClient.ActiveGroupId; 6045 detobj.groupUUID = av.ControllingClient.ActiveGroupId;
6042 detobj.linkNumber = 0; 6046 detobj.linkNumber = 0;
6043 6047
@@ -6129,9 +6133,6 @@ namespace OpenSim.Region.Framework.Scenes
6129 List<uint> thisHitColliders = new List<uint>(); 6133 List<uint> thisHitColliders = new List<uint>();
6130 List<uint> endedColliders = new List<uint>(); 6134 List<uint> endedColliders = new List<uint>();
6131 List<uint> startedColliders = new List<uint>(); 6135 List<uint> startedColliders = new List<uint>();
6132 List<CollisionForSoundInfo> soundinfolist = new List<CollisionForSoundInfo>();
6133 CollisionForSoundInfo soundinfo;
6134 ContactPoint curcontact;
6135 6136
6136 if (coldata.Count == 0) 6137 if (coldata.Count == 0)
6137 { 6138 {
@@ -6144,30 +6145,41 @@ namespace OpenSim.Region.Framework.Scenes
6144 } 6145 }
6145 m_lastColliders.Clear(); 6146 m_lastColliders.Clear();
6146 } 6147 }
6147
6148 else 6148 else
6149 { 6149 {
6150 bool candoparcelSound = ParcelAllowThisAvatarSounds; 6150 List<CollisionForSoundInfo> soundinfolist = new List<CollisionForSoundInfo>();
6151 6151 if(ParcelAllowThisAvatarSounds)
6152 foreach (uint id in coldata.Keys)
6153 { 6152 {
6154 thisHitColliders.Add(id); 6153 CollisionForSoundInfo soundinfo;
6155 if (!m_lastColliders.Contains(id)) 6154 ContactPoint curcontact;
6155
6156 foreach (uint id in coldata.Keys)
6156 { 6157 {
6157 startedColliders.Add(id); 6158 thisHitColliders.Add(id);
6158 curcontact = coldata[id]; 6159 if (!m_lastColliders.Contains(id))
6159 if (candoparcelSound && Math.Abs(curcontact.RelativeSpeed) > 0.2)
6160 { 6160 {
6161 soundinfo = new CollisionForSoundInfo(); 6161 startedColliders.Add(id);
6162 soundinfo.colliderID = id; 6162 curcontact = coldata[id];
6163 soundinfo.position = curcontact.Position; 6163 if (Math.Abs(curcontact.RelativeSpeed) > 0.2)
6164 soundinfo.relativeVel = curcontact.RelativeSpeed; 6164 {
6165 soundinfolist.Add(soundinfo); 6165 soundinfo = new CollisionForSoundInfo();
6166 soundinfo.colliderID = id;
6167 soundinfo.position = curcontact.Position;
6168 soundinfo.relativeVel = curcontact.RelativeSpeed;
6169 soundinfolist.Add(soundinfo);
6170 }
6166 } 6171 }
6167 } 6172 }
6168 //m_log.Debug("[SCENE PRESENCE]: Collided with:" + localid.ToString() + " at depth of: " + collissionswith[localid].ToString());
6169 } 6173 }
6170 6174 else
6175 {
6176 foreach (uint id in coldata.Keys)
6177 {
6178 thisHitColliders.Add(id);
6179 if (!m_lastColliders.Contains(id))
6180 startedColliders.Add(id);
6181 }
6182 }
6171 // calculate things that ended colliding 6183 // calculate things that ended colliding
6172 foreach (uint localID in m_lastColliders) 6184 foreach (uint localID in m_lastColliders)
6173 { 6185 {