aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* if an NPC move to target is above the terrain then make it fly to destinationJustin Clark-Casey (justincc)2011-08-041-3/+7
|
* move bAllowUpdateMoveToPosition switch outside of HandleMoveToTargetUpdate()Justin Clark-Casey (justincc)2011-08-041-1/+1
|
* move reset code out of HandleMoveToTargetUpdate() so that we only call it ↵Justin Clark-Casey (justincc)2011-08-041-1/+1
| | | | where needed instead of passing in a flag
* Make SIGNIFICANT_MOVEMENT SP constant a top-level property so that other ↵Justin Clark-Casey (justincc)2011-08-041-1/+1
| | | | classes can use it.
* When the NPC reaches within the SIGNIFICANT_CLIENT_MOVEMENT distance of the ↵Justin Clark-Casey (justincc)2011-08-041-2/+3
| | | | | | | target, move it directly to the target. This makes the movement exact. Regression test changed to check avatar reaches exact target. Also has the nice side effect of making NPC animations continue to work after the first movement (which wasn't working). However, avatar still pauses in mid-stride
* Rename HandleMoveToPositionUpdate() to HandleMoveToTargetUpdate() for ↵Justin Clark-Casey (justincc)2011-08-041-1/+1
| | | | consistency. Improve method doc.
* rename NPC.Autopilot to NPC.MoveToTarget internally. Add method doc to ↵Justin Clark-Casey (justincc)2011-08-031-1/+1
| | | | INPCModule
* refactor: rename the move to position methods to move to target to be ↵Justin Clark-Casey (justincc)2011-08-031-3/+3
| | | | consistent with terminology used by scene object part and elsewhere
* get rid of vestigal move to parametersJustin Clark-Casey (justincc)2011-08-031-1/+1
|
* Put config to enable disable [NPC] module.Justin Clark-Casey (justincc)2011-08-031-4/+7
| | | | Default is disabled. You will need to explicitly enable to toy with this.
* Do a partial fix/implementation of OSSL osNpcMoveTo()Justin Clark-Casey (justincc)2011-08-031-11/+48
| | | | | | Avatar moves and stops. However, will stop in mid stride. And if the move to position is in the air, avatar will continue to make vain and quite hilarious attempts to take off (but never doing so). Clearly more work is needed.
* Partially fix autopilot/go hereJustin Clark-Casey (justincc)2011-08-021-1/+10
| | | | | | | This now works again except that it requires a click or avatar mvmt to get going This is because the ScenePresence.HandleAgentUpdate() method doesn't trigger until the client does something significant, at which point autopilot takes over. Even clicking is enough to trigger. This will be improved presently.
* Get rid of AvatarAppearance.Owner to simplify the code.Justin Clark-Casey (justincc)2011-08-021-1/+0
| | | | This is not used for anything - appearances are always properties of objects with ids (ScenePresence, AgentCircuitData) and just has the potential to get out of sync when the appearance is cloned.
* Get osNpcCreate appearance working with avatars that are currently in the scene.Justin Clark-Casey (justincc)2011-08-011-5/+20
| | | | | | Had to stop using AvatarService for now since it doesn't store baked texture IDs (which is why this was failing). Also failing because cloning appearance was also cloning the AvatarApperance.Owner field, which we weren't then changing. Extended TestCreate() to check this.
* Create a very basic initial test which just creates an 'npc' and tests that ↵Justin Clark-Casey (justincc)2011-07-021-2/+1
| | | | the scene presence exists
* refactor: simplify existing npc code by creating them directly rather than ↵Justin Clark-Casey (justincc)2011-07-021-102/+37
| | | | | | indirectly via a timer no obvious reason for doing this asynchonously, especially as the caller was sleeping in order to pick up the response anyway!
* Hack around with the NPC module to get osNpcCreate() partially working again.Justin Clark-Casey (justincc)2011-06-291-33/+74
| | | | | | This now creates an avatar but appearance is always cloudy. Move doesn't work. Really, creating an NPC should only involve a ScenePresence rather than doing anything with IClientAPI, since an NPC has no viewer to communicate with!
* Major refactoring of appearance handling.Master ScienceSim2010-10-201-8/+8
| | | | | | | | | | | | | | | | | | | AvatarService -- add two new methods, GetAppearance and SetAppearance to get around the lossy encoding in AvatarData. Preseve the old functions to avoid changing the behavior for ROBUST services. AvatarAppearance -- major refactor, moved the various encoding methods used by AgentCircuitData, ClientAgentUpdate and ScenePresence into one location. Changed initialization. AvatarAttachments -- added a class specifically to handle attachments in preparation for additional functionality that will be needed for viewer 2. AvatarFactory -- removed a number of unused or methods duplicated in other locations. Moved in all appearance event handling from ScenePresence. Required a change to IClientAPI that propogated throughout all the IClientAPI implementations.
* Renamed TryGetAvatar to TryGetScenePresence on SceneManager, SceneBase, ↵Dan Lake2010-03-191-2/+2
| | | | Scene and SceneGraph. This was the only change in this patch to keep it isolated from other recent changes to the same set of files.
* Fixed a couple of bugs with Appearance. Appearance is all good now.Diva Canto2010-01-111-1/+1
|
* CommunicationsManager is practically empty. Only NetworkServersInfo is there.Diva Canto2010-01-101-3/+9
|
* * Changed various modules to not initialize timers unless the module is ↵John Hurliman2009-10-231-5/+6
| | | | | | initialized. Ideally, the timers would not initialize unless the module was actually enabled, but Melanie's work on configuring module loading from a config file should make that unnecessary * Wrapped the Bitmap class used to generate the world map tile in a using statement to dispose of it after the JPEG2000 data is created
* * Consolidated adding / removing ClientManager IClientAPIs to two places in ↵John Hurliman2009-10-131-1/+0
| | | | | | | | Scene * Added some missing implementations of IClientAPI.RemoteEndPoint * Added a ClientManager.Remove(UUID) overload * Removed a reference to a missing project from prebuild.xml
* * Rewrote ClientManager to remove Lindenisms from OpenSim core, improve ↵John Hurliman2009-10-131-1/+1
| | | | | | | | performance by removing locks, and replace LLUDPClientCollection * Removed the confusing (and LL-specific) shutdowncircuit parameter from IClientAPI.Close() * Updated the LLUDP code to only use ClientManager instead of trying to synchronize ClientManager and m_clients * Remove clients asynchronously since it is a very slow operation (including a 2000ms sleep)
* * Change the signature of the agent set appearance callback to prevent ↵John Hurliman2009-09-301-7/+1
| | | | | | | unnecessary serialization/deserialization of TextureEntry objects and allow TextureEntry to be inspected for missing bakes * Inspect incoming TextureEntry updates for bakes that do not exist on the simulator and request the missing textures * Properly handle appearance updates that do not have a TextureEntry set
* Add copyright header. Formatting cleanup.Jeff Ames2009-08-211-3/+8
|
* * oops. Mistake with value return.Adam Frisby2009-08-211-0/+6
|
* * Moves NPC Creation across AppDomains to prevent a major perfomance issue.Adam Frisby2009-08-211-18/+68
|
* * Make cache, actually cache.Adam Frisby2009-08-211-1/+5
|
* * Implements a cache in NPCModule for Appearance.Adam Frisby2009-08-211-1/+11
|
* * Fixing an issue with NPC's and Circuit Codes.Adam Frisby2009-08-211-0/+3
|
* * Fleshes more of NPCModule out.Adam Frisby2009-08-211-13/+19
| | | | | | | | | * Implements some OSSL commands: key osNpcCreate(string user, string name, vector position, key cloneFrom); void osNpcMoveTo(key npc, vector position); void osNpcSay(key npc, string message); void osNpcRemove(key npc); * Untested. Requires ThreatLevel.High.
* * Implements a bunch of stuff in NPCModuleAdam Frisby2009-08-211-8/+56
|
* * Tweak the caps manager so that the NPCAvatar works again.Teravus Ovares2009-08-011-2/+2
|
* Minor: Change OpenSim to OpenSimulator in older copyright headers and ↵Jeff Ames2009-06-011-1/+1
| | | | LICENSE.txt.