aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/Tests (unfollow)
Commit message (Collapse)AuthorFilesLines
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-05Fix NPC sitting for prims without a sit target.Justin Clark-Casey (justincc)1-2/+39
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-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 Lake1-1/+1
scene presence by client ID.
2011-10-17Implement osNpcStand(<npc-id>)Justin Clark-Casey (justincc)1-2/+6
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)1-0/+24
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-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-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-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-11add regression test for osNpcCreate when cloning an in-region avatarJustin Clark-Casey (justincc)1-5/+5
2011-08-11Get NPCs to revert to the correct 'resting' animation (e.g. stand or hover) ↵Justin Clark-Casey (justincc)1-0/+1
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)1-2/+2
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)1-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.
2011-08-09Implement first draft functions for saving and loading NPC appearance from ↵Justin Clark-Casey (justincc)1-1/+1
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.
2011-08-06refactor: Change SceneHelpers.AddClient() to AddScenePresence().Justin Clark-Casey (justincc)1-2/+2
This seems to make more sense as we can get SP.ControllingClient
2011-08-06rename TestHelper => TestHelpers for consistencyJustin Clark-Casey (justincc)1-5/+5
2011-08-06rename test SceneSetupHelpers -> SceneHelpers for consistencyJustin Clark-Casey (justincc)1-6/+6
2011-08-04When the NPC reaches within the SIGNIFICANT_CLIENT_MOVEMENT distance of the ↵Justin Clark-Casey (justincc)1-0/+2
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
2011-08-04extend npc move test to check a second movementJustin Clark-Casey (justincc)1-2/+21
2011-08-03remove move to duck walk compensation - no longer required.Justin Clark-Casey (justincc)1-1/+5
extends npc move to regression test to check stop after sufficient sim updates
2011-08-03rename NPC.Autopilot to NPC.MoveToTarget internally. Add method doc to ↵Justin Clark-Casey (justincc)1-1/+1
INPCModule
2011-08-03extend move test to check avatar is moving in the right direction after ↵Justin Clark-Casey (justincc)1-0/+13
setting a move target
2011-08-03extend move test to check one beat of the simulator without actually asking ↵Justin Clark-Casey (justincc)1-1/+7
the npc to move.
2011-08-03Add passing but incomplete NPC move regression testJustin Clark-Casey (justincc)1-47/+25
2011-08-03stop avatar service being set up in NPC TestCreate() - it's no longer usedJustin Clark-Casey (justincc)1-6/+48
2011-08-03enable the NPC module for its regression testJustin Clark-Casey (justincc)1-0/+2
2011-08-01Get osNpcCreate appearance working with avatars that are currently in the scene.Justin Clark-Casey (justincc)1-2/+21
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.
2011-07-02Create a very basic initial test which just creates an 'npc' and tests that ↵Justin Clark-Casey (justincc)1-0/+71
the scene presence exists