Commit Graph

15863 Commits (21f4ee8a3d3712b44514080fa284ca36c8a1196d)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 797def8aa4 Put config to enable disable [NPC] module.
Default is disabled.  You will need to explicitly enable to toy with this.
2011-08-03 04:33:45 +01:00
Justin Clark-Casey (justincc) 6e4ec29722 Do a partial fix/implementation of OSSL osNpcMoveTo()
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.
2011-08-03 04:19:19 +01:00
Justin Clark-Casey (justincc) 68a5fe0431 Improve z axis move to/autopilot so the avatar does alternative crouch/huzzah when walking along the ground
Moving a flying avatar to a ground point doesn't yet land the avatar.  This may or may not be the best thing
2011-08-03 02:59:49 +01:00
Justin Clark-Casey (justincc) 30e816bfa2 Implement move to/autopilot for z axis movement as well.
This is jerky (an artifact of the way it's being done, I think), but it's better than on implementation.
2011-08-03 02:04:38 +01:00
Justin Clark-Casey (justincc) 0c23764ce2 get autopilot/go here to work immediately.
This works with viewer 1.23.5 and so in theory should work with libopenmetaverse.
2011-08-03 01:12:32 +01:00
Justin Clark-Casey (justincc) 1c126e6e22 refactor: Move update_movement_flag and the final check inside the m_allowMovement if in HandleAgentUpdate() since it's logically only ever used there 2011-08-03 00:55:52 +01:00
Justin Clark-Casey (justincc) f9689f5cc9 refactor: move out code from HandleAgentUpdate() which processes updates to move to a set position
Also comment out the really spammy log message I accidentally left in on the last commit.
2011-08-03 00:46:46 +01:00
Robert Adams 74b23210a7 Fix Flotsam cache so it will use the disk cache if the memory cache is enabled 2011-08-02 23:44:40 +01:00
Justin Clark-Casey (justincc) c122489e09 Partially fix autopilot/go here
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.
2011-08-02 23:41:12 +01:00
Justin Clark-Casey (justincc) b7f81d3492 If GetRegionByName can't match something in the local db, then search the hypergrid if that functionality has been enabled.
This should fix the problem today where old style HG addresses (e.g. "hg.osgrid.org:80:Vue-6400") stopped working since 8c3eb324c4
2011-08-02 01:06:32 +01:00
Justin Clark-Casey (justincc) d2220da205 remove ancient late 2008 cruft that handles the situation where the GetRegionsByName used to not be implemented/returned null.
It's impossible that anybody is still running this since the infrastructure has changed massively since that time.
2011-08-02 00:58:08 +01:00
Justin Clark-Casey (justincc) 17e9d61f43 Change GridService.GetRegionByName() to only return info if there is an exact region name match, unlike GetRegionsByName()
This should fix the first part of http://opensimulator.org/mantis/view.php?id=5606, and maybe 5605.
Thanks to Melanie for helping with this.
2011-08-02 00:52:48 +01:00
Justin Clark-Casey (justincc) e6fb9d74ef Revert "In GridService, have GetRegionByName() call GetRegionsByName() with a max return of 1 instead of duplicating code."
This reverts commit 8d33a2eaa1.

Better fix will be along in a minute
2011-08-02 00:40:23 +01:00
Justin Clark-Casey (justincc) 8d33a2eaa1 In GridService, have GetRegionByName() call GetRegionsByName() with a max return of 1 instead of duplicating code.
This also fixes the problem where this method would not return a hypergrid region, unlike GetRegionsByName()
2011-08-02 00:26:17 +01:00
Justin Clark-Casey (justincc) b6ac1c46cd Get rid of AvatarAppearance.Owner to simplify the code.
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.
2011-08-02 00:13:04 +01:00
Justin Clark-Casey (justincc) 59f548cda8 Get osNpcCreate appearance working with avatars that are currently in the scene.
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-08-01 23:41:29 +01:00
Justin Clark-Casey (justincc) 05e94ff27e Move common gemo/agent map name code into CreateGeom()
Fix build break.
2011-08-01 07:04:13 +01:00
Justin Clark-Casey (justincc) f9d6a91252 Instead of preserving old name in geom_name_map in change size or shape, use the Name property instead.
This is equivalent since the prim 'name' is never changed.  In fact, this propery is never used for prims
2011-08-01 06:52:52 +01:00
Justin Clark-Casey (justincc) 40a78db182 comment out unused code in OdeScene.TriCallback() 2011-08-01 06:47:45 +01:00
Justin Clark-Casey (justincc) ccb4b76242 On geom removal, remove the name from the OdeScene.geom_name_map too 2011-08-01 06:40:29 +01:00
Justin Clark-Casey (justincc) f79df6f43f remove the unused ODEPrim.prev_geom field 2011-08-01 06:35:59 +01:00
Justin Clark-Casey (justincc) f32dbef647 When an ODE geom is removed (as when a non-phantom prim is deleted, resized or shape changed, also remove the OdeScene.actor_name_map entry pointing to the phys actor
This is to stop a small memory leak over time when prims are deleted or phantom-toggled
2011-08-01 06:32:30 +01:00
Justin Clark-Casey (justincc) 6618948ff9 refactor: centralize prim geom removal code from four places to one 2011-08-01 06:15:02 +01:00
Justin Clark-Casey (justincc) 509200d5cd minor: add note to RemovePrimThreadLocked() to the effect that it contrary to the summary, it is being called from within Simulate() lock (OdeLock) 2011-08-01 05:48:27 +01:00
Justin Clark-Casey (justincc) dfa2f7d715 If a prim changes size or shape, add actor to _parent_scene.actor_name_map with new prim_geom key, as the old one becomes invalid.
This resolves http://opensimulator.org/mantis/view.php?id=5603 where changing size or shape would stop collision_start being fired in a running script.
In both this and existing code we are not removing old actors from actor_name_map when the existing prim_geom is removed, which leads to a small memory leak over time.
This needs to be fixed.
2011-08-01 05:43:04 +01:00
Justin Clark-Casey (justincc) 2102964826 minor: indentation correction 2011-08-01 05:14:16 +01:00
Justin Clark-Casey (justincc) b757583662 Comment out SOP logging message I accidentally left in 2011-07-31 03:41:35 +01:00
Justin Clark-Casey (justincc) aea7007533 refactor: split out ninja joint part of SOP.DoPhysicsPropertyUpdate() so that we don't have to look at it if it's not relevant 2011-07-31 02:50:50 +01:00
Justin Clark-Casey (justincc) 450bdb3657 In the packetpool, if we encounter a data block that somehow wasn't retrieved via GetDataBlock() then create a new stack instead of throwing an exception 2011-07-31 02:30:40 +01:00
Justin Clark-Casey (justincc) d041276517 Remove _mesh field since the mesh data no longer needs to be stored after it's initially used.
This may improve memory usage for regions using mesh and sculpts, though I suspect that it doesn't address the current memory leak.
2011-07-31 01:03:52 +01:00
Justin Clark-Casey (justincc) bd8f538f80 refactor: Remove argument to pass in an initial mesh to OdePrim since this is no longer required and it prevents removal of the _mesh field (which is only used temporarily)
If passing in a mesh becomes important again in the future then this can be reinstated.
2011-07-31 00:49:49 +01:00
Justin Clark-Casey (justincc) 196a774b24 minor: correct method doc for last commit 2011-07-31 00:45:20 +01:00
Justin Clark-Casey (justincc) 454312f5bc refactor: rename CreateGeom _mesh argument to mesh, so as to not confuse this with the pre-existing _mesh field 2011-07-31 00:44:23 +01:00
Justin Clark-Casey (justincc) f1ce17071d minor: method doc 2011-07-31 00:43:02 +01:00
Justin Clark-Casey (justincc) e08be91c84 Refactor: Replace instances of m_isphysical with IsPhysical rather than have some code reference the private var and other the public var without any functionality difference.
Add some method doc to IsPhysical
2011-07-30 23:44:47 +01:00
Justin Clark-Casey (justincc) 4f4d080461 refactor: Rename ODEPrim.ParentPrim() to AddChildPrim() for code readability 2011-07-30 23:20:43 +01:00
Justin Clark-Casey (justincc) 49a3740ee9 minor: remove mono compiler warnings, some code spacing adjustments 2011-07-30 03:56:29 +01:00
Justin Clark-Casey (justincc) 9fc59e2bf2 minor: remove some mono compiler warnings 2011-07-30 03:19:00 +01:00
Justin Clark-Casey (justincc) d917010433 minor: Add method doc to collision subscription methods. Change method case to reflect OpenSim standards. 2011-07-30 03:11:36 +01:00
Justin Clark-Casey (justincc) 310a685220 refactor: extract method that generates a physics mesh from prim shape data 2011-07-30 02:34:50 +01:00
Justin Clark-Casey (justincc) 4197f66052 refactor: extract code which generate points and faces from sculpt data into it's own method.
fix build break.
2011-07-30 02:22:05 +01:00
Justin Clark-Casey (justincc) b0eacadeb4 fix bug in previous commit 2011-07-30 02:09:17 +01:00
Justin Clark-Casey (justincc) 122e01949d refactor: move the code that generates physics meshs from prim mesh data into a separate method, in order to make the code more readable. 2011-07-30 02:08:32 +01:00
Justin Clark-Casey (justincc) 7791c1fd1e Replace the generic exception logging in flotsam asset cache with more specific stuff to return more information. 2011-07-30 01:35:22 +01:00
Justin Clark-Casey (justincc) c4c6b457c3 correct misleading "fcache status" text - deep scans are not performed when this command is invoked. 2011-07-30 01:16:10 +01:00
Justin Clark-Casey (justincc) 835352aee9 Make it clearer what the save_crashes setting in [Startup] actually does. 2011-07-30 01:05:30 +01:00
Justin Clark-Casey (justincc) 2f5995f5c0 Temporary code to change bad AvatarHeight values in the AvatarService to the default Ruth height.
I was persuaded to do this because simulators on osgrid will persist in inserting bad values for an unknown length of time, even after the original simulator bug which was inserting bad values is out in an osgrid distro
This code can be removed at some point in the future, though I think there is an argument for having services police these values in open grids.
2011-07-30 00:58:17 +01:00
Justin Clark-Casey (justincc) 6d866ba6d5 Temporarily put in a log line which shows which locale the user is running in. 2011-07-29 23:43:35 +01:00
Justin Clark-Casey (justincc) 9a5e0ede7c For all Util.FireAndForget invocations, set thread to en_US before continuing wtih the invocation.
This is to avoid bugs where the locale is not manually set on the thread and bad data values get sent to the database or over the wire.
Lots of code does this manually but as we've seen, a subtle change can hit code which has forgotton to do this.
Since en_US show be used throughout the server at present, setting it at FireAndForget seems reasonable.
Arguably, it would be better to do this where data is sent, but doing it here is much easier.
All the manual BeginInvokes() remaining in the code should probably call FireAndForget instead.
2011-07-29 23:21:57 +01:00
Justin Clark-Casey (justincc) 84c68c61bd When we start the appearance saving thread, make sure we set the culture to En_US so that a different culture doesn't save values with commas as decimal points, etc.
This will hopefully stop giants stalking the grid.
See http://opensimulator.org/mantis/view.php?id=5614
2011-07-29 22:27:04 +01:00