Curiously, a Vector3.ToString() will not display the last two places of the float. In this case, the failure of
the assertion would confusingly report Expected: <0, 0, 0.8454993> But was: <0, 0, 0.8454993> when actual Z figure is 0.845499337
Should fully address http://opensimulator.org/mantis/view.php?id=5779
Now, such excpetions are caught by an exception handler and just an error message is shown.
This was the kind of exception causing these fatal server crashes:
APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs^M
^M
Exception: System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: offset exceeds the size of buffer
at System.Net.Sockets.NetworkStream.BeginRead (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
at HttpServer.HttpClientContext.OnReceive (IAsyncResult ar) [0x00000] in <filename unknown>:0 ^M
^M
Application is terminating: True^M
This is to partially address http://opensimulator.org/mantis/view.php?id=5769
We don't need to call SP.HandleAgentSit() again if we are within 10m since the autopilot won't trigger.
By calling it twice, the position of the sitting NPC was wrongly adjusted, ending up near <0,0,0>.
However, this change does mean that NPCs further than 10m away will not attempt to autopilot to the prim, though this code was broken anyway (is actually a different mechanism to normal NPC movmeent).
Hopefully this can be addressed soon.
This was meant to help with the script in http://opensimulator.org/mantis/view.php?id=5772 but it doesn't work.
Probably the event is fired before the physics actor has been set up again for the stood avatar.
Fixing that would be much more complicated, but processing the event last of all seems like a good idea in any case.
This isn't a perfect solution since there can be a race between the taint processing and taint setting, as force needs to be reset after processing.
Needs careful locking in the future.
from previous commit which sort out which iterator is used are left
intact. A discussion is needed as to what constitutes an avatar vs a
ScenePresence.
the 3 iteration functions so more of them are using the correct
iteration for the action they are performing. The 3 iterators that seem
to fit all actions within OpenSim at this time are:
ForEachAvatar: Perform an action on all avatars (root presences)
ForEachClient: Perform an action on all clients (root or child clients)
ForEachRootClient: Perform an action on all clients that have an avatar
There are still a dozen places or so calling the old
ForEachScenePresence that will take a little more refactoring to
eliminate.
This can be specified on pCampbot.exe by using g in the list of behaviours for the new -behaviours,-b switch
e.g. -b p,g to get both existing physics and grabbing behaviours.
grabbing is primitive, it attempts grabs on random prims whether they're actually signalled as clickable or not.
behaviour is currently primitive overall, behaviours are just executed in a list