aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdeScene.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-03-20refactor: precalculate the fixed movement factor for avatar tilting ↵Justin Clark-Casey (justincc)1-0/+3
(sqrt(2)) rather than doing it multiple times on every move.
2012-03-20refactor: Eliminate unnecessary duplicate avCapsuleTiltedJustin Clark-Casey (justincc)1-3/+7
2012-02-11correct the default avatar_terminal_velocity value that I accidentally left ↵Justin Clark-Casey (justincc)1-1/+1
in whilst testing
2012-02-11Clamp ODE character velocity. Make ODE falling character 54m/s by default.Justin Clark-Casey (justincc)1-0/+11
If velocity reaches 256 in any vector then bad things happen with ODE, so we now clamp this value. In addition, a falling avatar is clamped by default at 54 m/s, which is the same as a falling skydiver. This also appears to be the value used on the linden lab grid. This should resolve http://opensimulator.org/mantis/view.php?id=5882
2012-01-25Serialize calls to ODE Collide() function across OdeScene instances to ↵Justin Clark-Casey (justincc)1-1/+29
prevent ODE crashes on simulators running more than one region. It turns out that calls to Collide() are not thread-safe even for objects in different ODE physics worlds due to ODE static caches. For simulators running multiple regions, not serializing calls from different scene loops will sooner or later cause OpenSim to crash with a native stack trace referencing OBBCollider. This affects the default OPCODE collider but not GIMPACT. However, GIMPACT fails for other reasons under some current simulator loads. ODE provides a thread local storage option, but as of ODE r1755 (and r1840) DLLs compiled with this crash OpenSim immediately.
2012-01-24Restrict accessible of ODECharacter Shell and Body. Add method doc and some ↵Justin Clark-Casey (justincc)1-1/+1
error log lines.
2012-01-02Adding commented out log messages and some minor formatting for future bug ↵Justin Clark-Casey (justincc)1-0/+1
hunting. No functional changes.
2011-12-22Align default ODE_STEPSIZE with that already used through OpenSimDefaults.iniJustin Clark-Casey (justincc)1-2/+2
2011-12-20Fixed bug of avie going under the terrain when crossing regions in certain ↵Diva Canto1-2/+2
directions. This was a 1-off bug: the terrain was being placed in 127, 127 resulting in a bounding box if -2, 256. I placed it in 128, 128 resulting in a bounding box of -1, 257.
2011-12-16Comment out accidentally left in "Adding physics prim" log messageJustin Clark-Casey (justincc)1-1/+1
2011-12-15Code cleanup related to ScenePresence.PhysicsActor and OdeScene/OdeCharacterJustin Clark-Casey (justincc)1-5/+21
Stop hiding RemoveAvatar failure, add log messages when characters are removed through defects or re-added unexpectedly. Add commented out log lines for future use. Use automatic property for PhysicsActor for better code readability and simplicity
2011-12-14minor: add some currently commented log lines for use in debuggingJustin Clark-Casey (justincc)1-1/+8
2011-12-14Simplify some manipulation of _taintedActors in OdeSceneJustin Clark-Casey (justincc)1-13/+6
2011-12-14Eliminate _taintedPrimsH and _taintedPrimsL (and _taintedPrimLock) in favour ↵Justin Clark-Casey (justincc)1-45/+14
of just a _taintedPrims HashSet. There's no point maintaining a list because any pending taint operations are all carried out in the same call anyway.
2011-12-12minor: remove pointless comment from OdeScene.csJustin Clark-Casey (justincc)1-2/+1
2011-11-25remove some mono compiler warningsJustin Clark-Casey (justincc)1-4/+4
2011-11-22Log error if we attempt to add/remove an OdeCharacter from the _characters ↵Justin Clark-Casey (justincc)1-23/+33
list inappropriately
2011-11-22Stop removing actor from the hash maps in OdeScene.RemoveCharacter() since ↵Justin Clark-Casey (justincc)1-6/+1
this is now being down in OdeCharacter.DestroyOdeStructures()
2011-11-22Comment out uncalled OdeScene.UnCombine()Justin Clark-Casey (justincc)1-58/+58
2011-11-22slightly simplify OdeScene.Simulate() by removing bool processtaints, since ↵Justin Clark-Casey (justincc)1-23/+11
we can inspect count of taint lists instead. also groups OdeCharacter.CreateOdeStructures() and DestroyOdeStructures() together
2011-11-21Slightly improve "Unable to space collide" logging message, though I don't ↵Justin Clark-Casey (justincc)1-1/+2
think I've ever seen this.
2011-11-21Get rid of OdeCharacter != null checks since OdeScene._characters can never ↵Justin Clark-Casey (justincc)1-17/+4
contain a null character. Ignoring the ancient code glyphs not to do this....
2011-11-21remove unnecessary OdeScene._activeprims locking. Code is single-threadedJustin Clark-Casey (justincc)1-53/+46
2011-11-21Restore defects list. In hindsight, the reason for this is becuase we can't ↵Justin Clark-Casey (justincc)1-80/+97
remove the character whilst iterating over the list. This commit also removes locking on OdeScene._characters since code is single threaded
2011-11-21simplify operation of OdeScene._perloopContactJustin Clark-Casey (justincc)1-45/+51
2011-11-21don't bother locking OdeScene._perloopContact in single threaded codeJustin Clark-Casey (justincc)1-47/+42
2011-11-21don't lock OdeScene.contacts since only ever accessed by a single threadJustin Clark-Casey (justincc)1-10/+24
2011-11-21Comment out calls to OdeScene.waitForSpaceUnlock() since that method does ↵Justin Clark-Casey (justincc)1-12/+13
nothing right now
2011-11-21Reduce complexity of OdeScene.Simulate() by fully removing bad characters at ↵Justin Clark-Casey (justincc)1-41/+1
point of detection rather than later on.
2011-11-21move geom/actor map maintenance into ↵Justin Clark-Casey (justincc)1-2/+0
DestroyODEStructures()/AvatarGeomAndBodyCreation(). This saves us having to do it separately when a character capsule size is changed
2011-11-21When changing avatar size in ODE, remove the old actor from the name and ↵Justin Clark-Casey (justincc)1-1/+3
actor maps
2011-11-21When an ODECharacter is removed (e.g. when an avatar leaves a scene), remove ↵Justin Clark-Casey (justincc)1-1/+21
the actor reference in OdeScene.actor_name_map rather than leaving it dangling. This also largely centralizes adds/removes in OdeScene.AddCharacter()/RemoveCharacter()
2011-11-21Instead of generating a new list for bad characters on every physics pass, ↵Justin Clark-Casey (justincc)1-3/+12
keep reusing the same list.
2011-11-16Stop OdePrim and OdeCharacter insanely overriding set LocalID to set their ↵Justin Clark-Casey (justincc)1-15/+13
own private m_localID property but leaving get to return the then unset PhysicsActor.LocalId! Instead, just have both subclasses use the PhysicsActor.LocalID property. This restores collision functionality that fell away in 45c7789 yesterday
2011-11-15Instead of having scene add/remove collision events directly to the OdeScene ↵Justin Clark-Casey (justincc)1-20/+38
collision event dictionary, marshall them via a change dictionary first. This is to avoid a complicated tri-thread deadlock on region crossing for avatars with attachments, where 1) XEngine starting up scripts can lock XEngine.m_Scripts and then try to lock OdeScene._collisionEventPrim while starting up a script due to avatar border crossing 2) An existing collision event will lock OdeScene._collisionEventPrim and then try to lock SP.m_attachments while trying to send the collision event to attachments 3) The avatar still entering the region will lock SP.m_attachments and then try to lock m_Scripts to start more attachment scripts.
2011-11-15use a more efficient dictionary in OdeScene._collisionEventPrim rather than ↵Justin Clark-Casey (justincc)1-7/+4
a list
2011-10-25Fix bug where collision event listeners were not removed once the listener ↵Justin Clark-Casey (justincc)1-4/+5
had gone away. This was causing continuous use of temporary memory even when all avatars had left the scene. Memory does leak but it does cause more calls to the garbage collector, which would pause the scene thread for a very short while during collection.
2011-10-25minor: rename a parameter in OdeScene.Simulate() from actor -> prim since ↵Justin Clark-Casey (justincc)1-4/+4
it's an OdePrim
2011-10-21very minor removal of old commented out line of code in OdeSceneJustin Clark-Casey (justincc)1-5/+3
2011-10-20remove unnecessary null check on _collisionEventPrimJustin Clark-Casey (justincc)1-3/+0
2011-10-20Get OdeScene to use passed in time step rather than hard-coded 0.089Justin Clark-Casey (justincc)1-22/+23
However, I still don't recommend changing MinFrameTime from 0.089, high values do not work well and lower values don't seem to make much difference
2011-10-20For now, stop passing timeStep into methods where it's not actually used.Justin Clark-Casey (justincc)1-10/+3
2011-10-18Temporarily put in log lines to record time taken to set terrain in OdeScene.Justin Clark-Casey (justincc)1-0/+6
2011-10-18Store scene identifier passed in to OdeScene for later debug messagesJustin Clark-Casey (justincc)1-2/+5
2011-10-18Don't bother taking OdeLock during OdeScene construction, since there can be ↵Justin Clark-Casey (justincc)1-16/+13
no contention until the object is constructed.
2011-10-18minor: method doc to explain a lock of OdeLockJustin Clark-Casey (justincc)1-1/+1
2011-10-18Remove the unused CollisionLocker from ODEJustin Clark-Casey (justincc)1-80/+72
Despite its name, this wasn't actually being used in any collision checking
2011-10-17Implement osNpcSit(). This is still in development so don't trust itJustin Clark-Casey (justincc)1-0/+1
Format is osNpcSit(<npc-uuid>, <target-uuid>, OS_NPC_SIT_IMMEDIATE) e.g. osNpcSit(npc, llGetKey(), OS_NPC_SIT_IMMEDIATE); At the moment, sit only succeeds if the part has a sit target set. NPC immediately sits on the target even if miles away - they do not walk up to it. This method is in development - it may change so please don't trust it yet. Standing will follow shortly since that's kind of important once you're sitting :)
2011-10-15reduce access to ODECharacter methods to make code analysis easier. ↵Justin Clark-Casey (justincc)1-1/+1
Eliminate redundant argument on ProcessTaints()
2011-10-15refactor: make methods that do not need to be public in ODE private or ↵Justin Clark-Casey (justincc)1-52/+81
internal to aid code reading/analysis. Remove some unused method arguments