aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-01-12Add remove test for unowned avatarsJustin Clark-Casey (justincc)1-0/+20
2012-01-12Add permissions checks for owned avatars to all other osNpc* functions.Justin Clark-Casey (justincc)1-4/+1
This is being done outside the npc module since the check is meaningless for region module callers, who can fake any id that they like.
2012-01-12refactor: Move existing npc owner checks to NPCModule.CheckPermissions() ↵Justin Clark-Casey (justincc)1-13/+36
methods and expose on interface for external calls.
2012-01-06Add osNpcCreateOwned to create an owned NPC. Those can be sensed only by the ↵Melanie3-11/+36
owner, can be destroyed only by the owner and only the owner can save their appearance. Added "NPC" as a flag to llSensor to sense NPCs and exclude them from "AGENT" results.
2011-12-12Cleaned up ScenePresence parameters for Flying, WasFlying, FlyingOld and ↵Dan Lake1-1/+1
IsColliding
2011-12-10Implement handler for TeleportCancel inbound packetMelanie1-0/+1
2011-12-08On a new client circuit, send the initial reply ack to let the client know ↵Justin Clark-Casey (justincc)1-1/+4
it's live before sending other data. This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before. This may stop some avatars appearing grey on login. This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces
2011-12-05Implement IOSHttpRequest and IOSHttpResponse http interfaces and use instead ↵Justin Clark-Casey (justincc)1-1/+1
of OSHttpRequest/OSHttpResponse. This is required for the substitution of different HTTP servers or the newer HttpServer.dll without having to commit to a particular implementation. This is also required to write regression tests that involve the HTTP layer. If you need to recompile, all you need to do is replace OSHttpRequest/OSHttpResponse references with IOSHttpRequest/IOSHttpResponse.
2011-11-23Line endingsDan Lake1-101/+101
2011-11-07Correct test failure in sit position check of TestSitAndStandWithNoTarget()Justin Clark-Casey (justincc)1-1/+3
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
2011-11-07That such a trivial change can be so difficult to get right. Fix it this time.Melanie1-1/+1
2011-11-07Fix build breakMelanie1-1/+1
2011-11-06Fix up failing test to compensate for changed sit target offsetMelanie1-2/+2
2011-11-06Convert SendKillObject to take a list of uint rather than sending oneMelanie1-1/+1
packet per prim. More to come as we change to make use of this.
2011-11-05Fix NPC sitting for prims without a sit target.Justin Clark-Casey (justincc)2-3/+40
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.
2011-10-25Make OpenSim.Framework.Servers.HttpServer rely on OpenSim.Framework instead ↵Justin Clark-Casey (justincc)2-1/+2
of the other way around. This is necessary so that code in HttpServer can use framework facilities such as the thread watchdog for monitoring purposes. Doing this shuffle meant that MainServer was moved into OpenSim/Framework/Servers Also had to make OpenSim.Framework.Console rely on OpenSim.Framework rather than the other way around since it in turn relies on HttpServer MainConsole and some new interfaces had to be moved into OpenSim/Framework to allow this. This can be reverted if parts of OpenSim.Framework stop relying on console presence (cheifly RegionInfo)
2011-10-22refactor: rename some AssetHelpers.CreateAsset() methods to ↵Justin Clark-Casey (justincc)1-1/+1
CreateNotecardAsset()
2011-10-19Renamed and rearranged AvatarFactoryModule to eliminate redundant lookups of ↵Dan Lake2-2/+2
scene presence by client ID.
2011-10-17refactor: Make IClientAPI.DebugPacketFormat a property rather than a setter ↵Justin Clark-Casey (justincc)1-3/+1
without a getter
2011-10-17Implement osNpcStand(<npc-id>)Justin Clark-Casey (justincc)2-2/+23
Allows you to stand an NPC that has sat.
2011-10-17Implement osNpcSit(). This is still in development so don't trust itJustin Clark-Casey (justincc)2-0/+42
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-14refactor: rename IClientAPI.SendPrimUpdate() to SendEntityUpdate() since it ↵Justin Clark-Casey (justincc)1-1/+1
sends entity updates (including presence ones), not just prims.
2011-10-04Removed redundant IClientAPI calls from TreePopulatorModule. Removing tree ↵Dan Lake1-14/+2
objects already triggers objectkill packet to client. No need to send again.
2011-10-03Removed redundant code in AttachmentsModule and simplified interfaces which ↵Dan Lake1-4/+2
converted back and forth between ScenePresence and IClientAPI. More to be done still.
2011-09-22Reinstate option to land an npc when it reaches a target.Justin Clark-Casey (justincc)2-75/+4
This is moved into ScenePresence for now as a general facility
2011-09-21Move code which handles NPC movement into Scene so that this can also be ↵Justin Clark-Casey (justincc)1-1/+1
used by Autopilot coming from the client side. I thought that I had implemented this but must have accidentally removed it. Adds a regression test to detect if this happens again. Temporarily disables automatic landing of NPC at a target. Will be fixed presently.
2011-09-21When calling osNpcMoveTo(), rotate the avatar in the direction of travel.Justin Clark-Casey (justincc)1-4/+12
This stops the npc walking backwards if the target is directly behind. This means that the npc no longer returns to its original rotation once movement has finished. If you want this behaviour, please store and reset the original rotation after movement. This is somewhat to address http://opensimulator.org/mantis/view.php?id=5678
2011-09-08Fix test failure. Oversight in setting up the tests themselves.Justin Clark-Casey (justincc)1-1/+2
2011-09-08Centralize module setup for NPC tests.Justin Clark-Casey (justincc)1-41/+21
This is overkill for some tests since they dont' need all the modules, but I think the gain in code readability is worth it
2011-09-08Remember to set and unset the fire and forget method at the top of the ↵Justin Clark-Casey (justincc)1-2/+10
attachment and npc tests
2011-09-08Use scene presence agent id for rezzed object ownership rather than item owner.Justin Clark-Casey (justincc)1-0/+77
These should be identical. However, the item isn't available when rezzing npc attachments.
2011-09-01Eliminate pointless checks of SOG.RootPart != nullJustin Clark-Casey (justincc)1-1/+0
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
2011-08-31move common code into AttachmentsModule.DeleteAttachmentsFromScene()Justin Clark-Casey (justincc)1-5/+1
2011-08-31Make SP.Attachments available as sp.GetAttachments() instead.Justin Clark-Casey (justincc)1-7/+3
The approach here, as in other parts of OpenSim, is to return a copy of the list rather than the attachments list itself This prevents callers from forgetting to lock the list when they read it, as was happening in various parts of the codebase. It also improves liveness. This might improve attachment anomolies when performing region crossings.
2011-08-30refactor: Move ScenePresence.RezAttachments() into AttachmentsModuleJustin Clark-Casey (justincc)1-1/+1
This adds an incomplete IScenePresence to match ISceneEntity
2011-08-19Stop NPC's getting hypergrid like names in some circumstances.Justin Clark-Casey (justincc)1-1/+5
This meant punching in another AddUser() method in IUserManagement to do a direct name to UUID associated without the account check (since NPCs don't have accounts). May address http://opensimulator.org/mantis/view.php?id=5645
2011-08-18Don't try to save changed attachment states when an NPC with attachments is ↵Justin Clark-Casey (justincc)1-1/+1
removed from the scene. This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc. This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
2011-08-17Fix issue where loading a new appearance onto an NPC would not remove the ↵Justin Clark-Casey (justincc)1-0/+10
previous attachments from the scene. Addresses http://opensimulator.org/mantis/view.php?id=5636
2011-08-12minor: On "login disable/enable" always tell the user the final login ↵Justin Clark-Casey (justincc)1-3/+3
status, rather than remaining silent if it was already on/off
2011-08-12When saving appearance, only save the baked textures, not the other face ↵Justin Clark-Casey (justincc)1-1/+1
textures (which are already stored permanently)
2011-08-12Fix kicking of NPCs via "kick user" console command.Justin Clark-Casey (justincc)1-0/+2
Needed to hook up the Close() function in the NPCAvatar IClientAPI implementation, which [unfortunately] is still needed
2011-08-11add regression test for osNpcCreate when cloning an in-region avatarJustin Clark-Casey (justincc)2-31/+8
2011-08-11eliminate the rotation parameter from SP.HandleMoveToTargetUpdate(). This ↵Justin Clark-Casey (justincc)1-1/+6
can just use the currently set Rotation looks like I spoke to soon about eliminating jerkiness on "go here"/autopilot. It's still there.
2011-08-11instead of setting avatar rotation twice in SP.HandleAgentUpdate(), ↵Justin Clark-Casey (justincc)1-1/+1
eliminate the second setting in AddNewMovement()
2011-08-11Get NPCs to revert to the correct 'resting' animation (e.g. stand or hover) ↵Justin Clark-Casey (justincc)2-5/+4
after finishing their movement. This also fixes judder after an avatar has finished "go here"/autopilot movement in a viewer. This meant reseting the SP.AgentControlFlags since the Animator uses these to determine the correct default animation.
2011-08-10Add a OS_NPC_LAND_AT_TARGET option to osMoveToTarget()Justin Clark-Casey (justincc)3-13/+29
Default for this function is now not to automatically land. This allows better control by scripts when an avatar is going to be landing on a prim rather than the ground. Stopping the avatar involves faking a collision, to avoid the pid controller making it overshoot. A better approach would be to gradually slow the avatar as we near the target
2011-08-10early code to allow scripts to force npcs not to fly when moving to targetJustin Clark-Casey (justincc)3-5/+5
this is to allow walking on prims. it will be up to the script writer to be sure that there is a continuous path. currently implemented in osNpcMoveToTarget(), but none of this is final.
2011-08-10Stop trying to deregister caps or close child agents when an NPC is removedJustin Clark-Casey (justincc)1-1/+1
2011-08-10implement osNpcStopMoveTo() to cancel any current move targetJustin Clark-Casey (justincc)1-3/+34
2011-08-09When an NPC appearance is loaded, rez the attachments tooJustin Clark-Casey (justincc)1-0/+1