aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into careminsterMelanie2012-05-071-1/+2
|\
| * remove default values from prior commit since mono cant deal with themdahlia2012-05-071-1/+1
| |
| * add OS_NPC_RUNNING option to osNpcMoveToTarget() to allow running speed for ↵dahlia2012-05-061-1/+2
| | | | | | | | moving NPCs
* | Merge branch 'master' into careminsterMelanie2012-04-271-1/+42
|\ \ | |/ | | | | | | | | | | Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Region/Framework/Scenes/Scene.Inventory.cs OpenSim/Region/Framework/Scenes/Scene.cs
| * Merge branch 'master' of /home/opensim/var/repo/opensimBlueWall2012-04-261-2/+2
| |\
| * | Add a version of osNpcSay that takes a channel number Mantis 5747Talun2012-04-261-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osNpcSay(UUID npc, string message) left untouched New functions:- osNpcSay(UUID npc, int channel, string message) osNpcShout(UUID npc, int channel, string message) osNpcWhisper(UUID npc, int channel, string message) Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
* | | Merge branch 'master' into careminsterMelanie2012-04-251-10/+2
|\ \ \ | | |/ | |/| | | | | | | Conflicts: OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
| * | Minor improvements to loggingOren Hurvitz2012-04-241-2/+2
| |/ | | | | | | Eliminated an extra newline in the console if the log line doesn't contain a category (example of a category: "[ASSETS]").
* | Allow scripts in attachments owned by the NPC to control the NPCMelanie2012-04-181-1/+7
| |
* | Merge branch 'master' into careminsterMelanie2012-03-061-11/+12
|\ \ | |/ | | | | | | Conflicts: OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
| * Go back to setting appearance directly in NPCModule.SetAppearance() to fix ↵Justin Clark-Casey (justincc)2012-03-061-8/+12
| | | | | | | | | | | | | | | | | | | | mantis 5914 The part reverted is from commit 2ebb421. Unfortunately, IAvatarFactoryModule.SetAppearance() does not transfer attachments. I'm not sure how to do this separately, unfortunately I'll need to leave it to Dan :) Regression test added for this case. Mantis ref: http://opensimulator.org/mantis/view.php?id=5914
* | Fix NPC appearance setting to include attachments againMelanie2012-02-271-1/+4
| |
* | Merge branch 'master' into careminsterMelanie2012-02-161-2/+2
|\ \ | |/ | | | | | | Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
| * Fix some logic mistakes where firstly osNpcCreate() without options was ↵Justin Clark-Casey (justincc)2012-02-161-2/+2
| | | | | | | | | | | | creating npcs sensed as agents and secondly the OS_NPC_SENSE_AS_AGENT option was having the opposite effect. Hopefully makes progress on addressing http://opensimulator.org/mantis/view.php?id=5872
* | Merge branch 'master' into careminsterMelanie2012-02-151-6/+6
|\ \ | |/
| * Refactor appearance saving for NPC to use AvatarFactoryModule interface.Dan Lake2012-02-141-6/+6
| |
* | Merge branch 'master' into careminsterMelanie2012-02-101-2/+3
|\ \ | |/ | | | | | | | | Conflicts: OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
| * If NPCModule.CreateNPC() fails to create the required ScenePresence (which ↵Justin Clark-Casey (justincc)2012-02-091-8/+7
| | | | | | | | should in theory never happen), don't add the NPC to the npc list but return UUID.Zero instead.
* | Merge branch 'master' into careminsterMelanie2012-02-091-0/+3
|\ \ | |/ | | | | | | Conflicts: OpenSim/Region/Framework/Scenes/SceneGraph.cs
| * minor: put in commented out logging statements for future reuseJustin Clark-Casey (justincc)2012-02-091-0/+3
| |
* | Push more NPC stuff into threadsMelanie2012-02-081-15/+22
|/
* Extend m_avatars lock in NpcModule.CreateNPC over both creation of NPC scene ↵Justin Clark-Casey (justincc)2012-02-031-14/+16
| | | | | | | | presence and population of m_avatars. This is required to stop a race where the SensorRepeat module can detect an NPC avatar before m_avatars is populated. Extending the lock is the easiest to understand solution rather than getting complicated with null checks. Hopefully resolves http://opensimulator.org/mantis/view.php?id=5872
* Add OS_NPC_SENSE_AS_AGENT option to osNpcCreate().Justin Clark-Casey (justincc)2012-01-281-2/+19
| | | | | This allows NPCs to be sensed as agents by LSL sensors rather than as a specific NPC type (which is currently an OpenSimulator-only extension). Wiki doc on this and other recent NPC functions will follow soon
* Add permissions checks for owned avatars to all other osNpc* functions.Justin Clark-Casey (justincc)2012-01-121-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.
* refactor: Move existing npc owner checks to NPCModule.CheckPermissions() ↵Justin Clark-Casey (justincc)2012-01-121-13/+36
| | | | methods and expose on interface for external calls.
* Add osNpcCreateOwned to create an owned NPC. Those can be sensed only by the ↵Melanie2012-01-061-5/+23
| | | | 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.
* Fix NPC sitting for prims without a sit target.Justin Clark-Casey (justincc)2011-11-051-1/+1
| | | | | | | | 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.
* Renamed and rearranged AvatarFactoryModule to eliminate redundant lookups of ↵Dan Lake2011-10-191-1/+1
| | | | scene presence by client ID.
* Implement osNpcStand(<npc-id>)Justin Clark-Casey (justincc)2011-10-171-0/+17
| | | | Allows you to stand an NPC that has sat.
* Implement osNpcSit(). This is still in development so don't trust itJustin Clark-Casey (justincc)2011-10-171-0/+18
| | | | | | | | | 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 :)
* Reinstate option to land an npc when it reaches a target.Justin Clark-Casey (justincc)2011-09-221-69/+3
| | | | This is moved into ScenePresence for now as a general facility
* Move code which handles NPC movement into Scene so that this can also be ↵Justin Clark-Casey (justincc)2011-09-211-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.
* move common code into AttachmentsModule.DeleteAttachmentsFromScene()Justin Clark-Casey (justincc)2011-08-311-5/+1
|
* Make SP.Attachments available as sp.GetAttachments() instead.Justin Clark-Casey (justincc)2011-08-311-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.
* refactor: Move ScenePresence.RezAttachments() into AttachmentsModuleJustin Clark-Casey (justincc)2011-08-301-1/+1
| | | | This adds an incomplete IScenePresence to match ISceneEntity
* Don't try to save changed attachment states when an NPC with attachments is ↵Justin Clark-Casey (justincc)2011-08-181-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
* Fix issue where loading a new appearance onto an NPC would not remove the ↵Justin Clark-Casey (justincc)2011-08-171-0/+10
| | | | | | previous attachments from the scene. Addresses http://opensimulator.org/mantis/view.php?id=5636
* minor: On "login disable/enable" always tell the user the final login ↵Justin Clark-Casey (justincc)2011-08-121-3/+3
| | | | status, rather than remaining silent if it was already on/off
* add regression test for osNpcCreate when cloning an in-region avatarJustin Clark-Casey (justincc)2011-08-111-26/+3
|
* eliminate the rotation parameter from SP.HandleMoveToTargetUpdate(). This ↵Justin Clark-Casey (justincc)2011-08-111-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.
* instead of setting avatar rotation twice in SP.HandleAgentUpdate(), ↵Justin Clark-Casey (justincc)2011-08-111-1/+1
| | | | eliminate the second setting in AddNewMovement()
* Get NPCs to revert to the correct 'resting' animation (e.g. stand or hover) ↵Justin Clark-Casey (justincc)2011-08-111-5/+3
| | | | | | 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.
* Add a OS_NPC_LAND_AT_TARGET option to osMoveToTarget()Justin Clark-Casey (justincc)2011-08-101-11/+22
| | | | | | | 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
* early code to allow scripts to force npcs not to fly when moving to targetJustin Clark-Casey (justincc)2011-08-101-2/+2
| | | | | 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.
* Stop trying to deregister caps or close child agents when an NPC is removedJustin Clark-Casey (justincc)2011-08-101-1/+1
|
* implement osNpcStopMoveTo() to cancel any current move targetJustin Clark-Casey (justincc)2011-08-101-3/+34
|
* When an NPC appearance is loaded, rez the attachments tooJustin Clark-Casey (justincc)2011-08-091-0/+1
|
* When an NPC is created, stop telling neighbouring regions to expect a child ↵Justin Clark-Casey (justincc)2011-08-091-7/+1
| | | | agent
* Implement first draft functions for saving and loading NPC appearance from ↵Justin Clark-Casey (justincc)2011-08-091-0/+29
| | | | | | | | | | storage. This works by serializing and deserializing NPC AvatarAppearance to a notecard in the prim inventory and making the required baked textures permanent. By using notecards, we avoid lots of awkward, technical and user-unfriendly issues concerning retaining asset references and creating a new asset type. Notecards also allow different appearances to be swapped and manipulated easily. This also allows stored NPC appearances to work transparently with OARs/IARs since the UUID scan will pick up and store the necessary references from the notecard text. This works in my basic test but is not at all ready for user use or bug reporting yet.
* if an NPC target is set to a ground location, then automatically land them ↵Justin Clark-Casey (justincc)2011-08-041-1/+12
| | | | | | when they get there. This doesn't help where the target is a prim surface. In these situations, it might be better to provide manual overrides so the script can control whethre an avatar flys there/lands, etc.