Compare commits

...

1326 Commits

Author SHA1 Message Date
Melanie
2463f5451c Merge branch 'master' into careminster-presence-refactor 2011-01-18 01:26:03 +00:00
Melanie
4f8ba53f86 Prevent activation and deactivation of gestures from clobbering the slam
bits
2011-01-18 00:55:08 +01:00
Melanie
ddb4de139c Change gesture activation to not quash any other flags 2011-01-17 21:22:32 +01:00
Melanie
76f39d326e Add a new ViewObjectInventory permission to decouple viewing from
+MOD status
2011-01-14 18:26:41 +01:00
Melanie
8074c6ace1 Revert "Replace the new, tricky MySql.Data.dll with the older version from 0.6.9"
This reverts commit e5ce59ff34.

The old module causes a truly massive (double!) rise in connections. Please
put "old guids=true;" back in after this commit
2011-01-14 14:54:28 +01:00
Melanie
d60ddfdfcb Revert "Remove old guids from the examples, for completeness' sake"
This reverts commit 52222d82d5.
2011-01-14 14:54:14 +01:00
Melanie
a30bbcbb64 Temporarily reinstate prim counting in the update loop to make the production
systems run
2011-01-14 04:09:02 +01:00
Melanie
fe2d9be0cf Implement nonlocal god kicks and freezes 2011-01-14 03:35:45 +01:00
Melanie
139e84c0b2 Fix slam bits being lost when editing perms in prim inventory 2011-01-14 01:01:02 +01:00
Melanie
ddb5f4e44a Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-01-13 20:01:50 +00:00
Melanie
3fc5b6a8ec Merge branch 'master' into careminster-presence-refactor 2011-01-13 19:53:44 +00:00
Melanie
4eefdd5549 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-01-13 20:21:53 +01:00
Melanie
69666be28c Implement kicking, freezing and unfreezing users in the same sim via
profile god buttons.
2011-01-13 16:05:17 +01:00
Kitto Flora
c0134710f7 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-01-13 04:48:32 +00:00
Kitto Flora
d92069fb8b Add llLookAt() kinetic. Reduce StandUp +x offset to 0.3M. 2011-01-13 04:44:04 +00:00
Melanie
e4bb8dc385 Guard against invalid light color specifiers from the database 2011-01-13 00:19:39 +01:00
Melanie
6a2b947e8c Merge branch 'master' into careminster-presence-refactor 2011-01-12 21:47:05 +00:00
Melanie
f59b55d930 Dont' trust the viewer! Fix a permission slam error caused by trusting
the viewer too much.
2011-01-12 17:40:21 +01:00
Melanie
7f99a8c900 Fix direct item give permissions 2011-01-12 16:20:38 +01:00
Melanie
52222d82d5 Remove old guids from the examples, for completeness' sake 2011-01-11 15:07:04 +01:00
Melanie
05b1b94cd8 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-01-11 14:41:37 +00:00
Melanie
d7fd4b2153 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2011-01-11 14:38:10 +00:00
Melanie
e5ce59ff34 Replace the new, tricky MySql.Data.dll with the older version from 0.6.9
This requires REMOVING the "Old Guids=true" fromt he MYSQL connection strings!
Sorry for the inconvenience, but this version of the DLL is much less buggy
than the new one for production use.
2011-01-11 14:35:21 +00:00
Melanie
d8fd777e13 Use ToString() rather than a cast (more robust) 2011-01-11 14:59:55 +01:00
Melanie
2c6a410e90 Partial permissions fix for boxed items. 2011-01-10 22:02:22 +01:00
Melanie
72048169c0 Taint SOGs the right way 2011-01-10 22:02:09 +01:00
Melanie
c271bbcc8a Preserve the script running flag when copying an object. 2011-01-08 16:44:28 +01:00
Melanie
1ab9cd0997 Fix a couple of security issues 2011-01-08 13:51:34 +01:00
Melanie
de4eaab584 Merge branch 'master' into careminster-presence-refactor 2011-01-06 19:08:15 +00:00
Melanie
d1b6b4d288 Fix god mode perms adjustment 2011-01-06 19:12:25 +01:00
Kitto Flora
ba7a227763 Revise Materials properties; Fix Double-Click Autopilot; Allow non-script sit positions >= 0.1M; Add llLookAt(); Comment out spammy bad adjacent sim message. 2011-01-04 21:36:09 +00:00
Melanie
dc4f557426 Merge branch 'master' into careminster-presence-refactor 2011-01-03 19:45:08 +00:00
Melanie
e15ab75d62 Add permissions hooks for object transfers 2011-01-03 19:56:56 +01:00
Melanie
5432dfd53a Allow cross-scope friendships to work, and also allow other cross scope name
resolution
2011-01-02 01:29:22 +01:00
Melanie
04e450e2bc Fix child agent scoping 2010-12-31 16:05:59 +01:00
Melanie
5545b03168 Fix scoping for prim region crossings 2010-12-31 15:53:31 +01:00
Melanie
6820deed34 Implement Scope ID lookup on GetLandData. Stacked regions were not handled
properly
2010-12-31 15:45:08 +01:00
Melanie
24a997eb7c Add MessageKey to section Messaging, a key that prevents injection of
IM from external sources
2010-12-30 20:57:56 +01:00
Melanie
98769ed040 Merge branch 'master' into careminster-presence-refactor 2010-12-30 02:31:43 +00:00
Melanie
3b50066ceb Merge branch 'master' into careminster-presence-refactor 2010-12-30 01:40:38 +00:00
Melanie
2cb2bff9b2 Implement SendPlacesReply 2010-12-30 00:31:59 +01:00
Melanie
dbaaccf92a Copying a ref type under lock doesn't dissociate it from the source.
Use a new list to do that.
2010-12-29 21:02:45 +01:00
Kitto Flora
88db69e017 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-29 21:18:28 +00:00
Kitto Flora
64209c9be1 Fix av/prim eject problem. 2010-12-29 21:13:49 +00:00
Melanie
dfc0c8dca6 Remove the restriction on communication across scopes. This will allow
cross-scope users to IM each other.
2010-12-29 15:13:10 +01:00
Kitto Flora
61b7ec5fb5 Fixing AbsolutePosition to correct llSensor in vehicles 2010-12-26 22:52:03 +00:00
Melanie
f2dd324bc8 Fix linking link sets to rotated prims. 2010-12-26 20:42:47 +01:00
Melanie
8186bf2525 Remove some code that was meant to fool the viewer into thinking SLT. It never
worked and it turned out the issues were really in the backend.
2010-12-26 07:29:23 +01:00
Melanie
b17150c3e8 Fix the corner casse of stack overflow when logging out with attachments 2010-12-25 08:05:42 +01:00
Melanie
0aeafc9919 Fix the recent stack overflow 2010-12-25 07:25:56 +01:00
Melanie
75010e5e1c Merge branch 'master' into careminster-presence-refactor 2010-12-25 00:04:46 +00:00
Melanie
b16f4024db Update child prim group positions in moving vehicles 2010-12-24 21:04:10 +01:00
Melanie
42d44c00f3 Change the mute list parts of the client interface so that all data is provided
to the module
2010-12-24 03:46:57 +01:00
Melanie
2e3d0fb276 Merge branch 'master' into careminster-presence-refactor 2010-12-24 02:23:26 +00:00
Melanie
70bb542727 Merge branch 'master' into careminster-presence-refactor 2010-12-23 17:20:45 +00:00
Melanie
2cc07de0ba Merge branch 'master' into careminster-presence-refactor 2010-12-23 12:08:38 +00:00
Melanie
efa8bd8eb3 Revert "reactivating some traces to track a dead thread"
This reverts commit d7df871f9f.

Useless spam nit suitable for debugging anything that is currently brokwn
2010-12-23 11:15:43 +00:00
sacha
98f0b4c72a Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-23 08:14:43 +00:00
sacha
d7df871f9f reactivating some traces to track a dead thread
seen @ NT and Otaku
2010-12-23 08:11:52 +00:00
Melanie
d06456c8b2 Merge branch 'master' into careminster-presence-refactor 2010-12-23 02:57:45 +00:00
Melanie
32cc569b00 Fix up some locking issues in task inventory. Don't use any prior versions in production! 2010-12-22 13:45:21 +01:00
Melanie
cf37b3b943 Prevent a null ref when an avatar login doesn't go as planned 2010-12-22 03:25:30 +01:00
Melanie
e9382c2939 Merge branch 'master' into careminster-presence-refactor 2010-12-21 23:09:12 +00:00
Melanie
303c02133f Merge branch 'master' into careminster-presence-refactor 2010-12-21 23:00:01 +00:00
Melanie
a70b597840 Merge branch 'master' into careminster-presence-refactor 2010-12-21 22:57:31 +00:00
Melanie
da37ddff9f Merge branch 'master' into careminster-presence-refactor 2010-12-21 22:50:35 +00:00
Melanie
4093e22833 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-21 20:57:52 +00:00
Melanie
b1180a53dd Merge branch 'master' into careminster-presence-refactor 2010-12-21 20:56:37 +00:00
Melanie
c9aa420c2d Restore CM loking after core extract 2010-12-21 20:48:58 +00:00
Melanie
2f84f2171f Make prim inventories a bit more sane 2010-12-21 20:47:00 +00:00
Kitto Flora
5fccbe21d6 Update materials parameters. 2010-12-20 07:04:35 +00:00
Melanie
11eabf0e51 Merge branch 'master' into careminster-presence-refactor 2010-12-20 02:49:31 +00:00
Mike Rieker
7a78de8105 fix 'system.exception: unknown type in list.size: system.uint32' 2010-12-18 23:29:49 +00:00
Melanie
a82112a47c Merge branch 'master' into careminster-presence-refactor 2010-12-17 22:50:25 +00:00
Melanie
d7622cbedc Fix notecards that end with an embedded object causing an exception 2010-12-16 21:01:38 +01:00
Melanie
835e4dbc2c Add locks on m_killRecord without breaking things like justin did 2010-12-16 20:49:40 +01:00
Melanie
aebc011f7b Remove some spam from FreeSwitchModule 2010-12-16 20:12:18 +01:00
Melanie
4719e925b8 Revert the locking changes in LLCLientView 2010-12-16 20:11:26 +01:00
Melanie
d457b4c4b1 Merge branch 'master' into careminster-presence-refactor 2010-12-15 22:59:52 +00:00
Melanie
62e66b17bc Make sure the material is set on physical prims 2010-12-15 17:54:57 +01:00
Melanie
ee1e725e39 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-15 08:18:02 +01:00
Melanie
f8beeb1e93 Fix casts in llSetPayPrice 2010-12-15 08:15:12 +01:00
Melanie
354f568508 Merge branch 'master' into careminster-presence-refactor 2010-12-14 23:58:45 +00:00
Tom
5ce296e08d Workaround to allow llHTTPRequest to POST data to Lighthttpd which doesn't support Expect: 100-Continue 2010-12-14 09:14:34 -08:00
Melanie
cb51fc129e Merge branch 'master' into careminster-presence-refactor
Also fix the failure to fire CHANGED_LINK on sit, which is different in our
code.
2010-12-14 12:12:27 +00:00
Melanie
2d9946d7c9 Merge branch 'master' into careminster-presence-refactor 2010-12-14 04:38:04 +00:00
Melanie
6528fc5c64 Fix a small bug in ban list handling 2010-12-13 22:27:03 +01:00
Melanie
7538926292 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-13 20:20:02 +00:00
Melanie
d2ff4ebf2d Merge branch 'master' into careminster-presence-refactor 2010-12-13 20:19:10 +00:00
Melanie
6b374fa547 Revamp the viewer -> banlist packet processing so fix a number of bugs.
Remove the too coarse CanEditParcel method in favor of a CanEditParcelProperties
method that takes a GroupPowers argument to specify what action is to be
taken. Also, make the method to set parcel data much more granular. Permissions
in a deeded setting should now work.
2010-12-13 20:19:52 +01:00
Melanie
d36b880022 Change some lookups in he Land Management module to make group permissions
work better. Add a generic group permissions hoot to the scene permissions
system.
2010-12-13 11:13:34 +01:00
Kitto Flora
9f9af315ec Correct Sensor axis for unattached daughter prims. 2010-12-12 23:26:58 +00:00
Melanie
d3b081744e Prevent objects that are worn from ground from vanishing from the scene 2010-12-12 22:12:50 +01:00
Melanie
63353a0687 Fix a perms issue when wearing an object from inworld 2010-12-12 21:24:00 +01:00
Melanie
663a626a6f Apply the useful part of diva's patch that was skipped 2010-12-12 08:57:26 +00:00
Melanie
28022a9198 Merge branch 'master' into careminster-presence-refactor 2010-12-12 01:22:50 +00:00
Melanie
fe61c00958 Merge branch 'master' into careminster-presence-refactor 2010-12-12 01:22:27 +00:00
Melanie
8aa63093b1 Merge branch 'master' into careminster-presence-refactor 2010-12-12 01:20:46 +00:00
Kitto Flora
95a915efd8 Fix border fence for physicals. Fix llRotLookAt() for Vehicles. 2010-12-11 21:04:03 +00:00
Melanie
711db25dfa Allow floats in the list for llSetPayPrice and silently convert them to int, 2010-12-11 03:31:57 +01:00
Melanie
7fef89847c Merge branch 'master' into careminster-presence-refactor 2010-12-09 02:24:12 +00:00
Melanie
f28dc77ab4 Plumb a code path for the entity transfer module to ask a destination scene
whether or not an agent is allowed there as a root agent.
2010-12-09 02:01:41 +01:00
Melanie
80b84e4bad Prevent sending of attachment data to any client if the attachment
is not actually attached to any avatar. Another stab ad fixing "HUD hair"
2010-12-08 00:08:14 +01:00
Melanie
1e7b7ffd6b Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-07 23:43:53 +01:00
Melanie
b9f54fca5d Allow TPing multiple people in the friends list in one go. 2010-12-07 23:01:42 +01:00
Melanie
dd416f4b63 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-07 15:27:50 +00:00
Melanie
c8f0c8ebc4 Remove old Freeswitch configurations 2010-12-07 15:24:17 +00:00
Melanie
549f90c5b5 Update calling card interface 2010-12-07 04:45:28 +01:00
Melanie
a4f7937eb3 Add the interface needed to revive calling cards 2010-12-07 03:08:48 +01:00
Melanie
b325721d6f Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-07 01:07:57 +01:00
Melanie
b960a05e67 Cowardly refuse to keep running when no application plugins are loaded.
Prevents empty instances from hanging around when Mono.Addins messes up
2010-12-07 01:07:13 +01:00
Melanie
b1a5c03985 Lock the attachments dict so it doesn't get out of sync when iterating 2010-12-06 17:40:07 +01:00
Melanie
45314c6622 Merge branch 'master' into careminster-presence-refactor 2010-12-06 02:54:51 +00:00
sacha
835103af82 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-04 21:50:48 +00:00
sacha
9b9ce8fb27 add more detail to the log in case of FORM Timeout
cause nothing relevant are in the services logs
2010-12-04 21:40:18 +00:00
Melanie
4b979362e9 Add some safeguards: DOn't send someone else's HUDs, don't send deleted prims
Removed some unneccessarily wordy core comments
2010-12-04 14:41:57 +01:00
Melanie
96446adfa4 Monitor the UUIDs used to create and update wearable assets. Reject any changed
texture that is not present in the user's inventory full perm.
This will prevent "UUID snatching", a copybot-type of attack that can cause
clothing makers to be forced to destroy and replace legit items in order to
invalidate the copies.
2010-12-04 07:06:30 +01:00
Melanie
f41dfbabc8 Simplify updating of agent inventory assets. Make newly created asset IDs
random rather than using IDs known by the client ahead of time.
2010-12-04 05:01:44 +01:00
Melanie
349767f8a2 Merge branch 'master' into careminster-presence-refactor 2010-12-04 04:25:39 +00:00
Melanie
bab6b6cd87 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-04 04:36:44 +01:00
Melanie
da91a2ab7e Convert the agent asset transactions module to a new style module.
Refactor to remove the property "MyScene" and the pointless circular
refs to the managing classes. Converted the module to a non-shared module.
Reformatted source for 80 columns. Removed the special role the module
had in the old loader.
2010-12-04 04:33:14 +01:00
Melanie
24af7b8384 Merge branch 'master' into careminster-presence-refactor 2010-12-04 00:09:32 +00:00
Melanie
8e3bacc691 When linking something, immediately persist the linked set. 2010-12-03 23:06:44 +01:00
Kitto Flora
bf695cccba Fix spurious Av move when clothing item worn or removed. 2010-12-03 18:32:58 +00:00
Melanie
60b055de4c Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-12-03 19:04:59 +01:00
Melanie
4407c4700f Fix status responses in remote admin 2010-12-03 19:02:42 +01:00
Melanie
8741676bc3 Revert "Revert "Trigger changed event with CHANGED_TELEPORT when teleporting to another region.""
This reverts commit 6c01ebb875.
2010-12-03 18:32:03 +01:00
Melanie
b940925173 Improve health reporting 2010-12-03 07:27:29 +01:00
Melanie
e913e1690e Fix health reporting. This will now actually monitor the threads properly
and not just the http server. It will also restart a dead heartbeat.
2010-12-03 07:16:06 +01:00
Melanie
ce1aedf474 Add a missing interface memeber to the new HG stuff 2010-12-03 07:04:07 +01:00
Melanie
6c01ebb875 Revert "Trigger changed event with CHANGED_TELEPORT when teleporting to another region."
This reverts commit 2827deffe8.

Pulling out a bad core commit that broke attachment teleporting for us
2010-12-03 04:39:51 +01:00
Melanie
342dc532ec Merge branch 'master' into careminster-presence-refactor
Also prevent god takes from ending up in Lost and Found
2010-12-03 02:36:13 +00:00
Melanie
ec01936d38 Change the way sim health reporting reports sim startup 2010-12-03 02:37:08 +01:00
Mic Bowman
ab2adaf341 Various bug fixes for appearance handling 2010-11-30 16:20:43 +01:00
Melanie
0218845c2e Prevent the restart module from barfing if it's not configured 2010-11-30 15:40:50 +01:00
Melanie
b08cc63003 Change inworld restart to use blue boxes rather than notices to match SL 2010-11-29 21:45:03 +01:00
Melanie
836b73f765 Fix the build break 2010-11-29 01:15:02 +00:00
Melanie
0acfe80f21 Remove the most spammy XML dumps from the FS voice module 2010-11-28 23:37:21 +00:00
Melanie
4c917d39d5 Merge branch 'master' into careminster-presence-refactor 2010-11-28 23:35:49 +00:00
Marck
4d104cf6fe Make gatekeeper's address check case-insensitive. 2010-11-28 23:35:38 +00:00
Melanie
2bee150aac Implement health monitoring of the packet receiving and sending threads 2010-11-28 20:45:03 +01:00
Melanie
0f1fc79994 Implement god summons 2010-11-28 20:14:58 +01:00
Melanie
4765fd9cd0 Remove hard limit on prim owners. The new LibOMV autosplits packets to
prevent overflow
2010-11-27 19:31:18 +01:00
Melanie
2412b3cb4a Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-11-27 13:07:23 +01:00
Melanie
0b41606e73 Instrument TI Dictionary to finally find that pesky script-caused deadlock 2010-11-27 13:02:51 +01:00
Melanie
35c6bba6d7 Merge branch 'master' into careminster-presence-refactor 2010-11-27 01:29:01 +00:00
Melanie
a1ab2a2244 Merge branch 'master' into careminster-presence-refactor 2010-11-27 01:25:02 +00:00
Melanie
e05f728b08 Merge branch 'master' into careminster-presence-refactor 2010-11-27 01:08:12 +00:00
Melanie
385a6c4b34 Convert the scope id in the im session id to a URL variable. Fixes offline
group notice attachments not working
2010-11-26 23:20:43 +01:00
Melanie
cccfd1db34 Add marker files to the restart module so external scripts can be used to
kill a process that hasn't restarted properly
2010-11-26 03:21:51 +01:00
Melanie
33c023bf6a Allow group lookup during tp / login to make restricting parcels to group
work.
2010-11-25 21:22:22 +01:00
Melanie
ee9aca9c52 Add the ability for gods to impersonate users. For this, bit 6 needs to be
set in the target's UserFlags and the impersonator must have UserLevel 200
or above. The user can then log in using the target's name and their own
password.
2010-11-25 20:34:55 +01:00
Melanie
c14592d4ba Export the module interface for restart 2010-11-25 04:16:34 +01:00
Melanie
efb03f6f99 Fix a bug caused by leftover code 2010-11-25 03:59:57 +01:00
Melanie
e74b0deb4e Fix up remote controller. 2010-11-25 03:43:23 +00:00
Melanie
6c3eb21440 Merge branch 'master' into careminster-presence-refactor 2010-11-25 03:27:35 +00:00
Melanie
1522567920 Finish the RestartModule and fix some bugs. Add new console commands:
region restart bluebox <msg> <time> ...
region restart notice <msg> <time> ...
region restart abort [<message>]
2010-11-25 02:37:50 +01:00
Melanie
eb9d7bff6c Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-11-25 01:25:56 +00:00
Melanie
2c1c04119d Merge branch 'master' into careminster-presence-refactor 2010-11-25 01:24:32 +00:00
Melanie
b3a71c6df1 Prevent an overlength button label from producing a debug dump and aborting
the script.
2010-11-24 18:56:25 +01:00
Melanie
a47fb93b74 Prevent a dump in the llGetLinkKey method when using LINK_ROOT in a single prim 2010-11-23 23:48:52 +01:00
Melanie
6557d5f359 Merge branch 'master' into careminster-presence-refactor 2010-11-23 14:05:09 +00:00
Melanie
3caea83e9a Merge branch 'master' into careminster-presence-refactor 2010-11-23 14:03:33 +00:00
Melanie
4a54b3318b Fix more potential nullrefs 2010-11-23 00:31:09 +01:00
Melanie
571becefb6 Fix some crashes caused by the addition of the CreatorData column 2010-11-22 23:31:29 +01:00
Melanie
506192e466 Make an invalud key string in llTextBox and llDialog non fatal to avoid
breakinf sloppily made no-mod scripted items.
2010-11-22 15:16:28 +01:00
Melanie
54d1d6d917 Fox case on a method 2010-11-22 14:32:51 +01:00
Melanie
87f30709a2 Merge branch 'master' into careminster-presence-refactor 2010-11-22 14:14:45 +00:00
Melanie
22ff06ba17 Merge branch 'master' into careminster-presence-refactor 2010-11-22 01:09:26 +00:00
Melanie
7e9a3019ac Fox the buglets in Freeswitch. Grid mode works now and there is no reason why standalone should not. 2010-11-22 00:55:11 +01:00
Melanie
8d7b181b58 Merge branch 'master' into careminster-presence-refactor 2010-11-21 23:47:28 +00:00
Melanie
5f8a0f3d1f Add the remote connector for freeswitch config retrieval 2010-11-21 23:41:56 +00:00
Melanie
83a427a8f9 Move Dialplan and Directory from the region module to the ROBUST server 2010-11-21 21:18:03 +00:00
Melanie
1cf8eb8a90 Start implementing Freeswitch in ROBUST 2010-11-21 20:59:01 +00:00
Melanie
164007dd00 Merge branch 'master' into careminster-presence-refactor 2010-11-18 19:06:09 +00:00
Melanie
f3e4000a55 Send media and other parcel data to client on login. Makes streams visible
right away and starts media.
2010-11-18 13:26:35 +01:00
Melanie
47f0468995 Send parcel data upon becoming root. This will make streams play and build
flags be set properly
2010-11-18 04:18:43 +01:00
Melanie
095e3aae67 Allow llDialog without any buttons and add the automatic OK button as it is
in SL.
2010-11-18 01:11:11 +01:00
Melanie
3bc9c1adb4 Merge branch 'master' into careminster-presence-refactor 2010-11-17 18:21:35 +00:00
Melanie
2e5ae1b013 Fix gesture and viewer preview sounds not playing 2010-11-17 17:54:32 +01:00
Melanie
80d3998001 Recalculate prim counts when a parcel is deeded 2010-11-17 17:54:03 +01:00
Melanie
0049ec16f5 Prevent leftover attachments from clogging up the pipes 2010-11-16 22:26:07 +01:00
Melanie
c4eb430ad2 Merge branch 'master' into careminster-presence-refactor 2010-11-16 21:15:15 +00:00
Melanie
d4d45c3acb Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-11-16 20:47:29 +01:00
Melanie
4f15b8d4e6 Change the way attachments are persisted. Editing a worn attachment will now
save properly, as will the results of a resizer script working. Attachment
positions are no longer saved on each move, but instead are saved once on
logout. Attachment script states are saved as part of the attachment now
when detaching.
2010-11-16 20:44:39 +01:00
Melanie
c2ac5dc358 Can't detach an object from within the script thread because it will throw.
Use FireAndForget for that.
2010-11-16 01:37:44 +01:00
Melanie
7a9c57a81e When detaching a scripted item, always consider it modified. Script states
will have changed and for real usability, we need to save it. It bloats
assets, but that can't be avoided.
2010-11-16 01:35:45 +01:00
Melanie
0f152bfe8c Diva needs a spanking! Serializing OldItemID breaks script state
persistence in agent inventory.
2010-11-16 01:33:24 +01:00
Kitto Flora
b2aeea66e3 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-11-11 04:51:05 +00:00
Kitto Flora
9462a1861b Fix excessive forward motion and flailing while descending a slope, prevent adding motion while falling from flying. 2010-11-11 04:49:47 +00:00
Melanie
aace455249 Prevent teleporting to a region when the egent is banned in all parcels 2010-11-10 16:22:55 +01:00
Melanie
b68f701c00 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-11-09 23:55:19 +00:00
Melanie
fa64f2e56e Although the Allow Voice setting is per estate rather than per region,
apparently it is required in the region handshake to let the client
enable parcel voice controls. So, send it.
2010-11-09 23:54:08 +00:00
Melanie
ee85a530f6 Merge branch 'master' into careminster-presence-refactor 2010-11-09 22:16:48 +00:00
Melanie
d206721e2f Add option SeeIntoBannedRegion to allow band to act like SL, where you can
see in but not enter. Defaults to false, so no change.
2010-11-09 22:41:40 +01:00
Melanie
dfe11566f4 Fix parcel bans to work only on the avatars they're supposed to work on instead of pushing all avatars, even the ones that are allowed. 2010-11-09 20:18:36 +01:00
Melanie
ccfbce3176 Remove "OpenSimulator" from startup message 2010-11-09 16:07:43 +01:00
Melanie
09ea73f7cc Change "OpenSim" to "Careminster" and remove CM suffix. 2010-11-09 15:33:03 +01:00
Melanie
15da52d73a Prevent temp-on-rez prims from being persisted 2010-11-08 19:00:03 +01:00
Melanie
df0787f5cf Merge branch 'master' into careminster-presence-refactor 2010-11-08 03:08:02 +00:00
Melanie
8a97d58f09 Merge branch 'master' into careminster-presence-refactor 2010-11-08 03:05:07 +00:00
Melanie
5a3cd9f1d0 Decrease min search length to 2 chars for map search. 2010-11-07 16:08:41 +01:00
Melanie
4db60a5a40 Fix the inventory transfer module to not cause duplicated text IMs 2010-11-05 15:24:08 +01:00
Melanie
7844872067 Fix merge artefacts 2010-11-05 14:46:13 +01:00
Melanie
ddd3c6824a Revert "Spin the AddNewClient process off into a new thread to avoid locking up the LLUDPServer (and therefore the entire scene)"
This reverts commit 40e05f4109.

Conflicts:

	OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
2010-11-05 14:27:53 +01:00
Melanie
f985775962 Revert "Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready."
This reverts commit 91b1d17e5b.

Conflicts:

	OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
	OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2010-11-05 14:27:14 +01:00
Melanie
654814d563 Merge branch 'master' into careminster-presence-refactor 2010-11-05 13:45:50 +00:00
Melanie
6bac92db80 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-11-05 13:34:54 +00:00
Melanie
53d64f755a Merge branch 'master' into careminster-presence-refactor 2010-11-05 13:33:58 +00:00
Melanie
893915ce0b Fix child prims returning after being unlinked and deleted where the root is
not deleted
2010-11-04 21:09:59 +01:00
Melanie
82e534a029 Fix avatar to avatar inventory gives across servers 2010-11-04 19:07:43 +01:00
Melanie
b8924167e0 Fix creation of a duplicate physics actor on chained drag-copy operations,
the main cause for "ghost prims"
2010-11-04 10:37:39 +01:00
Melanie
c2bd6ccdb8 Fix playing sound from HUDs 2010-11-03 23:20:30 +01:00
Melanie
5f8ab9f018 Merge branch 'master' into careminster-presence-refactor 2010-11-03 02:34:36 +00:00
Melanie
636ca6218d Change the default of the new bind_ip_address RemoteAdmin option to 0.0.0.0
so it reflects the prior default. We are not in the habot of changing default
behavior without good reason and making localhost the default would break
most current use cases.
2010-11-03 01:11:04 +00:00
Melanie
c285f87702 Fix config items. Less used / expert items go in OpenSimDefaults.ini
The default shown is always the hardcoded default
2010-11-03 01:09:42 +00:00
mores
d5d0e81df2 Admin Server can now bind to a private ip address
Signed-off-by: Melanie <melanie@t-data.com>
2010-11-03 01:09:38 +00:00
Melanie
e9ec187746 Merge branch 'master' into careminster-presence-refactor 2010-11-03 00:48:18 +00:00
Melanie
797e461ef9 Merge branch 'master' into careminster-presence-refactor 2010-11-02 23:41:13 +00:00
Melanie
26f12f479f Merge branch 'master' into careminster-presence-refactor 2010-11-02 22:58:33 +00:00
Melanie
69c1e0b2f7 Merge branch 'master' into careminster-presence-refactor 2010-10-29 21:22:35 +01:00
Melanie
840b75ca9b Add my work on top of cmickeyb's 2010-10-29 20:48:37 +02:00
Melanie
9331898c32 Merge branch 'master' into careminster-presence-refactor 2010-10-29 20:40:48 +01:00
Melanie
b800a299aa Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-10-29 20:36:03 +02:00
Melanie
dbd1a68b58 Fix a LSL issue and a prim naming issue 2010-10-29 20:35:06 +02:00
Melanie
3231602b88 Revert "Preliminary work on appearance layers. No user functionality yet."
This reverts commit e6a8d2872c.
2010-10-29 20:34:53 +02:00
Melanie
bd4e3b0aaf Add a default alpha layer 2010-10-29 20:31:17 +02:00
Melanie
e2b08bac6d Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-10-29 18:56:20 +01:00
Melanie
13129f1a8d Preliminary work on appearance layers. No user functionality yet. 2010-10-29 18:55:58 +01:00
Melanie
e6a8d2872c Preliminary work on appearance layers. No user functionality yet. 2010-10-29 18:59:53 +02:00
Melanie
a51a545cb9 Fix attached sounds from HUDs erroneously being delivered to other avatars 2010-10-28 13:24:45 +01:00
Melanie
05dbe4f2c4 Merge branch 'master' into careminster-presence-refactor 2010-10-27 20:49:27 +01:00
Melanie
3113cc9129 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-10-25 01:24:42 +01:00
Melanie
ac370cf57b Merge branch 'master' into careminster-presence-refactor 2010-10-25 01:24:30 +01:00
Melanie
cf78f3fae3 Comment repeated add and remove of avatars from the physical scene. It's no
longer needed.
2010-10-25 00:53:38 +02:00
Melanie
dd7f9ed7bf Implement llGetLinkNumberOfSides(), needed for 1-script sculptie foot shoe
scripts.
2010-10-25 00:33:34 +02:00
Melanie
61137eac22 Add PRIM_NAME, PRIM_DESC and PRIM_ROT_LOCAL 2010-10-24 18:19:48 +02:00
Melanie
2f0a3391ee Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-10-24 17:21:16 +02:00
Melanie
5f266fd571 Change the results from llGetPrimitiveParams to be the same as SL for
the prim position. This will make attached resizer scripts work like SL.
Existing resizers may be affected adversely.
2010-10-24 17:18:21 +02:00
Melanie
d0c707209a Prevent an exception if a string passed into llXorBase64StringsCorrect is not
a base 64 string. Return the empty string in this case.
2010-10-23 22:40:56 +01:00
Melanie
9a78281f82 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-10-23 00:22:23 +01:00
Melanie
7f74dc1b14 Merge branch 'master' into careminster-presence-refactor 2010-10-23 00:21:42 +01:00
Melanie
9fa915bdef Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-10-23 00:20:18 +02:00
Melanie
c3ddf46188 Prevent database lookups on every avatar movement when land is set to group
access. Fixes a massive performance degradation.
2010-10-23 00:18:56 +02:00
Melanie
301a926015 Change some exception to use ToString(). e.Message is not sufficient to fix
errors. Please don't use e.Message, devs NEED to see the dumps!
2010-10-22 13:29:59 +01:00
Melanie
28c4dd7931 Merge branch 'master' into careminster-presence-refactor 2010-10-21 20:26:29 +01:00
Melanie
fa7da00cc3 COnvert some funky K&R notation to proper (MS) style 2010-10-21 09:35:33 +01:00
Melanie
12ebed8bab Merge branch 'master' into careminster-presence-refactor 2010-10-21 09:33:12 +01:00
Melanie
fc33d569cd Merge branch 'master' into careminster-presence-refactor 2010-10-21 07:33:01 +01:00
Melanie
8853c21763 COmmented the wrong line instead, now I commented them all to be on the safe side 2010-10-19 01:22:31 +01:00
Melanie
e0a02d6ca3 Merge branch 'master' into careminster-presence-refactor 2010-10-19 00:52:35 +01:00
Melanie
ce3594f7f2 Change substring matching to prefix matching in region search. This affects
both map and login, as they use the same method.
2010-10-18 22:58:04 +01:00
Melanie
78a6e5489b Fix merge issues 2010-10-18 20:50:16 +02:00
Melanie
bb7a755cba Merge branch 'master' into careminster-presence-refactor 2010-10-18 20:30:46 +01:00
Melanie
46e5c8e919 Merge branch 'master' into careminster-presence-refactor 2010-10-16 10:52:56 +01:00
Melanie
e6d0fb0b0e Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-10-16 10:51:44 +02:00
Melanie
efc555ca22 Actually set the PrivateBinPath in XEngine so relocating the scripts
directory works
2010-10-16 10:50:07 +02:00
Melanie
455a2ba7de Merge branch 'master' into careminster-presence-refactor 2010-10-16 02:27:51 +01:00
Melanie
537905d81b Add a setter to OldItemID so it can be deserialized 2010-10-13 19:45:55 +01:00
Melanie
bb1e35fbd9 Merge branch 'master' into careminster-presence-refactor 2010-10-13 18:44:58 +01:00
Melanie
3eb68c319e change default next owner persm to mod/trans to match SL. 2010-10-13 08:24:18 +02:00
Melanie
0806d03780 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-10-10 22:08:54 +01:00
Melanie
cb79e228e4 Merge branch 'master' into careminster-presence-refactor 2010-10-10 22:08:36 +01:00
Melanie
2804c97a39 Change the part for sound playback to be the root part / object UUID instead
of the child prim because using the child prim plain doesn't work.
2010-10-10 22:06:47 +01:00
Melanie
c2971a6398 Add group invites to the list of messages that get offlined 2010-10-10 20:15:02 +02:00
Melanie
231feab57f Merge branch 'master' into careminster-presence-refactor
Conflicts:
	OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
2010-10-09 01:07:41 +01:00
Melanie
ff49a21eca Fix a security relevant issue with take / take copy 2010-10-09 01:02:57 +02:00
Melanie
52dd547863 Make SendKillObject send multiple localIDs in one packet. This avoids the
halting visual behavior of large group deletes and eliminates the packet flood
2010-10-08 11:31:52 +02:00
Melanie
ba0afa53d3 Implement rezzing coalesced objects 2010-10-07 05:12:39 +02:00
Melanie
2db0ac74c7 Implement taking of coalesced objects.
WARNING!!!!!
You can TAKE them, but you can't REZ them again. Only the first of the contained
objects will rez, the rest is inaccessible until rezzing them is implemented.
Also, rotations are not explicitly stored. This MAY work. Or not.
2010-10-07 01:13:17 +02:00
Melanie
42f76773a1 Plumb the path for multiple object deletes 2010-10-06 19:59:30 +02:00
Melanie
ca50f6a82c Merge branch 'master' into careminster-presence-refactor 2010-10-06 05:45:29 +01:00
Melanie
1a47ec082e Convert worldview to GET 2010-10-06 05:15:47 +02:00
Melanie
b7586806cd Merge branch 'master' into careminster-presence-refactor 2010-10-06 03:52:57 +01:00
Melanie
d8149373c1 Merge branch 'master' into careminster-presence-refactor 2010-10-06 00:27:10 +01:00
Latif Khalifa
e55e93c994 Avoid throwing errors when adding existing meshes to the render scene 2010-10-04 06:02:28 +01:00
Melanie
da6816c805 Merge branch 'master' into careminster-presence-refactor 2010-10-04 04:49:54 +01:00
Melanie
c19ac997b1 Merge branch 'master' into careminster-presence-refactor 2010-10-04 01:08:11 +01:00
Melanie
7bbc486c62 Merge branch 'master' into careminster-presence-refactor 2010-10-04 00:44:50 +01:00
Melanie
6ba7ee6b2e Update libOMV 2010-10-04 00:44:27 +01:00
Melanie
90f9b7b7c4 Fix line endings 2010-10-04 00:37:18 +02:00
Melanie
50b03d08a8 Add linden prim renderer and update libOMV 2010-10-04 00:04:42 +02:00
Melanie
48988bf4e9 Merge branch 'master' into careminster-presence-refactor 2010-10-03 22:38:32 +01:00
Melanie
b4fe6da4eb Add the Warp3D dll 2010-10-03 16:57:45 +01:00
Melanie
5910be236f Merge branch 'master' into careminster-presence-refactor 2010-10-03 16:52:27 +01:00
Melanie
662976b602 Merge branch 'master' into careminster-presence-refactor 2010-10-02 20:12:36 +01:00
Melanie
fd56fd2ce8 Merge branch 'master' into careminster-presence-refactor 2010-10-02 19:51:43 +01:00
Melanie
b40c91777c Replace CalculateMass with a more accurate version, contributed by Ubit.
Thank you.
2010-10-02 00:19:30 +02:00
Melanie
9f7f266f58 Replace CalculateMass with a better, contributed version 2010-10-02 00:18:52 +02:00
Melanie
7ad1b60eca Enforce region agent limit as set in estate tools 2010-09-30 20:01:55 +02:00
Melanie
521e2c8355 Merge branch 'master' into careminster-presence-refactor 2010-09-30 16:01:45 +01:00
Melanie
ac7a4a7d38 Fix an inventory fetch issue 2010-09-30 02:47:07 +02:00
Melanie
9522881404 Fix a potential key collision 2010-09-30 02:46:47 +02:00
Melanie
3d75e9addd Lock the iteration over the inventory items when saving script states 2010-09-28 02:22:32 +02:00
Melanie
841c84831f Try to prevent threading issues in SP.SetAppearance by locking it 2010-09-27 19:34:16 +02:00
Melanie
5b2aa02fd9 Merge branch 'master' into careminster-presence-refactor 2010-09-27 03:48:15 +01:00
Melanie
41051b3cc6 Prevent setting arbitrary groups on your objects. 2010-09-27 02:13:22 +01:00
Melanie
296cf04ce6 Merge branch 'master' into careminster-presence-refactor 2010-09-27 01:32:06 +01:00
Melanie
34e8bf45b6 Restrict inventory items added in a transaction to folder belonging
to the connected client.
2010-09-27 00:29:27 +01:00
Melanie
9f17ae580d Merge branch 'master' into careminster-presence-refactor 2010-09-26 23:57:06 +01:00
Melanie
aecac9bba9 Typo fixes 2010-09-26 18:05:55 +01:00
Melanie
6f689f591a Merge Master 2010-09-26 17:56:31 +01:00
Melanie
0080f28f1d Merge branch 'master' into careminster-presence-refactor 2010-09-25 06:57:53 +01:00
Melanie
4fbdcb95a0 Merge branch 'master' into careminster-presence-refactor 2010-09-25 06:19:26 +01:00
Melanie
83b16612ce Experimental locking of taint processing 2010-09-25 05:57:08 +02:00
Melanie
1c1f308052 if you can't edit a prim's inventory, you don't need to see the asset ids.
Prevents stealing IDs of animations, sounds and textures from prim
inventories. Prevents copybot from gathering the wearable UUIDs needed for
pirating things from vendors.
2010-09-24 23:48:52 +02:00
Melanie
33bd4fe789 When clearing the addin registry, respect a custom path 2010-09-24 22:00:51 +02:00
Melanie
41847e8fdf Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-09-21 04:03:40 +01:00
Melanie
9feef34a81 Merge branch 'master' into careminster-presence-refactor 2010-09-21 04:03:14 +01:00
Melanie
12f9b1df8c Fix a typo 2010-09-21 03:57:09 +02:00
Melanie
7229bc4fbd Refactor script create permission into the perms module 2010-09-21 02:08:55 +02:00
Melanie
9cf8795ecf Fix a merge artefact that broke script state persistence in XAttachments 2010-09-19 22:53:05 +02:00
Melanie
3a760ad12b Overwrite the core version of the string parsing method with ours 2010-09-17 22:20:20 +01:00
Melanie
bdd4dcf69b Merge branch 'master' into careminster-presence-refactor 2010-09-17 22:12:48 +01:00
Melanie
a6382deec5 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-09-17 22:06:18 +01:00
Melanie
9f7aa7deef Add LandServices to make landmarks work right in grids 2010-09-17 21:40:49 +01:00
Melanie
e32855d080 Merge branch 'master' into careminster-presence-refactor 2010-09-17 03:57:15 +01:00
Melanie
7df4383235 Merge branch 'master' into careminster-presence-refactor
Integrate the next large patch.
Don't use this version, it has a ghost avatar issue. Next push
will fix it.
2010-09-17 03:49:30 +01:00
root
87a1e00f05 Remove the now unused partslock 2010-09-17 04:00:00 +02:00
root
251f2444d0 Revert "* Changed 11 calls for session info to the more optimized API method"
This reverts commit 5dc9ea2f24.
Also makes online indicators and IM more robust
2010-09-17 01:50:48 +02:00
root
1e4e978f7f Removing debug 2010-09-16 23:26:53 +02:00
root
a0c87b5af6 JustinCC is evil. f7b28dd3 broke script persistence. This fixes it. 2010-09-16 23:12:32 +02:00
root
512ded6eb5 Catch a nullref 2010-09-16 21:07:09 +02:00
root
d50a072336 Suppress the strange "Result not Dictionary" messages that happen when
a region queries for a nonexistent presence.
2010-09-16 20:21:30 +02:00
root
ec89dc99b7 Some small bug fixes 2010-09-16 18:58:25 +02:00
Melanie
58b1ee8e2c Merge branch 'master' into careminster-presence-refactor 2010-09-16 18:04:50 +01:00
meta7
571693d7b6 Revert last commit 2010-09-15 08:16:38 -07:00
meta7
77eb8ade8c Don't throw an exception if the authorizationservice is missing a serviceuri config entry. Not every authorization service will need a URI. 2010-09-15 08:08:29 -07:00
meta7
1f74f013b2 Don't fart when deserializing a prim with no ParentGroup set yet 2010-09-15 07:59:28 -07:00
Melanie
7f7bbbb84a Fix the above 2010-09-14 23:05:42 +01:00
Melanie
18beb796bc Merge branch 'master' into careminster-presence-refactor 2010-09-14 22:50:38 +01:00
Melanie Thielker
540a1912ce Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-09-14 22:14:23 +02:00
Melanie
356b1ef1d9 Merge branch 'master' into careminster-presence-refactor 2010-09-14 22:16:02 +01:00
Melanie
e27f59cf42 reorder some code to avoid merge issues in the future 2010-09-14 22:15:16 +01:00
Melanie
2f41bc4ca7 Fix merge issues 2010-09-14 22:14:08 +01:00
Melanie
1212cb0c74 Merge branch 'master' into careminster-presence-refactor 2010-09-14 22:03:42 +01:00
Melanie Thielker
cc290abf7a Adjust the code for ghost prim removal to new information from Kitto 2010-09-14 22:13:44 +02:00
Melanie Thielker
d299f8b55c Fix a small left over buglet and also add checking of the physics actor
position on backup. This way, ant object that has been moved will be
checked for ghost prims as soon as it is persisted.
2010-09-14 19:41:53 +02:00
meta7
ec305a4825 LSL compatibility: Don't throw an exception if an invalid key is passed to llInstantMessage, instead shout about it and apply the usual delay. This now matches SL. 2010-09-13 17:43:45 -07:00
Melanie
656e64b3ed Change the help message to point to copying OpenSimDefaults.ini.example.
Provide a mostly empty OpenSim.ini.example
2010-09-13 23:22:25 +01:00
Melanie
8e51ca3a7b Output an error and quit if the master file is missing. Also rename
OpenSim.ini.example to bin/OpenSimDefaults.ini.example
2010-09-13 23:17:42 +01:00
Melanie
5e1aab92f5 Make the inimaster option default to OpenSimDefaults.ini. 2010-09-13 23:12:48 +01:00
Melanie
6a1ce17cdb Merge branch 'master' into careminster-presence-refactor
The modules will need to be updated for this to compile and run again. Please
don't use until I do the companion commit to modules later on.
2010-09-13 16:17:38 +01:00
Melanie
d264f0d301 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-09-11 20:22:53 +01:00
Melanie
5e5260ad1b Prevent child agents from being blacklisted in the kill record. 2010-09-11 20:22:10 +01:00
Melanie Thielker
319007783c Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-09-08 00:50:31 +02:00
Melanie Thielker
7a1b1dd419 Make AddRestoredSceneObject reset the IsDeleted flag so we can take an
object out of the scene and then put it back in.
2010-09-08 00:49:32 +02:00
Melanie
342c64b7ac Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-09-07 20:20:16 +01:00
Melanie
50cc22c9e6 Fix Simian regression 2010-09-07 20:19:52 +01:00
Melanie Thielker
8ab4b277c1 Fix some issues with unlinking 2010-09-07 17:12:28 +02:00
Melanie
2684ca0838 Merge branch 'master' into careminster-presence-refactor 2010-09-07 11:51:26 +01:00
Melanie
3284356bba Merge branch 'master' into careminster-presence-refactor 2010-09-07 01:48:00 +01:00
Kitto Flora
cfaefad754 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-09-06 21:45:17 +00:00
Kitto Flora
c719e016ed Falling animation fix, comment out instrumentation. 2010-09-06 21:45:07 +00:00
Melanie Thielker
8886afd319 Fix yet another cause of "Ghost attachments" 2010-09-06 21:59:52 +02:00
Melanie Thielker
f4f9a2cb45 Don't turn off the sale settings on child prims when linking, and on copy
of prims anymore. The behavior now matches SL and can be used to link
vendor prims for transport
2010-09-06 18:14:24 +02:00
Melanie Thielker
06adbc1324 Revert "Workaround for mono bug #312968"
This reverts commit f2e343d530.

Doesn't compile with our version of Mono. Patched Mono instead.
2010-09-06 17:24:10 +02:00
Melanie Thielker
f2e343d530 Workaround for mono bug #312968 2010-09-06 14:09:46 +02:00
Melanie Thielker
00a23eea0e Reflect the ParcelPropertiesUpdateRequest into Scene.EventManager, because
modules need to see it (Search!) even if it comes in via CAPS
2010-09-06 03:59:48 +02:00
Melanie
b9c20fbaa7 Merge branch 'master' into careminster-presence-refactor 2010-09-05 19:15:49 +01:00
Melanie
e4c2b44e5c Merge branch 'master' into careminster-presence-refactor 2010-09-05 15:06:00 +01:00
Melanie Thielker
e593607171 Remove "Dwell" support from core and replace it with calls to methods
on IDwellModule
2010-09-05 14:16:42 +02:00
Melanie
5cbc4e2a5f Merge branch 'master' into careminster-presence-refactor 2010-09-03 19:18:03 +01:00
Melanie
4e0d6e8e41 Merge branch 'master' into careminster-presence-refactor 2010-09-03 03:37:18 +01:00
Melanie Thielker
457160afc3 Fix an issue with rezzing scripted objects. 2010-09-03 03:16:08 +02:00
Kitto Flora
24c73aa8b2 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-09-02 21:51:27 +00:00
Kitto Flora
16814dd8f1 Fixes to JUMP system. 2010-09-02 21:51:19 +00:00
Melanie Thielker
5ea979d515 Remove commented code and the comment, as the change has proven out 2010-09-02 20:51:27 +02:00
Melanie Thielker
eea5d8368a Experimentally comment the sending of unbaked avatars 2010-09-02 20:08:39 +02:00
Melanie Thielker
713c666827 Show when appearance is sent to an avatar to help track down failure
\to display avatars
2010-09-02 19:49:42 +02:00
Melanie Thielker
0f40ec5c65 Implement UploadBakedTexture cap 2010-09-02 16:10:44 +02:00
Melanie Thielker
db015963a9 Remove the annoying "Script saved" popups when saving scripts in task
inventory. They cause spam when using recompile scripts in selection
and are redundant because that message is also shown in the script window
message pane. These popups were a legacy from when we couldn't drive the
message pane and their finest hour has now come.
2010-09-02 14:17:33 +02:00
Melanie Thielker
09fba16094 Prevent Meta7 plants from being treated like dropped attachments and removed
from the sim.
2010-09-01 20:10:44 +02:00
Melanie Thielker
2232e6f273 Improve sim health reporting. Output error message if heartbeat thread is restarted by scene. This may help to find out why this recovery mechanism isn't working. 2010-09-01 14:08:52 +02:00
Melanie Thielker
aca10cb027 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-31 22:26:17 +02:00
Melanie Thielker
b973fe5297 Adjust the "Magic numbers" we use because we can't reference the actual
script state enum to reflect recent changes.
2010-08-31 22:24:11 +02:00
meta7
35d6181b78 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-30 11:42:17 -07:00
meta7
4cf5ef3cd4 Kick the user from the region in the circumstance that the TP home failed - ONLY if it was triggered by an estate ban. This makes baby jesus cry, and should be fixed to search for alternative regions if the home region is unavailable. 2010-08-30 11:41:20 -07:00
Melanie
79bfa275da Merge branch 'master' into careminster-presence-refactor 2010-08-30 02:30:28 +01:00
Melanie
8ee31d97a8 Remove CRLF endings 2010-08-30 02:19:21 +01:00
Melanie Thielker
47818a2db3 Fix a horrible bug in SG, where iteration of scene objects is carried
out in a fashion that causes the delegate to be invoked once per child
prim for a given group.
2010-08-26 01:06:50 +02:00
Melanie Thielker
4b47008d30 Correct whitespace 2010-08-26 00:37:54 +02:00
Melanie
fc8d2be632 Merge branch 'master' into careminster-presence-refactor
This was rather conflicted. Please test linking.
2010-08-26 00:11:07 +01:00
Melanie
252e159340 Merge branch 'master' into careminster-presence-refactor 2010-08-25 23:22:23 +01:00
Melanie Thielker
1096f43f0d Prevent an object disposed exception that made forms comms unreliable. After
starting an asynchronous write, one should not close the channel it will
be written to synchrnously, that leads to grief.
2010-08-25 23:34:39 +02:00
Melanie Thielker
dc1baf8025 Change object cleanup again. Make scene object directories more robust and
prevent deleted SOP's from sticking around
2010-08-25 23:11:00 +02:00
Melanie Thielker
1bcb2e788f Change some e.Message to e.ToString. Don't use e.Message, it doesn't carry
any useful information. Error messages are useless without location information.
It looks more elegant, but is totally pointless.
2010-08-25 23:04:12 +02:00
Melanie Thielker
c13045b25e Correct a logic error in attachment cleanup 2010-08-25 20:11:47 +02:00
Melanie Thielker
314d1171ef Lock the attachment cleanup so it doesn't go into an endless deletion frenzy 2010-08-25 16:06:06 +02:00
Melanie
ef5b628191 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-24 19:22:00 +01:00
Melanie
7296286267 Merge branch 'master' into careminster-presence-refactor 2010-08-24 19:20:43 +01:00
Melanie Thielker
4e324ae3cb Call the cleanup after saving attachment states, so that the attachments
don't get killed before they can be saved
2010-08-24 19:07:42 +02:00
Melanie Thielker
512a13dbe7 Call the Cleanup when an agent logs out, when an agent leaves and just
before an agent logs in directly. Intentionally not calling this from MakeRoot
as that would mess up attachment transfer in teleport
2010-08-24 18:52:00 +02:00
Melanie Thielker
5a05de0eec Call attachment cleanup when an agent crosses out 2010-08-24 18:38:54 +02:00
Melanie
483fc88b07 Merge branch 'master' into careminster-presence-refactor 2010-08-24 17:37:11 +01:00
Melanie Thielker
b9e12ed3b7 Add a method to delete left over / dropped attachments 2010-08-24 18:20:24 +02:00
Melanie
1bfec00a88 Merge branch 'master' into careminster-presence-refactor 2010-08-23 23:55:15 +01:00
meta7
8a1640f0a1 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-22 09:32:49 -07:00
meta7
46412f4931 Fix llGetLinkKey and llGetNumberOfPrims to play nice with avatars in the linkset (emulated) 2010-08-22 09:32:40 -07:00
Melanie Thielker
5c368c8d38 Refix the fix 2010-08-22 16:44:22 +02:00
Melanie Thielker
0ca771c185 Provide a better implementation of llList2Float 2010-08-22 16:23:36 +02:00
Melanie Thielker
98b2d3a7f2 Revert "Fix a typecasting issue in llList2Float. This addresses mantis #262"
This reverts commit 810840b862.

This breaks llList2Float in horrible ways. 12 hours 14 minutes becomes
1214.0 and 023.145 becomes 23145.0
Could just add the dot to fix the latter issue but that would not help
the first part. Another solution is needed.
2010-08-22 15:55:23 +02:00
Melanie Thielker
32ddeab5e3 Add printing the default script engine name. Report real exceptions when
there is an issue with the config file, as a typo could cause configuration to
silently fail.
2010-08-22 14:26:58 +02:00
Melanie Thielker
071edaff49 Suppress error messages about scripts not foind if they're in fact disabled 2010-08-22 13:51:15 +02:00
Melanie Thielker
a0a25bb8ca A stab at making a better bounding box calculation 2010-08-22 13:42:29 +02:00
Melanie Thielker
8613336674 Don't allow oversized search reply packets 2010-08-21 17:48:49 +02:00
meta7
3ffdadef70 Add support for attached avatars in llGetLinkKey() 2010-08-21 07:22:41 -07:00
meta7
839b08c32b Removed the NotImplementedException from llSetSoundQueueing, because the function not working won't actually stop the script from working, firing an exception will. 2010-08-21 06:30:53 -07:00
Melanie
f8ff98577e Merge branch 'master' into careminster-presence-refactor 2010-08-21 00:32:26 +01:00
Melanie Thielker
f7c4be1fa1 Forward-port a small improvement to the land out connector 2010-08-21 00:46:16 +02:00
meta7
c448151f6b Someone from germany broke the build :P mentioning no names 2010-08-20 11:38:59 -07:00
Melanie Thielker
4708083434 Use the database mthod directly to delete items in a single sql swoop 2010-08-20 18:53:33 +02:00
meta7
b1790ba56e Delete items as well as folders in XInventoryService.PurgeFolder - this should make emptying the trash work properly. 2010-08-20 11:25:31 -07:00
meta7
187ccd72f0 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-20 11:01:03 -07:00
meta7
cc8864b0e3 Get maturity level from access number. This addresses mantis #269 2010-08-20 11:00:14 -07:00
Melanie Thielker
47838e5fb3 Add some maptile options, change maptile generation from OpenSimBase to Scene
to make it more configurable.
2010-08-20 08:46:46 +02:00
Melanie
1ab631f015 Merge branch 'master' into careminster-presence-refactor 2010-08-19 20:25:17 +01:00
Melanie Thielker
a1074cad5c Short-circuit the grid server lookup for RequestSimulatorData if the region
info is requested for is the local region
2010-08-19 20:41:55 +02:00
Melanie
77705145a0 Merge branch 'master' into careminster-presence-refactor 2010-08-19 11:47:50 +01:00
Melanie Thielker
1a8a11140c Revert "Adding Group managment to the offline system"
This reverts commit 7c673c79d4.

That module only handles text IM
2010-08-19 12:04:46 +02:00
Melanie Thielker
fdc59ee802 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-19 12:02:26 +02:00
Melanie Thielker
0344395776 Skip conversion if fields that are null in the database. This may
uncover errors elsewhere.
2010-08-19 12:01:40 +02:00
sacha
7c673c79d4 Adding Group managment to the offline system
Sending a group invite is offlined now
2010-08-19 08:31:51 +00:00
Melanie Thielker
fb2deb0d45 Prevent a bad cast in llCreateLink(). 2010-08-18 20:17:20 +02:00
meta7
810840b862 Fix a typecasting issue in llList2Float. This addresses mantis #262 2010-08-18 04:23:56 -07:00
meta7
ca8b1e488c Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-18 02:53:27 -07:00
Melanie
e74809ff4c Merge branch 'master' into careminster-presence-refactor 2010-08-18 00:59:20 +01:00
Melanie Thielker
f2d7f3e731 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-14 14:00:12 +02:00
Melanie Thielker
a32b0ce0ae Fix a possible nullref in BestAvatarResponsiveness policy 2010-08-14 13:59:36 +02:00
sacha
042eb80a62 clearing some debugmessages 2010-08-14 08:59:57 +00:00
meta7
b43a731beb Fix a nullref exception in the prioritizer 2010-08-12 05:40:41 -07:00
meta7
df9521caf3 Add ini.example section for the MOTD module. 2010-08-11 15:30:42 -07:00
meta7
7aac4d650f Fix the llRemoveInventory recursive lock error (again) 2010-08-11 14:30:09 -07:00
meta7
24577876be Add some console debug to help fix a threadlock issue. 2010-08-11 14:10:47 -07:00
meta7
ac581b532e Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-11 13:40:31 -07:00
meta7
fa393cb13a Fix Omega getting overwritten on startup. 2010-08-11 13:39:36 -07:00
Melanie Thielker
d00a954d35 Log the state of the prejump flag 2010-08-11 03:09:56 +02:00
Melanie Thielker
a5a60df687 Change chat packets to bypass the throttles. This should alleviate chat lag 2010-08-11 02:52:52 +02:00
Melanie Thielker
af60b8ac16 Set triggering the texture and height update on a two second timer. This fixes
the texture rubberbanding.
2010-08-10 22:52:51 +02:00
meta7
1582e05ac7 Fix a nullref issue in the AgentSetAppearance packet handler when removing the physactor from the scene 2010-08-10 09:55:40 -07:00
meta7
48c52d6e48 Fix a dangling lock issue in llRemoveInventory 2010-08-10 09:50:18 -07:00
meta7
fb14390fb0 Note to self: don't break the build 2010-08-10 09:17:30 -07:00
meta7
9fba4b66bb Resolve merge failure 2010-08-10 09:11:55 -07:00
Melanie
5e8c3f8325 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-10 20:12:13 +01:00
sacha
7fead01786 remoning debug messages 2010-08-10 19:43:32 +00:00
sacha
d0a22fb359 fixed ground texture issues ( it seems ) 2010-08-10 19:35:17 +00:00
Melanie
24b9a2885f Resolve merge issues 2010-08-10 20:11:55 +01:00
Melanie
c2e5d1d203 Merge branch 'master' into careminster-presence-refactor 2010-08-10 19:49:35 +01:00
Melanie
383ee0d647 Remove 4000+ DOS line endings. Grrr! 2010-08-10 19:48:45 +01:00
Melanie
d98d5ee6be Remove windows line endinge 2010-08-10 19:42:18 +01:00
meta7
1ead2ed5ee Add a stack trace to the error output on the recursive read lock warning on my RWlocks. Whilst recursive locks are safe, coupled with other issues we're experiencing with the TaskInventoryDictionary it implies that somewhere the lock is not being freed possibly due to a merge error somewhere, and thus it needs to be looked into. 2010-08-10 09:07:17 -07:00
meta7
912bfba20c Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-09 23:36:59 -07:00
meta7
eb5c508f8b Add a DebuggerSafe option to the ini to help with debugging in visual studio. This essentially silences exceptions in the script engine. Disabled by default, naturally. 2010-08-09 23:35:40 -07:00
meta7
f0bad66d41 For my own sanity, fix a bug in xengine 2010-08-09 23:34:37 -07:00
Melanie Thielker
0f9eebdfb1 Change prejump from hardcoded true to default true so it can be disabled.
It completely destroys roleplay jumping
2010-08-10 03:52:00 +02:00
meta7
bef6fa37b9 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-08 18:57:16 -07:00
meta7
32ccc19a62 Make fallbacks work, the destination was never actually updated with the fallback details. 2010-08-08 18:56:47 -07:00
Melanie Thielker
f20dc512e8 Whitespace conflict 2010-08-09 02:46:09 +02:00
Melanie
1f052520ae Merge branch 'master' into careminster-presence-refactor 2010-08-09 02:27:54 +01:00
meta7
680e801bf2 Print a console message when we deny access because of no valid parcel found. 2010-08-08 17:32:20 -07:00
meta7
603b3a1606 Fix minimap issues. This addresses mantis #228. 2010-08-08 17:31:29 -07:00
Melanie
b0795bcfef Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-09 00:49:40 +01:00
Melanie
52f49b2a78 Merge branch 'master' into careminster-presence-refactor 2010-08-09 00:49:15 +01:00
Melanie Thielker
ca2a4bbded Add debug messages to attachment receiving and cowardly refuse to create
them if the owner can't be determined.
2010-08-08 19:35:20 +02:00
Melanie
321e1148da Merge branch 'master' into careminster-presence-refactor 2010-08-08 18:24:33 +01:00
Melanie Thielker
6cb50c49b5 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-08 17:53:25 +02:00
Melanie Thielker
1cde77293e Thank you, Marck00, for a patch that implemented region distance sorting
for fallback regions. Applied with changes.
2010-08-08 17:51:43 +02:00
meta7
a1f2be5e69 The real fix for unscripted sit positions. This one doesn't fuck everything else up. Promise. 2010-08-07 22:25:37 -07:00
meta7
f9b5f23383 Reverted: * Fix the unscripted sit rotation being incorrect .. will commit a proper fix now. 2010-08-07 22:19:26 -07:00
meta7
12dd97c9f8 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-07 20:14:58 -07:00
meta7
0794c6a941 Implement parcel group access control. This addresses mantis #158. 2010-08-07 20:13:45 -07:00
meta7
aa54e8d95e Increase sit distance to 256 meters, but leave the initial autopilot process in the picture so sit position can still be raycast by the existing code. 2010-08-07 17:35:16 -07:00
meta7
b771965f28 Get rid of some debug chatter that someone who can't spell left behind. ;) 2010-08-07 17:33:27 -07:00
meta7
acb1590cf0 Fix the unscripted sit rotation being incorrect (relative to the prim). Note that unscripted sit offset is still really poor but this is not something i'm prepared to spend time on fixing. 2010-08-07 17:32:36 -07:00
Melanie Thielker
d2b3d45d76 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-08 02:04:37 +02:00
Melanie Thielker
50ac61e17f In my crusade against facelights, I am striking the killing blow. Add a
DisableFacelights option to OpenSim.ini to finally kill those immersion-
breaking, silly vanity lights that destroy nighttime RP. Girls, you look
just fine without them. Guys, you too. Thank you. Melanie has left the building.
2010-08-08 02:01:24 +02:00
meta7
19ab4c9508 Fix a rather nasty issue where the Backup() process causes objects and avatars sitting on them to be pushed to the corner of the sim. 2010-08-07 16:52:03 -07:00
meta7
8d3a73d126 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-07 16:32:18 -07:00
meta7
a6048518b7 Repair lsGetWindlightScene, the constant was added to the list as a uint, which is bad - convert to LSL_Integer first. 2010-08-07 16:18:44 -07:00
Melanie
4c5788c4c0 Add search URL to Login Service 2010-08-07 22:24:17 +01:00
Melanie
68e4b1115a Dumb error in fix 2010-08-07 22:23:51 +01:00
Melanie Thielker
71f2cec1bd Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-07 22:11:18 +02:00
sacha
4900d39b7d Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-07 21:05:18 +00:00
sacha
478d835392 removing more stains ... 2010-08-07 21:04:16 +00:00
Melanie Thielker
7bac069976 Mantis #229. Fix Global sim ccordinates 2010-08-07 22:10:46 +02:00
meta7
cabbd187e7 Fix the distance from which autopilot is negated when sitting on an unscripted prim - and also add some more Velocity code to ensure it gets set to zero in all cases 2010-08-07 11:13:05 -07:00
Melanie Thielker
97f8175090 Delete some files from bin that should not have been committed 2010-08-07 18:34:11 +02:00
meta7
413b0525db It seems hippo disregards velocities in full updates, so also send a terse update when an agent sits to avoid drifting off 2010-08-07 11:06:07 -07:00
meta7
19debab060 Fix the general alert message so it doesn't get sent to child agents 2010-08-07 08:17:11 -07:00
meta7
b017d985ab Add some nullref checks to the UnackedPacketCollection. 2010-08-07 08:06:41 -07:00
sacha
b58a47c373 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-07 13:41:56 +00:00
sacha
00cc42a607 and another endless debug cleaning 2010-08-07 13:40:38 +00:00
meta7
bcb3b57f8d Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-07 06:33:51 -07:00
Tom
4f80d75bf3 Add a CHANGED_POSITION event so scripts don't have to run expensive loops to check for position changes 2010-08-07 06:28:04 -07:00
sacha
047a4764f2 and another one... 2010-08-07 13:19:53 +00:00
sacha
e69efdd4ce Clean the loo after use please !!!!!
No need to keep useless debug message !
Never heard of wasted cpucycle you darn kid !
2010-08-07 13:13:27 +00:00
Melanie
8fd3f6cf7f Merge branch 'master' into careminster-presence-refactor 2010-08-07 05:41:41 +01:00
Melanie Thielker
c554de7501 Correct display of landmark about info. Also correct region maturity rating
in LM info. Maturity is NOT the parcel's setting, that is only for the
image and text. Parcel maturity is governed by region maturity.
2010-08-07 05:45:52 +02:00
Melanie Thielker
fa11ac8c85 Change the (hackish) constant to match the changed enum for attachs 2010-08-07 05:42:30 +02:00
Melanie Thielker
7477d7a036 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-07 03:40:01 +02:00
Melanie Thielker
a783f048a3 Make the landmark properties and search places work again 2010-08-07 03:38:35 +02:00
Tom
f9f776e407 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-06 11:44:57 -07:00
Tom
330343505c Implement CreateNewOutfitAttachments. This addresses mantis #199. 2010-08-06 11:39:10 -07:00
Melanie
26387252f5 Merge branch 'master' into careminster-presence-refactor 2010-08-06 18:08:40 +01:00
Tom
e941da205b Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-06 09:54:09 -07:00
Tom
03da22378e Estate managers should be allowed to add and remove new users, groups and bans to/from the estate settings. 2010-08-06 09:53:40 -07:00
Tom
0d4086e602 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-06 08:09:10 -07:00
Tom
52e2360e91 Since i've narrowed the fault down to one function, add some spammy debug to try and fix ghost prims on HUDs in future. Note, the console only gets messages if there is a problem, so it's harmless. 2010-08-06 08:08:43 -07:00
Melanie Thielker
5559422d32 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-06 16:09:45 +02:00
Melanie Thielker
c48be64d9a Remove posting region restart event from SOP, as it's now in XMRe 2010-08-06 16:08:50 +02:00
Tom
3ce335c6f8 Fix StateSource constants, provide RegionStart 2010-08-06 06:41:25 -07:00
Tom
a636af13e7 Make sure the avatar position gets moved along with a prim it is sitting on. This fixes mantis #208 and (maybe) issues with chat and sound coming from the wrong place when sat on a vehicle. 2010-08-06 06:37:40 -07:00
Melanie Thielker
696c2c429b Change XEngine to use the new constant 2010-08-06 15:33:22 +02:00
Melanie Thielker
42613ec536 Allow the trash folder itself to be passed to PurgeFolder 2010-08-06 15:18:48 +02:00
sacha
5da272d042 reverese my last commit 2010-08-06 14:45:54 +00:00
sacha
23d1f0978e Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-06 14:39:34 +00:00
sacha
a390541e1c Allowing the expected purge trash folder...
Please validate !!!
2010-08-06 14:38:11 +00:00
Tom
0a004f8c44 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-06 02:43:26 -07:00
Tom
c5c6627adb Implement CHANGED_REGION_(RE)START and also fix various CHANGED_* constants which had the wrong values (checked using LSL in SL). This addresses mantis #217 and mantis #53. 2010-08-06 02:40:31 -07:00
Melanie Thielker
d7fe9f7b44 Prevent users from becoming stuck online. This affects only 0.7 2010-08-06 00:02:38 +02:00
Melanie Thielker
7368992ee9 Actually cache positives 2010-08-05 23:48:55 +02:00
Melanie Thielker
d8f9b98c4a Prevent hammering the grid services with llRequestAgentData requests. Cache the
user information permanently, and the online status for 20 seconds. Also
cache negatives.
2010-08-05 22:50:09 +02:00
Melanie Thielker
8bdbcda2b7 We already have a record of killed prims. It just wasn't used by the new
JHurlicane code anymore. Use it to prevent sending updates after kills.
2010-08-05 18:50:17 +02:00
Melanie Thielker
05520d676c Revert "Enforce a 0.2 second sleep on llDie() before the command is executed - this should get rid of ghost prims (which are much rarer, but still occuring)"
This reverts commit 85fd2def9c.

The sleep helps in only one case: static prims rezzed by script.
In other cases (physical prims, bullets) it's harmful.
2010-08-05 18:45:17 +02:00
Tom
0eda6714f3 llRequestSimulatorData DATA_SIM_POS : Divide by RegionSize, don't multiply. This resolves mantis #215 2010-08-05 08:41:08 -07:00
Tom
85fd2def9c Enforce a 0.2 second sleep on llDie() before the command is executed - this should get rid of ghost prims (which are much rarer, but still occuring) 2010-08-05 08:15:05 -07:00
Tom
8689cdd4dc Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-04 19:47:47 -07:00
Tom
663e25fd3a Pacify osGetAvatarList to provide LSL types instead of omv types 2010-08-04 19:46:41 -07:00
Kitto Flora
0871d20adb Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-04 21:08:14 +00:00
Kitto Flora
cb3b124df9 Fixes fresh hollowed prim collision shape. 2010-08-04 21:08:00 +00:00
Melanie Thielker
4a33210771 Send attachment updates only to the owner if it's a HUD 2010-08-04 18:12:31 +02:00
sacha
a48c493210 Cost Reduction : Removing verbose message.... 2010-08-04 08:16:55 +00:00
Tom
463fbb4990 If a user has no home position set, tell them so instead of leaving the request dangling 2010-08-04 00:17:02 -07:00
Tom
c8f09f7fcb Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-03 22:42:32 -07:00
Tom
cd9506e842 Don't know HOW we missed this, llSetPos was broken in child prims (and in the llSetPrimitveParams family), it was using the global coordinate as a start location. This resolves mantis #204 2010-08-03 22:41:02 -07:00
Tom
6076eb5558 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-03 19:55:57 -07:00
Tom
f1c51c8bb4 Scripted sit target fixes 2010-08-03 19:51:32 -07:00
Melanie Thielker
b38d69287a Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-04 03:24:06 +02:00
Melanie Thielker
0020dbee23 Remove StandAlone from default hardcoded config 2010-08-04 03:23:19 +02:00
Melanie Thielker
5ff9db7388 Clean up some messiness in IM sending. Having offline IM enabled now no longer
suppresses "Inventory Saved" messages.
2010-08-04 02:51:41 +02:00
Melanie Thielker
d57bfec702 A god is a god is a god is a god. Right? Right. You're a god from 200, let's
show it!
2010-08-04 02:16:46 +02:00
Melanie
757929012e Merge branch 'master' into careminster-presence-refactor 2010-08-04 01:11:47 +01:00
Melanie
164719119b Merge branch 'master' into careminster-presence-refactor 2010-08-04 01:01:08 +01:00
Melanie
e12993ed22 Merge branch 'master' into careminster-presence-refactor 2010-08-04 00:33:02 +01:00
Melanie Thielker
d9ae837063 Allow specifying default region flags. Correct a typo. 2010-08-04 00:45:15 +02:00
Tom
e3cea888fb Fix some more issues causing regions with corrupt sculpts to freeze. 2010-08-03 16:07:18 -07:00
Tom
ae99c1393d Fix scripted sit offset in child prims 2010-08-03 15:31:04 -07:00
Tom
2221517935 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-03 14:12:05 -07:00
Tom
1d1da5069c Catch a meshing exception caused by corrupt or missing sculpt maps, and mark the prim as "mesh failed" so it doesn't try meshing continuously 2010-08-03 14:11:11 -07:00
Mike Rieker
6e3c79f31e don't mask current time reads (since we don't mask the corresponding subtract)
if you mask the reads you have to mask the subtract as well.
simplest is just don't mask any of it.
2010-08-03 20:09:00 +00:00
Tom
f04d51378f Drop the RestClient timeout from 15 minutes to 30 seconds. This does not address the problem, but it will allow the regions to recover in the event that the remote server goes away. 2010-08-03 11:06:41 -07:00
Melanie Thielker
e3184753a6 Log the UUID of a prim that fails meshing and set the prim to phantom during
region startup
2010-08-03 05:25:23 +02:00
Melanie Thielker
d2d1c63b17 Revert "Catch meshing error in Meshmerizer"
This reverts commit 8f2986bc6a.

In favor of a fix that tells us where the issue is instead of eating the error
2010-08-03 05:25:01 +02:00
Tom
ecfea5fa69 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-08-02 21:56:30 -07:00
Tom
8f2986bc6a Catch meshing error in Meshmerizer 2010-08-02 21:54:47 -07:00
Melanie Thielker
16e90809a9 Remove the (wrong) implementation if llPointAt. It never worked on the LL
grid and is officially deprecated. There is no way to rotate an avatar
programmatically.
2010-08-02 00:54:58 +02:00
Tom
d2d56494b2 Fix the XmlRpcRouterModule so it reads from the correct config section ([XMLRPC] not [Startup]) and disable by default (since it's disabled in the ini by default) 2010-08-01 10:24:43 -07:00
Tom
763dc8bb76 Add an m_enabled flag to XmlRpcRouterModule so it won't try to bind the xmlrpc_uri event if it's not mentioned in the ini. 2010-08-01 10:24:17 -07:00
Tom
b860c8021e First, change DefaultPermissionsModule so it returns the correct name...
... Then, make sure we also check the old-style module stack before we throw a tantrum
2010-08-01 10:23:48 -07:00
Tom
d5f497478a Add config option securePermissionsLoading which will stop the region from loading if the specified permissions modules fail to load. 2010-08-01 10:21:56 -07:00
Melanie
5f94b98cb2 Merge branch 'master' into careminster-presence-refactor 2010-08-01 18:00:04 +01:00
Melanie
dd2d9a68a7 Merge branch 'master' into careminster-presence-refactor 2010-07-31 01:05:13 +01:00
Melanie
3302e8ddc4 Merge branch 'master' into careminster-presence-refactor 2010-07-31 00:57:50 +01:00
Melanie Thielker
f9280374d2 Bannination fixes. Objects in nonpublic parcels were muted by default. Gods
were muted, too.
2010-07-30 15:03:03 +02:00
Melanie
7a9e246ccd Merge branch 'master' into careminster-presence-refactor 2010-07-29 16:20:59 +01:00
Melanie Thielker
7871dd606e Allow gods and estate managers/owners to be unaffected by parcel bans 2010-07-29 16:33:20 +02:00
Melanie Thielker
516ec4acd0 Eat a lockign exception that kills scripts. May bear more investigation
in the long run.
2010-07-25 08:11:39 +02:00
Melanie Thielker
83aec1ec94 Fix a little infinite recursion i added just for sh.ts and giggles. NOT. 2010-07-22 23:47:10 +02:00
Melanie Thielker
7ebabf185e change the delay to 0.2s. My bad. 2010-07-22 19:31:02 +02:00
Melanie Thielker
ce8b9b4181 LSL compatibility fix. Add 0.1 s sleep to llSetLinkPrimitiveParams so fade scripts will time correctly. The -Fast version works without a delay 2010-07-22 19:20:09 +02:00
Melanie Thielker
fb89d0ff4e Allow megaregions to be used in M7, should we so decide 2010-07-21 12:32:23 +02:00
Melanie Thielker
d4022becc3 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-21 12:16:30 +02:00
Melanie
f63a4c8f2f Merge branch 'master' into careminster-presence-refactor 2010-07-21 12:03:44 +01:00
Melanie Thielker
c72c84b455 Refine autoreturn a bit 2010-07-21 12:16:17 +02:00
Melanie
4ccc141764 Resync with master 2010-07-20 21:49:31 +01:00
Melanie
c0b8cbd85b Merge branch 'master' into careminster-presence-refactor 2010-07-20 21:47:53 +01:00
Melanie
dcf7973c9b Merge branch 'master' into careminster-presence-refactor 2010-07-20 21:39:20 +01:00
Melanie
686837d9ed Merge branch 'master' into careminster-presence-refactor 2010-07-20 21:18:27 +01:00
Melanie Thielker
fd66ee57f3 When a god uses mass permission setting, the V bit is cleared from next
perms, rendering the item unmoveable for the next owenr. Make god mods
conform to the rules, too.
2010-07-20 14:45:46 +02:00
Melanie Thielker
191bee2ed0 Remove the null checks altogether 2010-07-20 00:55:31 +02:00
Melanie Thielker
54da64acac Remove exception badness in the LSL Types. Who ever came up with that.....?! 2010-07-20 00:46:39 +02:00
Melanie Thielker
c263fc54ac Add a state change method to the Async commands handler to allow timers
and http requests to survive state changes
2010-07-18 21:05:50 +02:00
Tom Grimshaw
c088397ec7 If the client requests that an object be deleted, and the SOG/SOP is null and/or is marked as deleted, just send the KillObject 2010-07-18 06:01:26 -07:00
Tom Grimshaw
fabe2206db Ensure that packets do NOT get delivered to a client before the modules that can deal with the client's response have finished loading. 2010-07-17 15:08:59 -07:00
Tom Grimshaw
17412389f3 Revert 233c872.. "* Call client.Start() sunchronously. Calling thos async avoids some stuttering", pending fix for the core issue 2010-07-17 14:34:35 -07:00
Tom Grimshaw
ef6565470f XGitminster: Update config options; commitFrameInterval -> CommitInterval and a new option DisableNonEssentialCommits 2010-07-17 06:54:46 -07:00
Melanie Thielker
d52fb4d2e9 Shorten LLEmail delay to 15s. With the external spam protection, we can
afford to do that
2010-07-17 16:35:14 +02:00
Melanie Thielker
22371ac527 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-17 16:33:31 +02:00
Melanie Thielker
c41d418380 Allow communicating with blue box dialogs across a region border via a
child agent
2010-07-17 16:32:55 +02:00
Melanie
859e3252be Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-17 03:18:01 +01:00
Melanie Thielker
d1040c9ff9 Replace the screenful of code i deleted. 2010-07-17 02:46:04 +02:00
Melanie Thielker
e06b7ee368 Make webloading more robust by addign retries 2010-07-17 02:38:00 +02:00
Melanie Thielker
85f454e3ae Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-17 02:26:34 +02:00
Melanie Thielker
9bf6179d24 Fix scripted give of items 2010-07-17 02:26:09 +02:00
Kitto Flora
236c0f8e8b Fix llSetForecAndTorque([0]) stops linear motion. Mantis #187 2010-07-16 22:17:06 +00:00
Melanie Thielker
2e5f200b3b Fix showing CreateSelected on all parts of a rez 2010-07-16 20:23:41 +02:00
Melanie Thielker
3f91805afb prevent hacked viewers from being able to delete arbitrary items from any
prim. Allow friends with perms and shared group members to move or copy
things out of prims
2010-07-15 20:28:18 +02:00
Melanie Thielker
8d2b4b7b48 Fix a few permissions vulnerability. Owners could cause permissions
escalation on items contained in prims using a hacked viewer
2010-07-15 20:03:08 +02:00
Melanie
0dd2496a56 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-14 23:03:59 +01:00
Melanie Thielker
50d56c54a3 Detach attachments displaced by other attachments 2010-07-14 23:03:38 +01:00
Melanie Thielker
ddfff55cc7 Preserve attachment data while a prim is in world. Allows attachment
editing on the ground without losing attachpoint and position
2010-07-14 21:06:49 +02:00
Melanie
0b74662ce2 Merge branch 'master' into careminster-presence-refactor 2010-07-14 19:53:15 +01:00
Melanie Thielker
d665f0ae66 Detach attachments displaced by other attachments 2010-07-14 20:46:26 +02:00
Melanie Thielker
bebbe407ee Major attachments cleanup. Remove unused AttachObject ClientView method
Clean up use of AttachObject throughout, reduce number of overloads
and number of parameters
2010-07-14 19:58:23 +02:00
Melanie Thielker
0c445239a6 Remove useless quaternion parameter from AttachObject sig 2010-07-14 19:21:01 +02:00
Melanie
d1f94b5d58 Merge branch 'master' into careminster-presence-refactor 2010-07-14 16:12:14 +01:00
Melanie Thielker
cbb3a8ab94 Fix a permissions issue 2010-07-14 16:21:55 +02:00
Melanie Thielker
af13c80d68 Remove getting the object capacity from the money module. It is now set
directly from the Region Info (and the region ini file)
2010-07-14 03:59:26 +02:00
Tom Grimshaw
c5891c14c7 Bail out in AttachToBackup if the group is an attachment 2010-07-13 15:32:35 -07:00
Tom Grimshaw
7270cd0ade Second part of the fix for llGetLocalPos; get attachment offset in the root prim of an attachment. This function now behaves in line with SL. 2010-07-13 14:57:50 -07:00
sacha
8c2e1c6c29 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-13 21:12:01 +00:00
sacha
8c26c8bbc6 adding the 'wearble' case for llGetLocalPos.
Still not working cause the offsets are not updated (always <0,0,0>)
2010-07-13 21:10:26 +00:00
Kitto Flora
84227fd558 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-13 20:37:45 +00:00
Kitto Flora
7ab103c96f Rewrite collision dictionary handling, cleans up deleted obects/avs. Fixes occasional collision event failure. ChOde only. 2010-07-13 20:37:13 +00:00
Melanie
eacf3d9221 Merge branch 'master' into careminster-presence-refactor 2010-07-13 20:46:21 +01:00
Melanie Thielker
89c1c5c35a Revamp the permissions propagation. This MAY mess up. Please test.
Change the slam bit from 3 to 4. Assume the old slam bit is always set.
The new slam bit is a "changed owner" bit, correcting a bug where an item
passed from the creator to another with less than full perms, then back (sale
test) would arrive back full perm. Lots of in-code docs.
2010-07-13 20:40:23 +02:00
Melanie Thielker
31cbd6d113 Add CreateSelected flag onto objects rezzed from inventory 2010-07-13 18:23:23 +02:00
Tom Grimshaw
5f4105d48c Removed the CHANGED_COLOR event post from the Color accessor in SOP. This is not the correct usage of this changed event - it's only supposed to be posted when the /textures/ change colour or alpha transparency, not the floating text. This fixes several race conditions in scripts ported from SL. 2010-07-12 13:55:56 -07:00
Melanie Thielker
7f0f11304f Add scripted controllers into agent intersim messaging 2010-07-11 14:26:57 +02:00
Melanie
922e874653 Merge branch 'master' into careminster-presence-refactor 2010-07-11 13:32:10 +01:00
Tom Grimshaw
cea856cfc2 Fix the synchronousrestformsrequester so it will successfully handle a response from a server which does not provide a valid content length header 2010-07-10 19:00:12 -07:00
Tom Grimshaw
cecd660388 Fix an issue where the SynchronousRestObjectRequester will fail if a webserver does not report a content length (-1), but the content is still valid 2010-07-10 18:48:49 -07:00
Melanie Thielker
8aa5f30082 Make taken items go back to the folder they came from 2010-07-10 10:51:49 +02:00
Melanie
05b35eb57c Correct a merge artefact 2010-07-08 18:17:02 +01:00
Melanie
5f400a50be Merge branch 'master' into careminster-presence-refactor 2010-07-08 17:32:57 +01:00
Mike Rieker
faaef1b498 minimizes temp garbage for llParseStringKeepNulls()
and uses common routine for llParseStringKeepNulls()/llParseString2List()
2010-07-06 23:59:06 +00:00
Mike Rieker
6e7f1a3ac1 Merge branch 'careminster-presence-refactor' of www.3dhosting.de:/var/git/careminster into careminster-presence-refactor 2010-07-06 02:23:10 +00:00
Mike Rieker
90c5555d6d rewrote hanging llParseStringKeepNulls() 2010-07-06 02:22:47 +00:00
Tom Grimshaw
e947d04038 Undo fix is now complete. This commit repairs the special case of the root prim moving or rotating independently of the rest of the group. 2010-07-05 05:44:35 -07:00
Tom Grimshaw
be5dd04150 Bring "Redo" up to date with "Undo" so it works too 2010-07-05 03:58:18 -07:00
Tom Grimshaw
8849b9af8b Fix single prim rotation undo. All UNDO functions are now working correctly except for when the root prim is moved or rotated as a single prim (coming soon). 2010-07-04 20:45:11 -07:00
Tom Grimshaw
c616335019 Rotation undo fix and remove a debug chatter i missed. Still not working: Individual child prim rotational undo and special cases where the root prim was moved or rotated (all the children then need to restore their offsets). Coming shortly. 2010-07-04 19:58:52 -07:00
Tom Grimshaw
5b68343361 The majority of the Undo fix. There is still an issue with Rotation which i'll address next; however position undo and scale undo should be working just fine now. Also removed some residual debug logging. 2010-07-04 19:28:39 -07:00
Tom Grimshaw
7665013ad8 Correct positioning of timeout modifier in the SynchronousRestObjectRequester 2010-07-04 19:25:54 -07:00
Tom Grimshaw
f3e902092a Add System.Core assembly reference to two projects so that TimeZoneInfo can be used 2010-07-04 12:51:48 -07:00
Tom Grimshaw
14ab22dcd4 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-04 06:51:01 -07:00
Tom Grimshaw
3368e3853a Check cached asset to make sure it contains data, and if not, re-request 2010-07-04 06:45:04 -07:00
Melanie
8a45191aa9 Merge branch 'master' into careminster-presence-refactor 2010-07-04 11:02:21 +01:00
Melanie Thielker
baa20a10c3 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-03 20:29:06 +02:00
Melanie Thielker
edcfaf60c9 Fix IMs the right way. This sets it up so that timestamps are actually
in PST (to match viewer time), does correct storage and retrieval of
IMs, corrects the session ID and makes sure IMs don't get marked "saved"
if they're live. Removes the group IM save option, which our group IM
module never had in the first place, as saving group chatter makes no
sense at all.
2010-07-03 20:27:00 +02:00
Tom Grimshaw
4cd5e64231 Use SendTransferAbort in a more sensible place 2010-07-03 09:22:58 -07:00
Tom Grimshaw
e4739523d3 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-03 06:11:46 -07:00
Tom Grimshaw
fe2b044d38 Fix Undo! Made a lot of changes to Undo state saving; it now considers that groups of objects can be moved and not just individual prims.. 2010-07-03 06:10:55 -07:00
Tom Grimshaw
39ae1def85 Re-implement the Undo stack as a List; the old implementation was buggy 2010-07-03 06:10:02 -07:00
Tom Grimshaw
2b49cb9227 Make sure the AssetServiceConnector times out within 30 seconds. If it doesn't, the client will get bored and give an upload error, instead of granting success and entering the asset into our retry queue. 2010-07-03 06:09:20 -07:00
Tom Grimshaw
3d495b709e Implement a timeout value in the SynchronousRestObjectRequester. Default is 100 seconds. 2010-07-03 06:08:18 -07:00
Melanie Thielker
86a82e6ecb Now, fix the slash issue the right way. Our URLs now work like SL's 2010-07-03 08:33:08 +02:00
Melanie Thielker
721d8a7298 Re-add the slashes at the end of the URL. Too much depends on them 2010-07-03 07:09:27 +02:00
Melanie Thielker
233c872d24 Call client.Start() sunchronously. Calling thos async avoids some stuttering
when people log in, but fatally screws up money.
2010-07-02 09:40:58 +02:00
Melanie Thielker
c87e6a289c Clean up IMoneyModule and adjust the other modules to the changes 2010-07-02 06:20:36 +02:00
Melanie Thielker
beb5259cd1 Remove GetEconomyData and the economy data structure (unused) 2010-07-02 04:51:31 +02:00
Melanie Thielker
a7c4cb95aa Fox another scripting nasty. Stuff no system.string objects into lists 2010-07-02 04:26:55 +02:00
Melanie Thielker
120c9a4ebb Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-02 03:11:18 +02:00
Melanie
ec73074aac Merge branch 'master' into careminster-presence-refactor 2010-07-02 03:02:53 +01:00
Melanie Thielker
60c15d7c28 Fix a dumb little sign error that makes a LSL wiki example fail 2010-07-02 03:05:40 +02:00
Tom Grimshaw
68281b356c Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-01 09:47:18 -07:00
Tom Grimshaw
071d601dcb Cache all assets on upload so that the client can still retrieve the asset if it enters a retry queue 2010-07-01 09:46:57 -07:00
Tom Grimshaw
b38a22506b Fix build break 2010-07-01 08:57:13 -07:00
Tom Grimshaw
38384cc79c Report asset upload success if it has previously failed 2010-07-01 08:52:30 -07:00
Tom Grimshaw
4851706d35 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-01 08:49:53 -07:00
Tom Grimshaw
1cb7695fb0 Catch newid == null which is what happens if the asset service is offline (seems a connection failure does not throw an exception) 2010-07-01 08:48:02 -07:00
Melanie Thielker
3d5d44279b ANother stab at LSL compatibility 2010-07-01 17:06:29 +02:00
Melanie Thielker
2312504b04 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-07-01 16:41:03 +02:00
Melanie Thielker
d5cbe4cb75 Remove trailing slash from HTTP URLs to be compatible with SL 2010-07-01 16:40:26 +02:00
Melanie Thielker
3940a4dbc7 Avoid a spurious error message when taking a friend's no copy item 2010-07-01 16:11:10 +02:00
Melanie
46a531d865 Merge branch 'master' into careminster-presence-refactor 2010-06-30 21:35:05 +01:00
Tom Grimshaw
9012084d11 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-29 23:19:08 -07:00
Tom Grimshaw
8dc7c0849e The other half of the asset fix. Implement an exponentially incrementing retry timer for asset upload failures. Total queue time in the ballpark of 24 hours, which should be a reasonable time for any grid admin to get their asset service back online. This should stop lost assets. 2010-06-29 23:18:48 -07:00
Melanie Thielker
3cd717d929 Comment the "Notecard saved" notification that pops up when a notecard
is saved into a prim. Sl doesn't have it, and for good reason: It also
happens on scripts in our version. Which is wrong. Better no message
than a wrong one.
2010-06-29 04:09:14 +02:00
Melanie Thielker
6f4d4543b9 Make newly created prims be named "Object" and make newly created scripts
have a default touch handler. Compatibility patch
2010-06-29 03:51:16 +02:00
Tom Grimshaw
06fa038875 Return a UUID.Zero if the asset fails to upload 2010-06-28 07:09:05 -07:00
Tom Grimshaw
a5a1df68c2 Provide the interface for StoreAsset to report success or failure 2010-06-28 04:02:33 -07:00
Melanie Thielker
3e908023b2 Force IM timestamps to current server time to prevent "Saved on" headers
while the sender is online
2010-06-28 08:58:51 +02:00
Tom Grimshaw
7807d11807 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-27 22:23:08 -07:00
Tom Grimshaw
827d9be48f Fix the sound issue. It was caused by missing assets; once the client has made one request, it continued to wait for asset before requesting any new ones, until the TransferRequest timed out. Fixed by adding a TransferAbortPacket if the asset cannot be retrieved. 2010-06-27 22:23:01 -07:00
Melanie Thielker
4fa1d4896c Change the way IRegionModule us referenced by IEmailModule to
allow later conversion to new style
2010-06-28 02:30:36 +02:00
Melanie Thielker
a817f6b48c Remove AgentID and GroupOD from the signature of SOG.Copy(). They were never
used, but made for a very mispleading read of the code in the callers.
2010-06-28 01:48:24 +02:00
Melanie Thielker
d570cffa39 Fix Copy on Ray, Drag Copy and other little things. Removed the wrong and
nonworking ownership assignment in SOG, which messed things up before.
No longer trust the client to send the ID of the person something is copied
as, since it allows to run a script with someone else's permissions. Properly
adjust inventory ownership and perms.
2010-06-28 01:29:30 +02:00
Melanie Thielker
2cced72d70 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-27 21:05:06 +02:00
Melanie
9c553cd254 Fix more perms weirdness. Preserve "Locked" status across gives and rez/take.
Preserve "Anyone can move" flag in most cases.
2010-06-27 20:20:08 +01:00
Melanie
ba38c697e8 Merge branch 'master' into careminster-presence-refactor 2010-06-27 20:05:55 +01:00
Melanie Thielker
19f18c8a1b Make drag copy and copy-on-ray handle friends list perms properly 2010-06-27 21:04:30 +02:00
Tom Grimshaw
ef0ac7c403 Deal with incoming land objects properly so they don't just stack up 2010-06-26 23:20:28 -07:00
Tom Grimshaw
9f00f141fe Restore "AllowCareminsterFunctions" as an alias to the new "AllowLightshareFunctions". 2010-06-26 18:54:55 -07:00
Tom Grimshaw
592ff1288d Add a new global event : OnTerrainUpdate 2010-06-26 18:51:19 -07:00
Tom Grimshaw
c97e9f8621 Reverting the ITerrainModule changes. Turns out this was useless. 2010-06-26 18:43:01 -07:00
Tom Grimshaw
3bcee57e3e add HasChanged to ITerrainModule 2010-06-26 17:34:19 -07:00
Tom Grimshaw
c3e806a2ea Add a new accessor for the TerainModule : "HasChanged" 2010-06-26 17:25:45 -07:00
Tom Grimshaw
49272657d7 Make RegionLightShareData serializable 2010-06-26 15:30:47 -07:00
Tom Grimshaw
8f0adfbfb2 Trigger the RegionLightShareData OnSave event properly when the profile is saved 2010-06-26 15:15:19 -07:00
Tom Grimshaw
d188ed8ed8 Return everything at once, it's more efficient that way 2010-06-26 13:07:17 -07:00
Tom Grimshaw
ed5dac7e82 Fix another nullref issue in DeRezSceneObject 2010-06-26 13:06:47 -07:00
Tom Grimshaw
bd19cf739a Fix a bug with DeRezObjects (check for a null remoteClient) 2010-06-26 12:38:08 -07:00
Tom Grimshaw
acab2a159d Return objects which are NoCopy instead of just leaving them when cleaning the scene, if exceptNoCopy = true. 2010-06-26 11:24:36 -07:00
Tom Grimshaw
70d3b9aeca Add a DeleteAllSceneObjects(bool exceptNoCopy) method to allow NoCopy objects to be retained when the scene is cleared. 2010-06-26 11:14:58 -07:00
Tom Grimshaw
5b6485481b Add extra Gitminster config options to ini.example 2010-06-26 11:02:09 -07:00
Melanie Thielker
6c6c7b0927 Remove libs from main tree 2010-06-26 06:25:03 +02:00
Melanie Thielker
d3d63fe553 remove conflicting pdb debug files 2010-06-26 06:21:38 +02:00
Melanie Thielker
06fd49bda9 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-26 06:17:09 +02:00
Melanie Thielker
6274317e63 Fix loading of attachments on login 2010-06-26 06:16:24 +02:00
Tom Grimshaw
f64d1cb396 Add new event: OnChangedBackup 2010-06-25 14:39:15 -07:00
Tom Grimshaw
30397b6fbc Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-25 14:26:07 -07:00
Tom Grimshaw
96e649189f Add two events: OnAttachToBackup and OnDetachFromBackup. 2010-06-25 14:25:39 -07:00
Tom Grimshaw
8daa149c36 Remove the prepending slash from the default git repo name 2010-06-25 13:03:00 -07:00
Tom Grimshaw
3ef70b55e9 Whoops, enabled = true not enabled = 1 2010-06-25 12:58:13 -07:00
Tom Grimshaw
e0d533dc4e Add [Git] section to OpenSim.ini.example for Gitminster 2010-06-25 12:55:02 -07:00
Melanie
dc9e9931eb Merge branch 'master' into careminster-presence-refactor 2010-06-25 20:26:48 +01:00
Tom Grimshaw
94ece2789d Add some libraries for XGitminster 2010-06-25 12:21:24 -07:00
Tom Grimshaw
3101d53064 Make "Allow other residents to edit terrain" default to FALSE 2010-06-25 05:25:41 -07:00
Melanie Thielker
afff74a835 Add DwellModule interface 2010-06-25 01:44:17 +02:00
Melanie Thielker
8a0ec60c8f Unhook the dwell request from the land module (and therefore local storage) 2010-06-25 01:41:00 +02:00
Melanie Thielker
f186882c0f Also make prims send the proper position. I hate it when people comment
out things just because they're "not yet used". Grrrr.
2010-06-24 20:51:04 +02:00
Melanie Thielker
cbca58401a Add the object owner UUID into the binary bucket of object to user IM 2010-06-24 20:46:24 +02:00
Melanie Thielker
2cc1f14b0c Replace the imSessionID, which is useless out of context, with the scope id
in saved IMs
2010-06-24 19:37:02 +02:00
Melanie Thielker
b012e963d7 New viewers don't set the "save offline IM" flag anymore. Set it serverside
so messages get saved
2010-06-24 18:48:40 +02:00
Melanie Thielker
6c37a02c0f bug fix. 0,0 is a vlid sim coordinate 2010-06-24 06:02:44 +02:00
Melanie Thielker
9d03271265 And another 2010-06-24 03:43:50 +02:00
Melanie
e94cf3d9b7 And another conflict 2010-06-24 03:35:42 +01:00
Melanie
e93853623b Merge branch 'master' into careminster-presence-refactor 2010-06-24 03:30:11 +01:00
Melanie
ce6fbd9680 Merge branch 'master' into careminster-presence-refactor 2010-06-22 23:40:59 +01:00
Melanie
317ac50a97 Merge branch 'master' into careminster-presence-refactor 2010-06-22 23:38:56 +01:00
Melanie Thielker
5c02fb435d Security fix: Allow only textures to be fetched using HTTP texture cap 2010-06-22 17:35:00 +02:00
Melanie Thielker
962dade155 Cause collisions with the avatar to be sent to attachments. Currently
ignores collision filter. Physics collisions are still dodgy, so we
don't get the events we should be getting.
2010-06-22 04:04:59 +02:00
Melanie Thielker
3428196631 Guard prioritizer agains null values as those produced by a bullet dying
before it can be updated
2010-06-22 02:33:20 +02:00
Melanie Thielker
3ea4e5ccbe Correctly update the LastSeen field 2010-06-21 23:26:27 +02:00
Melanie Thielker
53905cf919 Bump the migration version, ot it would never happen 2010-06-21 22:15:33 +02:00
Melanie Thielker
ab023c6a29 Fix build break 2010-06-21 18:06:46 +02:00
Melanie Thielker
9fd45406be Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-21 17:06:59 +02:00
Melanie Thielker
973537f819 Ensure no UUID.Zero region ID is ever written to presence. Add a Migration
to add a LastSeen field of type "Timestamp" to Presence for MySQL
2010-06-21 17:06:05 +02:00
Tom Grimshaw
9d251b1dc5 Fix the StandUp position to calculate as if we're still using the child prim id. 2010-06-20 15:57:01 -07:00
Tom Grimshaw
fc715a092c Fix the sit code to ensure that we use the root prim of a linkset as a reference in the case of an avatar sitting on a child prim. This fixes various camera issues and fixes mantis #0000059. 2010-06-20 15:38:48 -07:00
Tom Grimshaw
33d05ef554 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-20 14:45:36 -07:00
Tom Grimshaw
a1416612a9 Update all clients sitting on a linkset if a child prim is moved. This prevents avatars being "lost in the void" until they stand up when a child prim is moved that they're sitting on. 2010-06-20 14:45:04 -07:00
Melanie Thielker
13a0b65a80 Modify avatar responsiveness policy to send roots before children 2010-06-20 21:38:06 +02:00
Melanie Thielker
797767da57 Insert a space after the comma on the ToString methos of lsl vectors
and rotations to match SL.
2010-06-20 07:16:19 +02:00
Melanie Thielker
95c763201f Set the offline flag in inventory offers 2010-06-20 06:36:46 +02:00
Melanie Thielker
76b59b8df7 Make dataserver() return a 0 when agent id offline, instead of a timeout 2010-06-20 06:23:08 +02:00
Melanie
04b60aa490 Merge branch 'master' into careminster-presence-refactor 2010-06-19 20:32:01 +01:00
Tom Grimshaw
49d7d8534c Allow moving an avatar as part of a linkset using llSetLinkPrimitiveParams. This unlocks an awful lot of poseball-free content, and is a step towards resolving mantis #59. 2010-06-19 10:06:09 -07:00
Tom Grimshaw
6d8da699b2 Add "AvatarHeight/2" to the Home Position when set to avoid having the avatar fall through the ground when they TP home. 2010-06-19 07:00:01 -07:00
Melanie
891214c65b Merge branch 'master' into careminster-presence-refactor 2010-06-18 20:49:21 +01:00
Kitto Flora
cea7905602 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-17 13:04:32 -04:00
Kitto Flora
958c6c6fde Add rez on water surface. 2010-06-17 13:04:18 -04:00
Tom Grimshaw
33c092781e Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-17 04:15:56 -07:00
Tom Grimshaw
d1c8b083b8 Fix llRot2Euler with a mathematically sound implementation. The only difference between this an SL is that SL resolves a figure of negative PI into PI, and does the equivalent in the reverse (llEuler2Rot, -1.0 becomes 1.0); 2010-06-17 04:15:07 -07:00
Melanie
8b3042f24f Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-17 03:09:17 +01:00
Melanie
7e22be3441 Merge branch 'master' into careminster-presence-refactor 2010-06-17 03:08:55 +01:00
Tom Grimshaw
b9c40320f1 Fix llAttachToAvatar. This addresses mantis 128 . 2010-06-16 09:20:20 -07:00
Tom Grimshaw
117fd629d6 Allow llMapDestination to be used in any event if the host is an attachment. This fixes Mantis 0000098. 2010-06-16 08:32:47 -07:00
Melanie
0b75f759b4 Merge branch 'master' into careminster-presence-refactor 2010-06-16 04:10:55 +01:00
Tom Grimshaw
ef1496ca2d Add "alert dialog" for sending dialogs to users from the console 2010-06-14 04:28:38 -07:00
Tom Grimshaw
704da8c823 osGetAvatarList: Use AbsolutePosition instead of the position of the physics actor, or the avatar disappears when they sit down. 2010-06-14 04:03:54 -07:00
Melanie
fdf648bcf3 Merge branch 'master' into careminster-presence-refactor 2010-06-14 02:49:15 +01:00
Melanie Thielker
9b30f44672 D.U.H. #2. Inverted test. Again. Argh! 2010-06-14 02:28:31 +02:00
Melanie Thielker
1532dbca0a Guard against a potential nullref 2010-06-14 00:12:39 +02:00
Melanie Thielker
f9b4f5f594 Revert "Introduce SOP.UpdateSitters() to update sitting avatars' chat position if"
This reverts commit f59e272643.
2010-06-14 00:05:01 +02:00
Melanie Thielker
5fda89fdb5 Revert "D.U.H."
This reverts commit 3058761806.
2010-06-14 00:04:02 +02:00
Melanie Thielker
093cc047cd Revert "Try it witht he root prim"
This reverts commit d520360cb8.
2010-06-14 00:03:43 +02:00
Melanie Thielker
62763cc0fb Report current position instead of position at the time we sat down 2010-06-14 00:02:17 +02:00
Melanie Thielker
d520360cb8 Try it witht he root prim 2010-06-13 23:01:15 +02:00
Melanie Thielker
3058761806 D.U.H.
un-reverse a reversed condition
2010-06-13 22:43:14 +02:00
Melanie Thielker
520b0e131c Try to make prims stop moving. Reset velocity, etc, unconditionally. Although
the phys actor may be new, the prim fields could still be set and the
slimupdates system would continue sending that data out.
2010-06-13 22:37:11 +02:00
Melanie Thielker
3d319d6c3f Actually update the SP. EXPERIMENTAL 2010-06-13 22:23:07 +02:00
Melanie Thielker
f59e272643 Introduce SOP.UpdateSitters() to update sitting avatars' chat position if
needed
2010-06-13 22:21:05 +02:00
Melanie
5e4bee0f34 Merge branch 'master' into careminster-presence-refactor 2010-06-12 19:15:59 +01:00
Melanie
4950ee5f3b Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-12 16:27:55 +01:00
Melanie
d2342319da Merge branch 'master' into careminster-presence-refactor 2010-06-12 16:27:37 +01:00
Tom Grimshaw
63531b1df5 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-12 04:36:14 -07:00
Tom Grimshaw
3ea11fe2e6 Get rid of spamming SOG debug message 2010-06-12 04:35:51 -07:00
Melanie Thielker
03a48f87e4 Preserving the link numbers is a serializer's highest duty.
Prevent region crossings from screwing up complex attachments by preserving
link numbers.
2010-06-12 08:29:20 +02:00
Melanie Thielker
e337c9130f Make local teleports send CHANGED_TELEPORT 2010-06-12 07:34:22 +02:00
Melanie
57a60282f5 Don't filre CHANGED_INVENTORY if a prim comes in from storage 2010-06-12 06:57:10 +01:00
Melanie
0ece71f8d1 Merge branch 'master' into careminster-presence-refactor 2010-06-12 06:14:10 +01:00
Melanie
3c3ad08868 Merge branch 'master' into careminster-presence-refactor
0.7.1CM Dev
2010-06-12 02:46:11 +01:00
Melanie
ae0a7e2c37 Merge branch 'master' into careminster-presence-refactor 2010-06-12 02:19:57 +01:00
Melanie
508bfa1de8 Merge branch 'master' into careminster-presence-refactor 2010-06-12 01:26:55 +01:00
Melanie
6a2e0c707c Merge branch 'master' into careminster-presence-refactor 2010-06-12 00:34:26 +01:00
Melanie
836728e5de Merge branch 'master' into careminster-presence-refactor 2010-06-12 00:08:20 +01:00
Melanie
4e34770aba Merge branch 'master' into careminster-presence-refactor 2010-06-11 20:56:43 +01:00
Melanie
1cfebca48d Merge branch 'master' into careminster-presence-refactor 2010-06-11 20:35:00 +01:00
Melanie
9318674cdb Merge branch 'master' into careminster-presence-refactor 2010-06-11 17:54:35 +01:00
Melanie
77ef0053f2 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-11 17:52:59 +01:00
Melanie
8a084cb7e1 Remove a company name referecne from the example 2010-06-11 17:52:29 +01:00
Melanie
de8f9e201f Merge branch 'master' into careminster-presence-refactor 2010-06-11 17:49:12 +01:00
Melanie
b1224c3540 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-11 17:47:34 +01:00
Melanie
aa2f5bdd77 Merge branch 'master' into careminster-presence-refactor 2010-06-11 17:46:29 +01:00
Melanie Thielker
be71a2e5bc Revert "Remove the cm* function namespace"
This reverts commit ef93ac4452.
2010-06-11 17:52:19 +02:00
Melanie Thielker
ef93ac4452 Remove the cm* function namespace 2010-06-11 17:48:33 +02:00
Melanie Thielker
10ef80cf15 Rename CM files to LS 2010-06-11 17:42:16 +02:00
Melanie Thielker
97d83c87ec Rename cm* function set to ls* (for LightShare) 2010-06-11 17:23:06 +02:00
Melanie Thielker
8d5cec5e0d Remove cmGetAvatarList() 2010-06-11 17:08:18 +02:00
Melanie Thielker
b3cf5ccf6d Clone cmGetAvatarList into osGetAvatarList for more generic use. 2010-06-11 17:04:54 +02:00
Melanie
1dce243661 Merge branch 'master' into careminster-presence-refactor 2010-06-09 20:25:05 +01:00
Melanie
30d3ea3d4b Give attachments the same priority as other avatars in BestAvatarResponsiveness
policy
2010-06-09 17:00:24 +01:00
Melanie
6b2d2413f7 Merge branch 'master' into careminster-presence-refactor 2010-06-09 16:48:37 +01:00
Melanie
20ea823c19 Merge branch 'master' into careminster-presence-refactor 2010-06-08 22:07:01 +01:00
Melanie Thielker
7d75dc1294 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-08 22:04:09 +02:00
Kitto Flora
54209907f3 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-08 16:15:45 -04:00
Kitto Flora
6e2cc98eac Fixed llMoveToTarget() and Rotation Lock/Enable (ChODE/ODEPrim only) 2010-06-08 16:15:16 -04:00
Melanie Thielker
4921d5ac2d Make the text mode remote console really work. It can now be used to send
multi-word commands with proper quoting, handles arguments with spaces
and allows interactive use, e.g. user creation.
2010-06-08 22:03:08 +02:00
Melanie
d2dfbbe339 Merge branch 'master' into careminster-presence-refactor 2010-06-08 00:44:53 +01:00
Melanie
74d62901c8 Merge branch 'master' into careminster-presence-refactor 2010-06-07 00:44:36 +01:00
Melanie Thielker
fad5158ab4 Add a call to SOG.ResumeScripts() after region crossing / teleport 2010-06-07 00:09:44 +02:00
Tom Grimshaw
e962c44749 Fix support for PRIM_SCULPT_FLAG_INVERT and PRIM_SCULPT_FLAG_MIRROR in the llSetPrimitiveParams series of functions. This makes it possible to mirror a sculpt by script. 2010-06-04 19:36:31 -07:00
Melanie
c5878b6610 Merge branch 'master' into careminster-presence-refactor 2010-06-04 21:11:15 +01:00
Tom Grimshaw
dda7185b43 Change the admin kick message to something more generic, "OpenSim Manager" is not really accurate 2010-06-03 17:55:50 -07:00
Tom Grimshaw
293f775fa5 Always provide at least 2 packets of a texture (if the texture is larger than 1 packet). This fixes compatibility with the newer (broken) SnowGlobe and Emerald viewer(s), but also matches the behaviour of SL. 2010-06-02 07:59:18 -07:00
Melanie Thielker
655f02b695 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-02 01:05:36 +02:00
Melanie Thielker
70aa965c26 Add a forgotten security check. Make the new functions only work on prims
owned by the host prim owner.
2010-06-02 01:04:17 +02:00
Melanie Thielker
d8962ef415 Add two new osFunctions:
list osGetPrimititveParams(key prim, list rules);
osSetPrimitiveParams(key prim, list rules);
2010-06-02 01:01:56 +02:00
Tom Grimshaw
90c814a7ca Fix nullref in cmGetAvatarList() (ported from 0.69) 2010-06-01 13:29:12 -07:00
Melanie Thielker
6668c789d3 One should not lock null objects. 2010-06-01 19:01:21 +02:00
Melanie Thielker
c900134f91 Lock the object queue when dequeueing 2010-06-01 16:03:53 +02:00
Melanie
f8e2d25739 Merge branch 'master' into careminster-presence-refactor 2010-06-01 02:24:12 +01:00
Melanie Thielker
28c5759456 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-06-01 03:18:03 +02:00
Melanie Thielker
16d8602d3c Fix prim returns I broke earlier 2010-06-01 03:17:21 +02:00
Melanie Thielker
6c4c72546c Fix prim returns I broke earlier 2010-06-01 03:05:08 +02:00
Melanie Thielker
eca15cfbf2 Change the handling of CreateSelected. Only send it on real creation, not
for each prim coming into view.
2010-06-01 02:45:14 +02:00
Melanie Thielker
bf233ea0dc Continuing refactor. Refactor DeRezObject to deal with multiple objects 2010-06-01 02:27:30 +02:00
Melanie Thielker
f57f2370f1 Add a method to get the bounding box and root prim offsets within it for
a group of prims.
2010-06-01 01:25:24 +02:00
Melanie Thielker
70f7790413 Split GetAxisAlignedBoundingBox into two methods to allow calculation of
combined bounding boxes and offsets
2010-06-01 01:07:46 +02:00
Melanie Thielker
9d4913224f Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-05-31 19:00:36 +02:00
Melanie Thielker
d4b4cbf5a5 Fix create selection getting overwritten by multiple updates for the same prim. 2010-05-31 19:00:02 +02:00
Tom Grimshaw
6c1665bf46 Fix casting in llParcelMediaCommandList so that it actually, you know, works 2010-05-31 08:38:41 -07:00
Melanie Thielker
bbb4d6e4c9 Fix a nullref in EventManager caused by RegionReady not setting the scene 2010-05-31 01:02:04 +02:00
Melanie Thielker
890f3cc54c Changes osFunction permissions again. Allow_ with a list of UUIDs now again
refers to prim OWNERS. A new option set, Creators_, is added to allow
selection by script creator. For existing installs, this means no functional
change. The warning from my prior commit doesn't apply anymore.
2010-05-30 15:46:54 +02:00
Melanie Thielker
59a5367433 Changes OSSL Api permissions for the case of UUID list. In 0.6.9, the UUIDs
would be the IDs of the prim owners in whose prims these functions would
run. This changes it so the UUID is the SCRIPT CREATOR instead. Further,
osfunctions limited by uuid will not run if the creator and owner differ
and the owner has mod rights on the script.
There is still a danger in passing moodifiable scripts to others, as they
can insert a harmful function, then remove the mod rights to make it runnable.
As before, care needs to be taken, but where it was modable prims that were
the risk before, modable scripts are the weak spot now.
In cases where prim owner == script creator == script owner, nothing will
change.
2010-05-30 13:46:05 +02:00
Melanie Thielker
84e30bee6d Revert "Meta7 Communities : Authorization service added, skeleton, not yet functional"
This reverts commit 31439293cc.
2010-05-29 12:34:02 +02:00
Tom Grimshaw
31439293cc Meta7 Communities : Authorization service added, skeleton, not yet functional 2010-05-29 03:56:34 -07:00
Tom Grimshaw
e3dac1292e Implement suspended updates - When an operation is occurring on lots of prims in a single group, don't schedule any updates until the operation has completed. This makes things like llSetAlpha(LINK_SET,0.0,ALL_SIDES); a *lot* faster, more efficient and less buggy, and also makes unlinking a lot better. Linking is still treacherous.. this needs to be analysed. 2010-05-29 02:10:34 -07:00
Tom Grimshaw
3a5d379db8 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-05-29 01:07:19 -07:00
Tom Grimshaw
2f409116db Stop IGridService from throwing a fatal exception when an IPEndPoint cannot be resolved, and add some handlers to deal with this cleanly; a condition was observed on OSGrid where a neighbouring region with an invalid (unresolveable) hostname would prevent a region from starting. This is bad. 2010-05-29 01:03:59 -07:00
Melanie Thielker
e7bf6afd3a Get the user's DOB back from the server response properly. 2010-05-29 05:14:18 +02:00
Melanie
542e6b8af4 Merge branch 'master' into careminster-presence-refactor 2010-05-28 21:56:42 +01:00
Mike Rieker
ea5bcc7b88 Merge branch 'careminster-presence-refactor' of www.3dhosting.de:/var/git/careminster into careminster-presence-refactor 2010-05-27 22:14:43 -04:00
Mike Rieker
9ea42fdfab Merge branch 'careminster-presence-refactor' of www.3dhosting.de:/var/git/careminster into careminster-presence-refactor 2010-05-27 21:31:10 -04:00
Mike Rieker
7d6680b38a fix hanging output throttle arithmetic
had multiply overflow and subtract wrap-around errors
2010-05-27 21:28:47 -04:00
Melanie Thielker
66b4309f34 Apply Mike's TokenBucket fix 2010-05-28 02:44:12 +02:00
Melanie Thielker
ba49319c07 Prevent a null ref 2010-05-27 20:08:48 +02:00
Melanie Thielker
ac5373427f Comment noisy "CONNECTION DEBUGGING" messages, because they push more
important stuff off screen too fast. Clean this time
2010-05-27 20:08:12 +02:00
Melanie Thielker
9e3b5a5587 Remove orphaned .dll.config files from tests 2010-05-26 19:29:56 +02:00
Melanie Thielker
f90d81a864 Just because there is an agent update handler, that doesn't mean there is
a pre agent update handler. Null check these separately.
2010-05-26 19:26:30 +02:00
Melanie
97501495eb Merge branch 'master' into careminster-presence-refactor 2010-05-26 17:19:02 +01:00
Melanie
00737f1c13 Merge branch 'master' into careminster-presence-refactor 2010-05-24 23:40:22 +01:00
Melanie
72b96e8121 Add the SitGround flag back in 2010-05-23 06:12:11 +01:00
Melanie
a9dad99432 Merge branch 'master' into careminster-presence-refactor
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2010-05-23 06:09:54 +01:00
Melanie
297bcb5c3d Merge branch 'master' into careminster-presence-refactor 2010-05-21 21:16:04 +01:00
Melanie
c0cb66e602 Merge branch 'master' into careminster-presence-refactor 2010-05-21 15:58:34 +01:00
Melanie
ccbcf421e7 Merge branch 'master' into careminster-presence-refactor 2010-05-21 15:27:17 +01:00
Melanie
344f209565 Merge branch 'master' into careminster-presence-refactor 2010-05-21 06:28:13 +01:00
Melanie Thielker
af5eeab7cf Ensure that the first update sent out for any given prim is a full update 2010-05-21 07:37:55 +02:00
Melanie
a92780fe5f Merge branch 'master' into careminster-presence-refactor 2010-05-21 03:51:58 +01:00
Melanie
d28da5e5ce Refactor scene presence list for lockless iteration. Lock contention will now only be for simultaneous add/removes of scene presences from the scene. 2010-05-21 03:41:32 +01:00
Melanie
b6674c9b76 Merge branch 'careminster' into careminster-presence-refactor 2010-05-21 03:03:35 +01:00
Melanie
ddd072b3fb Merge branch '0.6.9-post-fixes' into careminster 2010-05-21 02:44:20 +01:00
Melanie
147c2d6f80 Change the way the object perms are propagated to attempt to salvage
some older content
2010-05-21 02:31:14 +01:00
Tom Grimshaw
5532341bf9 Initialise m_initialSitTarget to ZERO_VACTOR for safety's sake as per convo with kitto 2010-05-19 14:04:44 -07:00
Tom Grimshaw
6933b48a7e Fix a nullref issue in SitAltitudeCallback 2010-05-19 13:49:34 -07:00
Tom Grimshaw
f77f9ecd8f Fix a nullref issue in SitAltitudeCallback 2010-05-19 13:44:59 -07:00
Tom Grimshaw
fc76b5f589 Fix a null reference issue in cmGetAvatarList() 2010-05-19 00:24:54 -07:00
Tom Grimshaw
71a95900fd Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-05-19 00:21:38 -07:00
Tom Grimshaw
ba36c62caa Fix a null reference issue in cmGetAvatarList() 2010-05-19 00:20:51 -07:00
Melanie Thielker
55f124745f Allow remote admin to be used on a different port from the main region port 2010-05-18 19:25:40 +02:00
Melanie
1c3790a70d Merge branch 'master' into careminster-presence-refactor 2010-05-18 15:31:19 +01:00
Tom Grimshaw
bb0806c61e Don't send kill packets to child agents as we close them 2010-05-18 03:44:09 -07:00
Tom Grimshaw
1c040d8c1e Fix to the scenario where we send an agent to a neighbouring sim (via teleport), then tell our neighbours to close the agents.. thereby disconnecting the user. Added a new CloseChildAgent method in lieu of CloseAgent. This has been a long standing problem - with any luck this will cure it. 2010-05-18 03:24:43 -07:00
Tom Grimshaw
ed1cfb5245 Missed a nullref in the previous commit 2010-05-18 02:33:41 -07:00
Tom Grimshaw
91b1d17e5b Fix for hanging on "Connecting to region".. caused by packets being processed before the presence has bound to receive events. Fixed this by adding packets to a queue and then processing them when the presence is ready. 2010-05-18 01:09:47 -07:00
Tom Grimshaw
ae7c30a0f3 While examining our 10,10,10 issue I discovered that several threads were locked with each other in an unusual place; I've moved the piece of code inside a lock[] context and so far it's looking promising. 2010-05-18 00:07:17 -07:00
Melanie Thielker
eb5a95d26b Prevent an "index out of range" error on login 2010-05-18 03:02:36 +02:00
Tom Grimshaw
c25c40a3f9 Following on from the last commit, the stop/disconnect packet should NOT be sent when the user logs out. This eliminates the annoying "crash on log out" bug, and allows the client to commit important information at the last moment (attachment data!) 2010-05-17 15:24:28 -07:00
Tom Grimshaw
6bc7e3429f Provide interface to prevent the client close function from sending the stop packet 2010-05-17 14:32:21 -07:00
Tom Grimshaw
8f838c722d When killing a zombie session, don't send the stop packet since it often has the effect of killing a newly connected client. 2010-05-17 14:14:19 -07:00
Melanie
a003c36de5 Merge branch 'master' into careminster-presence-refactor 2010-05-16 20:32:58 +01:00
Melanie
d8bf370fd6 Merge branch 'master' into careminster-presence-refactor 2010-05-16 17:22:38 +01:00
Melanie
a723225179 Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-05-16 15:02:23 +01:00
Melanie
b94cace547 Merge branch 'master' into careminster-presence-refactor 2010-05-16 15:01:56 +01:00
Tom Grimshaw
9079ad5ceb Add some debug output to GetAgent to try and track down our presence problems 2010-05-13 12:40:18 -07:00
Tom Grimshaw
fd37a21b59 Kill some locks that have crept into SOG 2010-05-12 08:34:47 -07:00
Tom Grimshaw
7705012ee7 Optimise the heavily used GetScenePresences; eliminate the array->list conversion on every call and transition from hard locks to ReaderWriter locks. 2010-05-12 08:25:40 -07:00
Tom Grimshaw
98bd3e1f34 Don't convert UUID -> ToString for every friend (Minor optimisation based on profiler feedback) 2010-05-12 07:14:06 -07:00
Tom Grimshaw
40e05f4109 Spin the AddNewClient process off into a new thread to avoid locking up the LLUDPServer (and therefore the entire scene) 2010-05-11 09:28:46 -07:00
Tom Grimshaw
14a86de115 Fix another ReaderWriterLockSlim issue 2010-05-10 12:45:33 -07:00
Melanie
5814d16b58 Merge branch 'master' into careminster-presence-refactor 2010-05-10 15:57:32 +01:00
Tom Grimshaw
3cda854ef3 Fix overlooked readLock which was left open 2010-05-10 08:47:41 -07:00
Tom Grimshaw
ab716125d7 Correct an odd merge anomaly 2010-05-10 05:51:49 -07:00
Tom Grimshaw
2e94c75729 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-05-10 05:44:24 -07:00
Tom Grimshaw
2fe669448f Greatly improve login time for users with large friends lists by requesting all unknown UUID's in one go rather than individually 2010-05-10 05:43:16 -07:00
Melanie
fada4cb6c4 Merge branch 'master' into careminster-presence-refactor 2010-05-10 04:05:04 +01:00
Melanie
6a3e1734e6 Merge branch 'master' into careminster-presence-refactor 2010-05-09 18:03:57 +01:00
Melanie
4e0d62547d Merge branch 'master' into careminster-presence-refactor 2010-05-09 17:04:23 +01:00
Melanie
420dd78fb7 Merge branch 'careminster' into careminster-presence-refactor 2010-05-08 14:17:43 +01:00
Melanie
14fcc2510e Merge branch 'master' into careminster-presence-refactor 2010-05-08 13:31:36 +01:00
Kitto Flora
bc7d84b75c Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-05-07 15:16:59 -04:00
Kitto Flora
add7abc1de Fix Mouse+WASD makes Av rise; Fix PREJUMP. 2010-05-07 14:12:07 -04:00
Melanie
b309781f2d Merge branch 'master' into careminster-presence-refactor 2010-05-07 01:00:58 +01:00
Melanie
69d0201d4c Revert "Patch from mcortez: Update groups, add ALPHA Siman grid connector for groups"
Causes an exception within HttpServer, headers have already been sent.

This reverts commit 8187fccd25.
2010-05-06 16:38:23 +01:00
Melanie
11971fb302 Merge branch 'master' into careminster-presence-refactor 2010-05-06 16:09:36 +01:00
Melanie Thielker
02dea4ce58 Remove the m_Viewer variable and make the property a shortcut to the
proper field in AgentCircuitData instead
2010-05-06 02:02:12 +02:00
Melanie
7e0d5b8665 Merge branch 'master' into careminster-presence-refactor 2010-05-05 22:50:11 +01:00
Melanie Thielker
2d9a20529d Plumb Viewer version into ScenePresence for initial login. It's still not
carried along
2010-05-06 00:54:21 +02:00
Melanie Thielker
733a07e061 Plumb the viewer version string through into AgentCircuitData. Now all that
is left os to figure out what black magic turns AgentCircuitData into
AgentData and then copy that into the ScenePresence, where m_Viewer is
already added with this commit and waits for the data.
2010-05-06 00:34:49 +02:00
Melanie Thielker
65775b87e5 Add a XMLRPC method to remotely set the login level for the LLLoginService.
This requires a special XMLRPC call, which has to supply the credentials of
a god user (User level >= 200). Disabled by default. Also Adds a configuration
option to set the initial permitted login level.
2010-05-05 23:06:36 +02:00
Melanie Thielker
e0f9b1a699 Removed a test for a "can't happen" case. ParentGroup is never null anymore. 2010-05-05 21:12:02 +02:00
unknown
91cfce3758 back port groups changes
Signed-off-by: Melanie <melanie@t-data.com>
2010-05-05 16:11:00 +01:00
unknown
8a69070b51 back port groups changes 2010-05-05 16:09:53 +01:00
Melanie
6fdd5bfe2d Revert "Patch from mcortez: Update groups, add ALPHA Siman grid connector for groups"
The patch was for 0.7

This reverts commit 608bb0dfef.
2010-05-05 16:03:20 +01:00
Melanie
608bb0dfef Patch from mcortez: Update groups, add ALPHA Siman grid connector for groups
Mantis #4646

Signed-off-by: Melanie <melanie@t-data.com>
2010-05-05 14:37:05 +01:00
Melanie Thielker
efc3241541 Add perms check to the teleport home client command handlers. 2010-05-05 01:32:55 +02:00
Melanie Thielker
49efec2ef1 Strip estate message sending out from the estate management module and
the dialog module. Convert it to an event on the estate module interface.
The old implementation did the same as message to region, a button that
is right next to it on the UI. This implementation prevented people from
adding a more sane one in a module.
2010-05-04 23:45:59 +02:00
Melanie Thielker
07e0732a10 make the events more useful by providing the source region 2010-05-04 21:16:20 +02:00
Melanie
9ca79df802 Merge branch 'careminster' into careminster-presence-refactor 2010-05-04 18:41:20 +01:00
Melanie
585259ef08 Merge branch 'master' into careminster-presence-refactor 2010-05-04 18:39:04 +01:00
Melanie Thielker
97bbce92a8 Add events to the estate interface to let interested modules know of
changes to estate settings
2010-05-04 20:57:31 +02:00
Melanie Thielker
ce86d39c70 Add "reload estate" command to sims 2010-05-04 18:31:52 +02:00
Melanie Thielker
4f93d30790 Allow reloading of estate settings into a running region. Move sun update
helper into Scene, since that is less evil than exposing m_storageManager
to the public.
2010-05-04 18:10:13 +02:00
Melanie Thielker
da849aea78 Allow regions to get the list of the other regions in the estate 2010-05-04 17:56:30 +02:00
Melanie Thielker
dbce360566 Fix full circle sensors 2010-05-04 02:43:22 +02:00
Melanie Thielker
c86259c671 Fix scripted give and interactive give to offline avatars. Both folder and
single items are now supported. Magic Boxes, yeah!
2010-05-04 00:44:05 +02:00
Melanie Thielker
deaa79ca9e Refix the fix 2010-05-03 23:53:49 +02:00
Melanie Thielker
87e0c17707 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-05-03 23:47:50 +02:00
Melanie Thielker
80bf3934af Add folder version incrementing to XInventoryService. Fixes offline give
for avatar->avatar
2010-05-03 23:47:32 +02:00
Melanie Thielker
8ec6e42e34 Add folder version uncrementing to XInventoryService. Fixes offline give
for avatar->avatar
2010-05-03 23:45:05 +02:00
Melanie Thielker
4df87631ed Store given items in correct parent folder. Fixes items given to offline avatars
not getting lost.
2010-05-03 23:44:23 +02:00
Melanie Thielker
9c8d7d34b3 Fix a bug in owner change notification 2010-05-03 04:55:41 +02:00
Melanie Thielker
8766401777 Adapt CM to the new CHANGED_OWNER handling 2010-05-03 04:28:30 +02:00
Melanie
9f8acbfe3e Merge branch 'master' into careminster-presence-refactor 2010-05-03 01:40:24 +01:00
Melanie Thielker
175f3f992a Make the IUserAccountData properly unpack the god mode data, so grid gods
work again
2010-05-03 01:50:32 +02:00
Melanie Thielker
0fa57cac3f Fix sensor cone for sensing avatars 2010-05-03 00:54:24 +02:00
sacha
5f6e9e6ab9 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-05-02 08:18:33 -04:00
sacha
7ad36d3d75 Adding DebugEvent Trap
Adding XMREEvent Trap

 trapDebug("Modulename" ,"My data here ",  scene);
 trapXMRE(int data, string Message, Scene scene);
2010-05-02 08:15:12 -04:00
Melanie Thielker
881fcb7def Allow retrieval if admin users in scope mode 2010-04-30 23:32:58 +02:00
Melanie Thielker
7ae55f6248 Fix linking issue introduced in my earlier commit 2010-04-30 20:18:29 +01:00
Melanie Thielker
0a9c98e7c4 Fix linking issue introduced in my earlier commit 2010-04-30 20:18:08 +01:00
Melanie
9bc5098dd8 Merge branch 'master' into careminster-presence-refactor 2010-04-30 20:15:19 +01:00
Melanie Thielker
3e30de7430 Fix linking issue introduced in my earlier commit 2010-04-30 22:35:07 +02:00
Melanie
486ab82c02 Fix some symbol errors 2010-04-30 12:08:37 +01:00
Melanie
10750421a3 Fix some symbol errors 2010-04-30 12:07:47 +01:00
Melanie
9500ba2ff5 Fix some symbol errors 2010-04-30 12:06:58 +01:00
Melanie
13960b3b86 Merge branch 'master' into careminster-presence-refactor 2010-04-30 11:49:24 +01:00
Melanie
7dc5ebc929 Merge branch 'careminster' into careminster-presence-refactor 2010-04-30 11:49:16 +01:00
Melanie
8b70477556 Merge branch '0.6.9-post-fixes' into careminster 2010-04-30 11:48:57 +01:00
Melanie
04845c1898 Fix link security issue 2010-04-30 11:48:09 +01:00
Melanie
9c79fd6308 Treat a UserLevel of -1 as an unverified account and refer them to their
activation email.
2010-04-30 05:33:45 +01:00
Kitto Flora
f3c21524be Fix Av jump motion S/W 2010-04-29 19:41:08 -04:00
Melanie
08ebcdb0b8 Merge branch 'master' into careminster-presence-refactor 2010-04-29 23:33:26 +01:00
Melanie
f06772a088 Merge branch 'careminster' into careminster-presence-refactor 2010-04-29 23:33:20 +01:00
Kitto Flora
5c23b4aa56 Fix vertical attractor 2010-04-29 13:50:11 -04:00
Melanie
8a32ee7dd2 Merge branch 'careminster' into careminster-presence-refactor 2010-04-27 03:58:43 +01:00
Melanie
89a003c6fc Merge branch 'master' into careminster-presence-refactor 2010-04-27 03:57:36 +01:00
Melanie
bbffe16f13 Merge branch 'master' into careminster-presence-refactor 2010-04-27 00:27:05 +01:00
Melanie Thielker
06661708b4 Add a parameter to prim inventory update to prevent event firing 2010-04-27 02:40:30 +02:00
Melanie Thielker
81ff5eaba0 Make scripted attachment states work. Finally. Also replace two monitor locks
with RWLocks, hunting the 10^3 bug. Not successful, but needed to be done anyway
2010-04-25 22:03:35 +02:00
Melanie Thielker
899d521ab4 Use the saved script states 2010-04-24 18:59:34 +02:00
Melanie Thielker
27b3f23ff3 Remove some usings that stopped compilation 2010-04-24 16:53:47 +02:00
Melanie Thielker
71f42f185a Plumb a data path to initialize an attachment from an alternate source 2010-04-24 16:45:25 +02:00
Melanie Thielker
56f60a04d9 Add an additional serialization call do the detach procedure. This call is
executed only for it's side effects, which are to block until attach(NULL_KEY)
completes, before commencing detachment.
2010-04-23 20:18:34 +02:00
sacha
85646b157c Adding some more SNMP events and some refactoring
Signed : The Masqued Foxi
2010-04-23 12:40:27 -04:00
Melanie Thielker
31e0704c8d Remove debug output, the culprit has been identified 2010-04-23 17:48:50 +02:00
sacha
7eda9364fd Adding LinkUp/LinkDown when a region is started or stoped.
Those two events could be used to compute the region availibility
2010-04-23 10:51:27 -04:00
Melanie Thielker
780630d7c0 Fix a nullref in attachment handling. Add some debug to find the attachment
state issue
2010-04-23 14:41:20 +02:00
Melanie
af778f09d5 Merge branch 'master' into careminster-presence-refactor 2010-04-21 19:51:17 +01:00
Melanie Thielker
de63b60748 Avoid duplicate script resumes. Move resume calls to more logical places 2010-04-19 19:27:45 +02:00
Melanie Thielker
80024c023a Remove the event trigger for the attach event from the attachment module.
The script engine already triggers this internally.
2010-04-19 18:44:21 +02:00
Melanie
d2e4f2d376 Merge branch 'master' into careminster-presence-refactor 2010-04-19 15:33:20 +01:00
Melanie Thielker
1667a29c88 And some more rez modes that weren't covered before 2010-04-19 12:54:33 +02:00
Melanie
efa7873ae1 Merge branch 'master' into careminster-presence-refactor 2010-04-19 10:44:01 +01:00
Melanie
65079b1106 Merge branch 'careminster' into careminster-presence-refactor 2010-04-19 07:00:51 +01:00
Melanie
98cb4f74b2 Merge branch 'master' into careminster-presence-refactor 2010-04-19 07:00:40 +01:00
Melanie
f8d49e0a30 Merge branch '0.6.9-post-fixes' into careminster 2010-04-19 06:32:29 +01:00
Melanie Thielker
72d380acf0 Merge branch 'master' into careminster-presence-refactor 2010-04-19 06:10:23 +02:00
Mike Rieker
68a4f897b4 This GetScriptErrors() change allows initial XEngine to run in background
thread.  It should block only for the case of being called by
CapsUpdateTaskInventoryScriptAsset().
2010-04-18 19:19:16 -04:00
Justin Clark-Casey (justincc)
43acd99bb3 Slightly tweak README to account for the fact that first-time standalone users may effectively set up their avatar as 'master avatar' in the region configuration stage. 2010-04-18 19:19:50 +01:00
Justin Clark-Casey (justincc)
b7457a0a5d Update OpenMetaverse libraries to those used in master as of commit 9a781e7
This removes Mono.Security.dll which might help with Mono 2.6.3 compatability issues (notwithstanding the sqlite problem)
2010-04-18 19:16:41 +01:00
Justin Clark-Casey (justincc)
c77444a821 Fix http://opensimulator.org/mantis/view.php?id=4657 where OpenSim.Grid.UserServer.exe fails on startup if no previous config
probably appears to occur because mono 2.4.2.3 (and possibly later) erroneously returns a value of 0 for BufferWidth and BufferHeight in some circumstances
2010-04-16 20:40:01 +01:00
Melanie Thielker
ccc56e6dd4 Merge branch 'master' into careminster-presence-refactor 2010-04-16 05:20:25 +02:00
Melanie
1636f535ba Committing sacha's partial work (from orpheus). The GridBrat needs to learn
a bit of git
2010-04-14 10:42:14 +01:00
Melanie
fac55bc78b Change ISnmpModule to use scene references 2010-04-14 01:17:27 +01:00
Melanie
4433f53f72 Drop unused Alert() method from ISnmpModule 2010-04-13 20:14:56 +01:00
Melanie
9920e219dd Merge branch 'careminster' into careminster-presence-refactor 2010-04-13 04:36:08 +01:00
Melanie
a1c4585a39 Merge branch '0.6.9-post-fixes' into careminster 2010-04-13 04:13:26 +01:00
Kitto Flora
9b6e89457c Fixed LINEAR_MOTOR Z drive, Mantis #30 2010-04-11 14:12:01 -04:00
lcc
7ecd9b3f1a Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
resolved
Conflicts:
	OpenSim/Region/Framework/Interfaces/ISnmpModule.cs
2010-04-10 23:52:10 +02:00
lcc
c6ba50b7e2 Adding ColdStart event 2010-04-10 23:39:06 +02:00
Mike Rieker
0b2b2daf23 guarantee that a script engine's GetScriptErrors() will not be called
until after its OnRezScript() returns so that script compile error
messages can be retrieved
2010-04-10 14:43:26 -04:00
lcc
58dac970af re-fixing this darn file 2010-04-10 18:05:08 +02:00
lcc
c4eaf195b5 dding this deleted file... 2010-04-10 17:59:08 +02:00
lcc
d975bd8e5c Fixing Trap 2010-04-10 17:51:51 +02:00
Melanie
7701ea2798 Add Scene.SnmpService, which is of type ISnmpModule and, if nun-null, can
be used to send snmp alerts
2010-04-09 06:49:14 +01:00
John Hurliman
54cedfe432 Changed the GetTextureModule backport to work with the 0.6.9 codebase 2010-04-08 15:57:57 -07:00
John Hurliman
94a46867ed Added a missing reference to prebuild.xml 2010-04-08 15:38:58 -07:00
John Hurliman
c4c4c3696e Backported WebUtil.cs from master to 0.6.9-postfixes to fix the build break 2010-04-08 15:26:51 -07:00
John Hurliman
0f3314c04c Backported GetTextureModule and IAssetService.GetCached() 2010-04-08 15:00:01 -07:00
Thomas Grimshaw
d834a2c3da Implement cmGetAvatarList(). This returns a strided list of all avatars in the region, including their UUID, position and name. The radar is often the most taxing scripts on a sim, this function can help radars reduce their impact by 66% by eliminating the need for sensors. 2010-04-07 23:53:08 +02:00
Thomas Grimshaw
e80e04c5fd Increase the amount of time we wait for a teleport to complete. This allows teleportation to a remote region without a local connection to the asset server without timing out. 2010-04-07 22:59:13 +02:00
Thomas Grimshaw
309f440fc0 Fix llDialog responses so that they can be heard throughout the region. This now conforms to the behaviour in SL. ( http://bugs.meta7.com/view.php?id=13 ) 2010-04-07 10:13:47 +02:00
Thomas Grimshaw
db5ea850f6 Fix llLookAt so that it doesn't "roll" the object and more closely imitates the behaviour in SL. ( http://bugs.meta7.com/view.php?id=28 ) 2010-04-07 09:49:11 +02:00
Thomas Grimshaw
20e3de1f0a Add CHANGED_REGION_START (alias for CHANGED_REGION_RESTART as per LL Jira SVC-3773) 2010-04-07 08:28:57 +02:00
Thomas Grimshaw
335c1b4420 Implement PSYS_SRC_INNERANGLE and PSYS_SRC_OUTERANGLE 2010-04-07 07:48:26 +02:00
Kitto Flora
a97a887ea4 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-04-05 23:25:46 -04:00
Melanie Thielker
e40acda6c8 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-04-05 23:22:14 +02:00
Melanie Thielker
e7be131b89 Add the ISnmpModule interface definition to Careminster release 2010-04-05 23:20:56 +02:00
Thomas Grimshaw
fd4a059e9b Merge branch 'master' of ssh://TOR/var/git/careminster 2010-04-05 23:17:31 +02:00
Thomas Grimshaw
2f454843d8 Fix up my own shoddy code! Fixes prim rez break. Whups! 2010-04-05 23:17:06 +02:00
Melanie Thielker
a573b5767b Test commit 2010-04-05 22:31:30 +02:00
Melanie Thielker
5c04d768a6 Bump version number 2010-04-05 22:26:18 +02:00
Kitto Flora
4bf1598930 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-04-05 16:15:23 -04:00
Thomas Grimshaw
07b4889eab Merge branch 'master' of ssh://TOR/var/git/careminster 2010-04-05 22:11:11 +02:00
Thomas Grimshaw
7a3bb266eb This commit adds some randomness to object persistence. It's a Work In Progress, I am working on improving this to a tiered approach. 2010-04-05 22:11:05 +02:00
Thomas Grimshaw
f34cc6b469 Add a much cheaper agent count retrieval method. This is obsoleted by 0.7 so it can be reverted then. 2010-04-05 22:08:34 +02:00
Kitto Flora
9b9e2a8c71 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-04-05 15:27:13 -04:00
Melanie
2fbbc13c71 Fix some overlooked merge conflicts that got committed 2010-04-05 19:42:15 +01:00
Kitto Flora
35bf75a77a Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-04-05 14:08:57 -04:00
Melanie
ba31b31ed0 Merge branch 'careminster' into careminster-presence-refactor 2010-04-05 18:22:15 +01:00
Melanie
fe034dc3e4 Merge branch 'master' into careminster-presence-refactor 2010-04-05 18:12:29 +01:00
Melanie
f505c1d0a4 Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2010-04-05 18:10:49 +01:00
Melanie
04a68db195 Merge branch '0.6.9-post-fixes' into careminster 2010-04-05 18:10:36 +01:00
kitto
e2a521742a ChODE Only: Corrected Heightmap load to iliminate crack at 255M. Added 'fence' option to prevent physical objects crossing region border. 2010-04-04 22:57:32 -04:00
lcc
956225f0e1 Fixed Ban and parcel exclusion. Need to fix the parcel chat too 2010-04-04 18:29:18 +02:00
Melanie
4fefd05839 Merge branch 'master' into careminster-presence-refactor
Remerge the LightShare bits that were pushed to core
2010-03-31 04:38:19 +01:00
Melanie
7d917e7c5c Rename Meta7Windlight to LightShare 2010-03-30 23:29:03 +01:00
Melanie
5693870fe2 Merge branch 'master' into careminster-presence-refactor 2010-03-30 21:34:27 +01:00
Justin Clark-Casey (justincc)
18ed68cd31 add nant distbin target
this will delete all extraneous source code files and copy OpenSim.ini.example to OpenSim.ini
2010-03-26 20:47:26 +00:00
Justin Clark-Casey (justincc)
4d712ddaae comment out very probably unused dist and distdir nant targets 2010-03-26 19:36:21 +00:00
Justin Clark-Casey (justincc)
dd544f811a switch flavor to RC1 2010-03-26 19:09:09 +00:00
Melanie Thielker
e0b287961f Change land overlay to send group owned status properly 2010-03-23 17:04:37 +01:00
Kitto Flora
0f5fb6f190 Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor 2010-03-19 19:14:09 -04:00
Kitto Flora
add47befac Update acceleration to 0 on no tphysical. 2010-03-19 18:53:16 -04:00
Kitto Flora
0e36994fe7 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-03-19 13:27:12 -04:00
Kitto Flora
3ea72eeabb Fix sit with autopilot. 2010-03-19 13:26:34 -04:00
Melanie
4c2a51b1b5 Merge branch 'master' into careminster-presence-refactor 2010-03-18 20:09:04 +00:00
Melanie
46d990419b Merge branch 'careminster' into careminster-presence-refactor 2010-03-18 20:00:58 +00:00
Melanie
69b5ddceda Unify a previous refactor of object return with the older solution. We
really don't need two methods doing the same thing, but differently.
2010-03-18 18:58:56 +00:00
Melanie
1a2cbbc8c1 Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2010-03-18 18:58:44 +00:00
Melanie
f35eb8819c Unify a previous refactor of object return with the older solution. We
really don't need two methods doing the same thing, but differently.
2010-03-18 18:58:37 +00:00
Kitto Flora
6df969894c Fix AbsolutePosition for autopilot/sit. 2010-03-17 13:30:48 -04:00
Thomas Grimshaw
e442c2a3f9 Prevent llTeleportAgentHome from affecting gods 2010-03-17 17:42:33 +01:00
Thomas Grimshaw
37815f3402 Debugger tags for VS2010 2010-03-16 18:13:00 +01:00
Melanie
a1cd3b5b88 Change GodLevel to UserLevel so gods can teleport freely without having
to enter god mode first
2010-03-15 17:54:39 +00:00
Melanie
d3f33acc1a Merge branch 'master' into careminster-presence-refactor 2010-03-15 17:23:35 +00:00
Melanie
898fa637c3 Merge branch 'careminster' into careminster-presence-refactor 2010-03-15 17:12:08 +00:00
Kitto Flora
8cbd0d3b5f Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-03-14 16:23:12 -04:00
Kitto Flora
8198062610 RotLookAt repaired; debug msg cleanup. 2010-03-14 16:22:13 -04:00
CasperW
80e4068b3e Fix the delay in llGiveInventory so that it only takes effect when giving inventory to an avatar (this now replicates SL behaviour) 2010-03-13 15:13:19 +01:00
Kitto Flora
1379ae4310 Fix Rotation Lock. NOTE: This version had poor border crossing control 2010-03-12 16:13:52 -05:00
Kitto Flora
7bd48d383d Resolved merge 2010-03-12 13:48:31 -05:00
Kitto Flora
f6f6ef1532 Dynamics Integration Part 1 2010-03-11 19:12:38 -05:00
Melanie
689514a40a Cache UserLevel in ScenePresence on SP creation. Change IsAdministrator
to use that stored value.
2010-03-09 23:12:10 +00:00
Melanie
40873504dc Merge branch 'master' into careminster-presence-refactor 2010-03-09 22:46:17 +00:00
unknown
fce9e499e4 - parcel blocking, region crossing blocking, teleport blocking 2010-03-09 22:38:58 +00:00
Melanie
80b5a95bb8 Revert "Adds Land Banning."
This reverts commit a87d7a1296.
2010-03-09 22:29:02 +00:00
Melanie
06e351f1ef Revert "Adds land ejection and freezing. Adds more checks to land banning."
This reverts commit 44d523518a.
2010-03-09 22:28:52 +00:00
Justin Clark-Casey (justincc)
4423630f1e remove milliseconds from console log again 2010-03-09 18:56:32 +00:00
Justin Clark-Casey (justincc)
5caae0293a Fix bug where approximately half the time, attachments would rez only their root prim until right clicked (or otherwise updated).
The root cause of this problem was that multiple ObjectUpdates were being sent on attachment which differed enough to confuse the client.
Sometimes these would eliminate each other and sometimes not, depending on whether the scheduler looked at the queued updates.
The solution here is to only schedule the ObjectUpdate once the attachment code has done all it needs to do.

Backport from head.
2010-03-09 18:53:04 +00:00
Melanie
49baf090cd Small consistency change 2010-03-07 16:08:00 +00:00
Melanie
c8c608acc8 Small consistency change 2010-03-07 16:07:40 +00:00
Melanie
3d053b194a Small consistency change 2010-03-07 16:06:52 +00:00
Melanie
8180c72cbc Merge branch 'master' into careminster-presence-refactor 2010-03-06 12:37:24 +00:00
Melanie
2fdd535302 Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2010-03-06 12:24:26 +00:00
Melanie
1f7a0cf892 Merge branch '0.6.9-post-fixes' into careminster 2010-03-06 12:24:09 +00:00
unknown
83929c69e3 - implementing server 1.38 functions
Signed-off-by: Melanie <melanie@t-data.com>
2010-03-06 11:59:16 +00:00
Kitto Flora
87590491b5 Fix Physics angular reference frame. 2010-03-04 16:33:26 -05:00
Melanie
107a0a4905 Merge branch 'master' into careminster-presence-refactor 2010-03-04 11:02:01 +00:00
Melanie
62dd83f473 Remove a superfluous array creation 2010-03-04 10:47:16 +00:00
Melanie
84b0a23e19 Remove a superfluous array creation 2010-03-04 10:45:46 +00:00
Melanie
7ec1a3fcad Merge branch 'master' into careminster-presence-refactor 2010-03-03 03:18:19 +00:00
Melanie
028a87fe37 Merge branch 'master' into careminster-presence-refactor
This brings careminster on the level of master. To be tested
2010-03-03 02:07:03 +00:00
Melanie
01c4bb4a5e Revert "test"
This reverts commit 2f0011c605.
2010-03-03 01:29:42 +00:00
Melanie
2f0011c605 test 2010-03-03 01:26:19 +00:00
CasperW
393a782858 Fix the crashed session notification from the userserver. 2010-02-25 18:05:30 +01:00
CasperW
7f61de8f57 Allow particles and texture anims to be persisted to XML. This behaviour is expected. 2010-02-25 14:14:53 +01:00
CasperW
e99341d7df llDie() should not work on attachments (results in an incosistent attachment state) 2010-02-25 12:07:56 +01:00
CasperW
efd4810851 Disable blocking teleports within the same parcel for now; it's not implemented correctly. Will review soon. 2010-02-25 12:04:51 +01:00
Melanie
92a8d7ce6c Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2010-02-16 23:15:59 +00:00
Melanie
d6eff8ebcf Change a condition to actually make linden land reclaim work 2010-02-16 23:14:57 +00:00
CasperW
af2d20c5fa Fix an inconsistency in llSetPayPrice between SL and OS behaviour 2010-02-15 22:22:36 +01:00
CasperW
47a9e48f46 Merge branch 'master' of ssh://TOR/var/git/careminster 2010-02-15 06:15:14 +01:00
CasperW
94c417c90c Implement missing llGetPrimitiveParams parameters 2010-02-15 06:10:04 +01:00
Melanie
ce3e265575 Plug a small hole 2010-02-15 00:06:03 +00:00
Melanie
b2fefe3e3f Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2010-02-14 22:27:59 +00:00
Melanie
2084e08ad7 Merge branch 'master' into careminster 2010-02-14 22:27:39 +00:00
Kitto Flora
9568718add Angular motor adjustments 2010-02-12 15:56:21 -05:00
Kitto Flora
6a70349512 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-02-12 14:08:32 -05:00
Melanie
0ad8046582 Resolve a merge issue 2010-02-08 22:44:17 +00:00
Melanie
ad38450f9c Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2010-02-08 22:43:53 +00:00
Melanie
c8f3bb56ff Merge branch 'master' into careminster 2010-02-08 22:11:38 +00:00
Kitto Flora
59851ceee6 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-02-08 14:29:06 -05:00
CasperW
044979066c Fix two inconsistencies with LightShare 2010-02-05 00:53:32 +01:00
Melanie
776d62b9c6 Merge branch 'master' into careminster 2010-02-04 17:29:33 +00:00
Melanie
ae9362636e Line endings cleanup 2010-02-04 17:00:16 +00:00
Kitto Flora
48134af616 Motor angular decay fix. 2010-02-03 16:20:13 -05:00
Kitto Flora
fc1ac25935 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-02-03 14:32:29 -05:00
Melanie
0f1a3f8ed2 Merge branch 'master' into careminster 2010-02-03 00:16:02 +00:00
Kitto Flora
8c20610293 AngMotor update 1 2010-02-02 13:28:42 -05:00
Melanie
d5ed92cf38 Merge branch 'master' into careminster 2010-02-02 03:56:29 +00:00
Melanie
6478617c93 Revert "improve locking of m_items in SceneObjectPartInventory"
This reverts commit 968b9e160d.
2010-02-02 03:49:00 +00:00
Melanie
0c5850237e Small fix for a spurious exception 2010-01-29 16:50:00 +00:00
Melanie
9e37d24624 Prevent empty ObjectProperties packets being sent 2010-01-29 11:47:45 +00:00
Melanie
44c86cedcf Resolve one more conflict I overlooked 2010-01-29 07:47:50 +00:00
Melanie
cfca9e1e81 Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e.
2010-01-29 07:20:13 +00:00
Melanie
5b9ca6e35f Merge branch 'master' into careminster 2010-01-28 14:38:46 +00:00
Revolution
862caa72a8 Fixes terrain editing. Changes ThrottleOutPacketType to task instead of land. 2010-01-28 03:04:38 +00:00
Melanie
2d9b69c186 Merge branch 'master' into careminster 2010-01-28 02:07:18 +00:00
Melanie
e9c9a74e0a Some merge fixups 2010-01-26 15:12:41 +00:00
Melanie
b80ea00265 Merge branch 'master' into careminster 2010-01-26 14:53:14 +00:00
Melanie
d2e17f4ffb Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2010-01-21 23:48:11 +00:00
Kitto Flora
1abb70cc73 Add glue for llSetVehicleFlags(), llRemoveVehicleFlags(). ChODE: Add associated methods. 2010-01-21 19:31:02 -05:00
Melanie
946e06eb58 Merge branch 'master' into careminster 2010-01-21 23:47:40 +00:00
Kitto Flora
66692f90e3 ChODE Object Linear Motion update 2010-01-21 14:39:11 -05:00
CasperW
a964431c21 Merge branch 'master' into casper 2010-01-20 22:19:14 +01:00
CasperW
496a8a4f7c Fixed an issue with PayPrice sometimes being shared between multiple objects 2010-01-20 22:14:43 +01:00
Careminster Staff
24056dc98b Adds example to OpenSim.ini.example for Admin Default Parcel settings 2010-01-19 01:46:50 +00:00
Melanie
6772c9d2b6 Comment the asset deletion handler. It can be abused and is not currently
needed.
2010-01-18 17:35:49 +00:00
Melanie
e3dbd79543 Merge branch 'master' into careminster 2010-01-18 17:24:21 +00:00
CasperW
d9c48e70a9 Fix a major security problem with osSetDynamicTexture which allowed the deletion of /any/ asset. 2010-01-18 17:56:27 +01:00
Melanie
51bb311565 Add chat banning. Staff patch 2010-01-18 02:53:31 +00:00
Melanie
f4e30664e6 Fix a typo 2010-01-18 01:55:54 +00:00
Careminster Staff
44d523518a Adds land ejection and freezing. Adds more checks to land banning. 2010-01-18 01:27:01 +00:00
Melanie
8c39392eaa Merge branch 'master' into careminster 2010-01-16 00:15:26 +00:00
Melanie
884410501e Allow renaming of items that contain no-mod items 2010-01-15 20:19:06 +00:00
Careminster Staff
a87d7a1296 Adds Land Banning. 2010-01-14 04:11:17 +00:00
Melanie
f0152790cf Merge branch 'master' into careminster 2010-01-14 01:20:07 +00:00
Melanie
8452c0869d Merge branch 'master' into careminster 2010-01-11 08:00:03 +00:00
Melanie
20e748205e Merge branch 'master' into careminster 2010-01-11 03:50:24 +00:00
Melanie
649d45a2d4 Merge branch 'master' into careminster 2010-01-11 02:04:58 +00:00
Melanie
0ae861d7d7 Merge branch 'master' into careminster 2010-01-11 02:01:23 +00:00
Melanie
511481e8d9 Merge branch 'master' into careminster 2010-01-10 19:59:49 +00:00
Melanie
1676e70dfe Merge branch 'master' into careminster 2010-01-10 04:16:06 +00:00
Melanie
46b5fe5acd Merge branch 'master' into careminster 2010-01-09 20:54:59 +00:00
Melanie
089f5403a7 Merge branch 'master' into careminster 2010-01-09 16:35:32 +00:00
Melanie
1597e33549 Merge branch 'master' into careminster 2010-01-09 15:59:33 +00:00
Melanie
121c6b4835 Merge branch 'master' into careminster 2010-01-09 15:34:58 +00:00
Melanie
a764eb5dc7 Merge branch 'master' into careminster 2010-01-09 14:21:50 +00:00
Melanie
d22bdb5095 Merge branch 'master' into careminster 2010-01-09 12:02:48 +00:00
Kitto Flora
a2aadb78a9 Maintain control() event stream 2010-01-08 23:12:11 -05:00
Kitto Flora
71adb37fa8 Fix llRotBetween 2010-01-07 23:58:19 -05:00
Kitto Flora
6591f8a592 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-01-07 23:04:28 -05:00
Melanie
3724a38ab4 Allow estate managers (if estate_owner_is_god is set) to actually enter
god mode. Allow god modification of objects if the object owner is the
same god that wants to modify, this allows you to regain perms on your
own objects after IAR import messed them up.
2010-01-05 15:39:53 +00:00
Melanie
54e6c26def Merge branch 'master' into careminster 2010-01-04 22:29:43 +00:00
Melanie
0907d5d69e Finish conversion if XInventoryService 2010-01-04 20:52:44 +00:00
Melanie
53d3f46add First stage port of the XInventoryService 2010-01-04 18:47:47 +00:00
Melanie
d657b76dba Merge branch 'master' into careminster 2010-01-04 06:17:38 +00:00
Kitto Flora
253e2ed699 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2010-01-03 23:10:01 -05:00
Melanie
1121919b57 Solve conflict 2010-01-03 22:02:36 +00:00
Melanie
61ce884336 Merge branch 'master' into careminster 2010-01-03 21:43:39 +00:00
Melanie
71fdc24f5c Add virtual method StateChange to ScriptBaseClass 2010-01-02 21:21:31 +01:00
Melanie
aa51b83fdc Merge branch 'master' into careminster 2009-12-31 23:31:45 +00:00
Melanie
b321c0a932 Merge branch 'master' into careminster 2009-12-31 21:53:39 +00:00
Kitto Flora
3f901d313b Vehicle Linear parameter adjustments 2009-12-31 16:07:36 -05:00
Melanie
67cfe34e67 Merge branch 'master' into careminster 2009-12-31 06:42:33 +00:00
Melanie
643cc7a0ee Merge branch 'master' into careminster 2009-12-31 04:53:05 +00:00
Melanie
b3cb99036c Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2009-12-31 06:21:03 +01:00
Melanie
9602227eb6 Add a small delay in NewAgentConnection to fix an issue with Hippo
(and possibly other cleints) getting their data mixed up.
2009-12-31 06:20:35 +01:00
Melanie
5e103f2b2e Revert "Merge branch 'master' into careminster"
This reverts commit d49d44923d.
2009-12-30 20:26:22 +00:00
Melanie
d49d44923d Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2009-12-30 20:25:57 +00:00
Melanie
cbe0841bc9 Revert "Merge branch 'master' into careminster"
This reverts commit 596af3f600.
2009-12-30 20:13:18 +00:00
Melanie
596af3f600 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2009-12-30 20:12:21 +00:00
Melanie
8f0d6d6b5c Fix an omission in LSL that causes a viewer crash 2009-12-30 00:37:28 +00:00
Melanie
a08360e3cd Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2009-12-30 00:27:34 +01:00
Melanie
06f639b8f3 Fix a timer list locking issue causing XMREngine deadlocks 2009-12-30 00:27:01 +01:00
Melanie
ba3dfe4121 Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2009-12-29 18:42:30 +00:00
Melanie
67cfac0cf1 Merge branch 'master' into careminster 2009-12-29 18:41:45 +00:00
Melanie
8ad8bd6282 Fix up the new Sirikata cient view 2009-12-27 17:52:27 +01:00
Melanie
045a44b1af One should not copy/paste so much :) 2009-12-27 16:07:59 +00:00
Melanie
d321d23afe Fix the spelling :/ 2009-12-27 16:03:00 +00:00
Melanie
e3f60ce06f Merge branch 'master' into careminster 2009-12-27 15:48:43 +00:00
CasperW
4b96a78039 Merge branch 'master' into casper 2009-12-27 07:11:21 +01:00
CasperW
19a5e606b3 Convert some remaining legacy lock()s for m_parts in SceneObjectGroup to ReaderWriteLockSlim, hopefully fixes a native crash 2009-12-27 07:08:16 +01:00
root
a18f4964cf Correct some issues with the last commit 2009-12-27 01:32:23 +01:00
Melanie
f5c310d9d4 Merge branch 'master' into careminster 2009-12-26 23:39:02 +00:00
CasperW
a6c93ce875 Make sure that we're not bounds checking attachments. 'Cos otherwise your hair will end up on your bum. Seen that before? 2009-12-26 22:55:18 +01:00
CasperW
1b8f91a0db Merge branch 'master' into casper 2009-12-26 18:17:55 +01:00
CasperW
7371c7662a Fix for landing points. Only one scenario is not fully covered by this change, and that is people who teleport from neighbouring regions, who won't get affected by the landing point. 2009-12-26 18:14:12 +01:00
Melanie
f3a4860635 Merge branch 'master' into careminster 2009-12-26 04:13:27 +00:00
root
43c303e27a Make the GenericTableHandler work as intended 2009-12-26 03:24:46 +01:00
Melanie
e51be5f4a7 Merge branch 'master' into careminster 2009-12-26 00:21:03 +00:00
Melanie
59f683066a Set version back to core version (base) and suffix CM. Please DO NOT CHANGE THIS
in the repo. This is the Caremninster repo and the number follows CORE. Always.
2009-12-25 23:23:49 +00:00
Melanie
b19e564317 Restore version suffix. 2009-12-25 23:20:30 +00:00
Melanie
e881f35fbb Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2009-12-25 23:20:08 +00:00
Melanie
59a841d69c Merge branch 'master' into careminster 2009-12-25 23:17:08 +00:00
Kitto Flora
e7439efc74 Recover out-of-region objects during db load. 2009-12-24 19:19:44 -05:00
Melanie
0054afd39b Merge branch 'master' into careminster 2009-12-24 16:45:27 +00:00
Melanie
7f699fca9a Add the body to the LSL List Size property 2009-12-24 18:18:14 +01:00
Melanie
e5e951d92c Merge branch 'master' into careminster 2009-12-24 00:45:53 +00:00
Melanie
5a653ef96f Merge branch 'master' into careminster 2009-12-23 23:10:34 +00:00
Melanie
165f193f78 Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster 2009-12-23 21:25:08 +00:00
Melanie
6eecbc95e4 Merge branch 'master' into careminster 2009-12-23 21:22:19 +00:00
CasperW
a9f4d7a29c Add a debugger tag to stop Visual Studio from breaking 2009-12-23 17:34:08 +01:00
CasperW
c54e0953d0 Merge branch 'master' of ssh://TOR/var/git/careminster 2009-12-23 14:15:27 +01:00
CasperW
b575bf2524 Added some null reference and deleted group checks to certain functions to fix region crash scenarios. 2009-12-23 14:14:20 +01:00
Melanie
30f59370d3 Merge branch 'master' into careminster 2009-12-22 15:48:41 +00:00
Melanie
73491cceed Merge branch 'master' into careminster 2009-12-22 15:37:24 +00:00
Melanie
28c7bb99bf Merge branch 'master' into careminster 2009-12-22 09:30:50 +00:00
Melanie
551727cd19 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2009-12-22 06:43:31 +01:00
Melanie
bde26a8282 Add missing file 2009-12-22 06:43:03 +01:00
Kitto Flora
11c4a2cfd0 Merge branch 'master' of ssh://3dhosting.de/var/git/careminster 2009-12-22 00:34:06 -05:00
Kitto Flora
93b930b937 Fix conflicts 2009-12-22 00:33:31 -05:00
root
b53b871669 Add a data path for error messages 2009-12-22 06:25:32 +01:00
Kitto Flora
0a29842caf Include ChOdePlugin 2009-12-22 00:20:04 -05:00
root
49fbe0ddb4 Should not commit without compiling 2009-12-22 03:26:47 +01:00
root
46fea74726 Jumped the gun... 2009-12-22 03:25:09 +01:00
root
69b551c516 Allow 100ms for scripts to run attach(NULL_KEY) on detach 2009-12-22 03:22:33 +01:00
Melanie
fa0621b486 Merge branch 'master' into careminster 2009-12-22 00:41:56 +00:00
Melanie
84a1a0a729 Merge branch 'master' into careminster 2009-12-21 22:07:22 +00:00
Melanie
b891291135 Merge branch 'master' into careminster 2009-12-21 15:02:57 +00:00
CasperW
d8d6e8a304 Merge branch 'master' into casper 2009-12-21 13:29:48 +01:00
CasperW
e3c1466047 Fixed a nasty crash in StandUp() that occurred when the part got killed with an avatar sitting on it. 2009-12-21 13:22:52 +01:00
Melanie
df30b1c832 Merge branch 'master' into careminster 2009-12-21 10:28:50 +00:00
Melanie
3d3e0ea4f3 Merge branch 'master' into careminster 2009-12-20 16:45:28 +00:00
CasperW
c7a457f9ee Merge branch 'casper' 2009-12-20 16:20:48 +01:00
CasperW
31bf25d05e Reverted my changes to jhurliman's packet stack since it currently causes more problems than it resolves. The stack DOES need a rework particularly with regards to priorities, but this is not it. 2009-12-20 16:18:43 +01:00
Kitto Flora
eecaa3d9dd Merge branch 'tests' 2009-12-19 20:00:00 -05:00
Kitto Flora
e38e8ae987 Fix mantis #10 & #14 2009-12-19 19:54:44 -05:00
CasperW
6dbe25360e Add cmSetWindlightSceneTargeted. Add restrictions on windlight script use. 2009-12-17 18:40:34 +01:00
Kitto Flora
6483470ec5 Fix GetWorldRotation(), and a host of related Sit fixes. 2009-12-17 02:54:02 -05:00
Kitto Flora
83fad75e22 Merge branch 'tests' 2009-12-16 18:59:46 -05:00
Kitto Flora
7cd44c1a81 Fix prim linking bug, Manis #14 2009-12-15 20:04:53 -05:00
Melanie
f8b6bc8d11 Merge branch 'master' into careminster 2009-12-15 15:46:18 +00:00
Kitto Flora
0020afaf67 Merge branch 'master' into tests 2009-12-15 06:01:59 -05:00
Kitto Flora
b8b4517211 Removed excessive call to UpdateMovementAnimations which prevented GroundSit; Corrected cause of 'sit on roof'. 2009-12-15 01:49:23 -05:00
Melanie
824d7190c2 Merge branch 'master' into careminster 2009-12-14 00:40:56 +00:00
Melanie
30d64444a0 And reverse 2009-12-12 16:01:53 +00:00
Melanie
9904700dfd Another whitespace test commit 2009-12-12 16:00:44 +00:00
Kitto Flora
49dbae65c9 Merge branch 'master' into tests 2009-12-12 10:14:06 -05:00
Kitto Flora
b056c243e4 Commit partial work because of repo change 2009-12-12 10:12:59 -05:00
Melanie
c00158b238 Reverse test commit (again) 2009-12-12 14:35:12 +00:00
Melanie
794419852b Another test 2009-12-12 14:23:20 +00:00
Melanie
fbafd22124 Reverse text commit whitespace change 2009-12-12 13:43:49 +00:00
Melanie
b9cd66d510 test commit 2009-12-12 13:33:45 +00:00
Melanie
b310efc50f Merge branch 'master' into careminster 2009-12-12 12:54:43 +00:00
Melanie
0fdf883cbd Merge branch 'master' into careminster 2009-12-12 04:56:28 +00:00
Melanie
1382dc976c Merge branch 'master' into careminster 2009-12-12 04:14:47 +00:00
Melanie
54e4dcf454 Merge branch 'master' into careminster 2009-12-11 02:49:41 +00:00
Melanie
f6b1344722 Refix the fix 2009-12-11 02:40:33 +00:00
grid
5ffd59e7b8 Kill a NRE caused by an error message trying to print unavailable data 2009-12-10 22:09:16 -05:00
Melanie
0889b5aef1 Fix version number 2009-12-10 18:20:40 +00:00
Melanie
59ca92b10b Merge branch 'tests' of kitto@tor.k-grid.com:/home/kitto/opensim into careminster 2009-12-10 18:17:29 +00:00
Melanie
956f337046 Merge branch 'careminster' of kitto@tor.k-grid.com:/home/kitto/opensim into careminster 2009-12-09 22:07:03 +00:00
CasperW
a6a6bf007a Move osFunctions into a new Careminster script interface 2009-12-09 23:28:00 +01:00
Melanie
2e9890bbe6 Merge branch 'careminster' of kitto@tor.k-grid.com:/home/kitto/opensim into careminster 2009-12-09 16:57:35 +00:00
Melanie
f2427a7320 Merge branch 'master' into careminster 2009-12-09 16:57:26 +00:00
CasperW
2a6dbd068e Last bits and bobs to clean up the Meta7WindlightModule 2009-12-09 03:58:56 +01:00
unknown
d092977f4a Windlight configuration option in ini, and migration 2009-12-09 01:53:41 +01:00
unknown
e3f229225c Enable scripting interface for windlight 2009-12-09 01:34:26 +01:00
KittoFlora
ee9d46c825 Correct AbsolutePosition calculation 2009-12-08 05:49:05 +01:00
unknown
dbd8c400ce Merge branch 'careminster' into windlight 2009-12-07 18:14:02 +01:00
unknown
29a740ec8c Initial windlight codebase commit 2009-12-07 18:05:40 +01:00
Melanie
c2d3afdeee Same for the remote auth connector 2009-12-07 14:31:20 +00:00
Melanie
9155c9ee37 Merge branch 'master' into careminster 2009-12-07 14:14:00 +00:00
KittoFlora
0d1d437bd3 Fix linked physical daughter prim position update. 2009-12-06 21:11:59 +01:00
CasperW
b15f20520f Merge branch 'careminster' of ssh://TOR/home/kitto/opensim/ into careminster 2009-12-06 17:23:22 +01:00
CasperW
172e2f4e76 Fix to existing ReaderWriterLockSlim implementations 2009-12-06 17:23:07 +01:00
Melanie
23cd1b1954 Revert "Make ObjectSelect packet processing not use FireAndForget"
This reverts commit cade14c58c.
2009-12-06 05:24:43 +00:00
Melanie
cade14c58c Make ObjectSelect packet processing not use FireAndForget 2009-12-06 05:14:17 +00:00
Melanie
1e222d52e6 Change EntityManager to use RWlocks 2009-12-06 03:56:15 +00:00
Melanie
f9ae9afaac Fix build break from conflicted merge 2009-12-06 03:10:34 +00:00
Melanie
09bbfc1d56 Merge branch 'master' into careminster 2009-12-06 03:01:58 +00:00
Melanie
79511ecce2 Experimental: Remove explicit property sends 2009-12-06 02:15:52 +00:00
Melanie
2fe75a62be Skip single prims in unlink selections 2009-12-06 02:00:32 +00:00
Melanie
da414fd509 Change locking to not mix explicit Monitor.* calls with lock() 2009-12-06 01:20:39 +00:00
Melanie
f2891e7738 Remove extra forced updates. They're not needed for each prim. Really. 2009-12-06 00:50:28 +00:00
Melanie
fbefa8273b Lock updates out while linking and unlinking 2009-12-06 00:25:04 +00:00
Melanie
ceccfe02d0 Eliminate multiple updates on link/unlink 2009-12-06 00:02:24 +00:00
Melanie
129de26032 Cause better packing of ObjectProperties 2009-12-05 23:25:30 +00:00
Melanie
43a6fa1d01 Merge branch 'master' into careminster 2009-12-05 19:53:54 +00:00
KittoFlora
cc8246206d Secnond revision of Sit and Stand for unscripted prims; Comment out
spammy debug messages in Interregion....
2009-12-05 09:03:02 +01:00
Melanie
551696bb45 Merge branch 'master' into careminster 2009-12-02 10:22:21 +00:00
Melanie
ded16d3529 Merge branch 'master' into careminster 2009-12-02 00:36:53 +00:00
CasperW
2e6dce434f Enforce physical prim max size on single prims.
Also convert a lock() to ReaderWriterLockSlim that i missed in the last commit
2009-11-30 21:52:55 +01:00
CasperW
9888f95068 Convert multiple lock()s which directly hinder script performance in linksets to ReaderWriterLockSlim. 2009-11-30 21:17:15 +01:00
Melanie
8bbb88ea4e Merge branch 'master' into careminster 2009-11-30 14:16:42 +00:00
Melanie
69d83e1548 Merge branch 'master' into careminster 2009-11-30 08:25:40 +00:00
Melanie
d3e7a52933 Merge branch 'master' into careminster 2009-11-28 09:26:00 +00:00
Melanie
aa695e92f7 Reset update flag when a SOG is deleted. This fixes llDie(); 2009-11-27 08:58:26 +00:00
Melanie
0ddd1ce0b7 Merge branch 'master' into careminster 2009-11-27 08:18:16 +00:00
Melanie
cc18ab12f8 Merge branch 'master' into careminster 2009-11-27 00:40:56 +00:00
root
2c3f6aaa87 Merge branch 'careminster' into tests 2009-11-26 20:41:38 +01:00
KittoFlora
5dedacca3c First attempt at mult-sit on large single prims. 2009-11-26 20:37:08 +01:00
Melanie
ad2f0a1290 Remove OS version crap from about dialog 2009-11-26 18:04:58 +00:00
Melanie
bd3b9f79c2 Update CM version 2009-11-26 17:59:28 +00:00
Melanie
ed148eba32 Merge branch 'master' into careminster 2009-11-26 17:45:09 +00:00
Melanie
06f41bb017 Merge branch 'master' into careminster 2009-11-26 17:27:03 +00:00
Melanie
a27d33cb63 Remove the old remoting-type interregion code for prim/script crossing 2009-11-26 13:13:56 +00:00
Melanie
22c325aa5a Remove GetAssemblyName and friends from the SE interface. It's now handled
internally
2009-11-26 13:13:48 +00:00
CasperW
ac2fcbe224 Improvements to rAdmin admin_shutdown and admin_restart. Both methods can now accept a parameter of noticetype = dialog in order to display a blue persistant dropdown instead of a short notice. Added an optional and configurable delay to the restart method, defaulting at 30 seconds as before. Both methods can also accept a noticetype = none dialog in order to act silently. 2009-11-26 15:17:44 +01:00
CasperW
63b6b9cdce Added animation support for my last commit 2009-11-26 02:35:27 +01:00
CasperW
de55110247 Merge branch 'careminster' into casper 2009-11-26 02:01:51 +01:00
CasperW
b9d22aa821 Add nudge right and left to avatar movement (faster reaction times when stepping left or right.) 2009-11-26 01:59:08 +01:00
Melanie
de927adf27 Add the dummy "Size" property to the list type 2009-11-25 20:01:21 +00:00
Melanie
79395bc7db Merge branch 'master' into careminster 2009-11-25 17:04:05 +00:00
Melanie
c81f37cf82 Change osTeleportAgent parameters from long to int. That numerical range is
not even supported by the underlying type, so there is no need to ask
for a type the script can not even supply.
2009-11-25 17:01:41 +00:00
Melanie
25b4160434 Merge branch 'master' into careminster 2009-11-25 08:45:41 +00:00
KittoFlora
32c464ad1f Fixed animation sequencing: SitHere, Falling, Stand/Walk etc. Login Init
Av Animation at Stand.
2009-11-25 08:03:09 +01:00
CasperW
d5aceb6d95 Append a prefix to the god avatar names appearing in chat whilst in god mode (disabled by default, config entry admin_prefix) 2009-11-24 23:33:12 +01:00
Melanie
81f7e9b462 Merge branch 'careminster' of kitto@tor.k-grid.com:/home/kitto/opensim into careminster 2009-11-24 16:00:45 +00:00
CasperW
8383bde768 Removed some extra debug chatter 2009-11-24 18:18:19 +01:00
CasperW
d114713694 Drop all locking of part.TaskInventory in favour of a ReaderWriterLockSlim lock handler. This gives us:
- Faster prim inventory actions. Multiple threads can read at once.
 - Fixes the known prim inventory thread locks
 - In the event of a thread lock occurring, it will usually self heal after sixty seconds with an error message in the console
2009-11-24 18:02:12 +01:00
Melanie
cad2bf5b08 Merge branch 'master' into careminster 2009-11-24 16:00:35 +00:00
CasperW
247c66b3fe Swap the locking of m_EventQueue and m_Script to ease locks on script inventory operations 2009-11-23 20:25:53 +01:00
CasperW
73c2162ff6 Fixed nullrefs 2009-11-23 19:51:40 +01:00
CasperW
889ce36afa Added some [DebuggerNonUserCode] modifiers to functions that throw EventAbortException() to ease debugging on Visual Studio 2009-11-23 17:59:24 +01:00
Melanie
c3d4b66953 Revert "testing checkout"
This reverts commit 234b29cf66.
2009-11-23 12:52:52 +00:00
unknown
234b29cf66 testing checkout 2009-11-23 14:59:39 +01:00
Melanie
31827b0286 Merge branch 'tests' of kitto@tor.k-grid.com:/home/kitto/opensim into careminster 2009-11-23 04:26:42 +00:00
Melanie
df121a7cd0 Merge branch 'master' into careminster 2009-11-23 04:24:58 +00:00
Melanie
03df03b269 Merge branch 'master' into careminster 2009-11-22 08:37:07 +00:00
KittoFlora
f1522e6204 Add non-scripted sit, fix scripted sit. 2009-11-22 08:31:35 +01:00
Melanie
87bce90086 Merge branch 'master' into careminster 2009-11-22 03:14:21 +00:00
CasperW
4a29a7f92c Minor packet ordering fix 2009-11-21 16:51:08 +00:00
CasperW
0149265ee8 Improved avatar responsiveness. 2009-11-21 16:50:33 +00:00
Melanie
0844e5951c Merge branch 'master' into careminster 2009-11-21 16:00:18 +00:00
KittoFlora
251d1b8fbb Merge branch 'careminster' into tests 2009-11-19 20:20:03 +01:00
KittoFlora
7f0f5060ec Clean up messages in ODE 2009-11-19 20:13:26 +01:00
Melanie
d179f2cce9 Merge branch 'master' into careminster 2009-11-19 17:53:34 +00:00
Melanie
5d0778014d Merge branch 'master' into careminster 2009-11-18 06:20:21 +00:00
KittoFlora
4c10826caa Fix merge conflicts 2009-11-16 02:12:56 +01:00
KittoFlora
873c9098d8 Merge branch 'careminster' into tests 2009-11-16 01:40:15 +01:00
Melanie
6ce5080049 Merge branch 'master' into careminster 2009-11-15 22:38:22 +00:00
Melanie
b9546d12f2 Change land packet sending back to what the careminster release used
to use, remove the silly spiral stuff. Revert to double packets for
improved user experience
2009-11-15 21:20:42 +00:00
Melanie
a49c524c9e Add the ability to send messages to users ir regions via remote admin 2009-11-15 20:22:15 +00:00
Melanie
b7f1fc116e Prevent a nullref if a recipient of a group message gas left the scene 2009-11-15 20:21:46 +00:00
unknown
28aa8010b2 - Lower TIME_MS_TOLERANCE to 200ms - Allow m_updateFlag to be reset to 0 in the event of a terse update being rejected - Re-add a synchronous SendTo for certain types of packets 2009-11-15 19:40:58 +00:00
KittoFlora
c09eb00031 Merge branch 'vehicles' into tests 2009-10-27 23:32:39 +01:00
KittoFlora
1113b3b6eb Merge branch 'vehicles' into tests
Conflicts:

	OpenSim/Region/Physics/Manager/PhysicsActor.cs
	OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
2009-10-27 22:42:55 +01:00
KittoFlora
a81a16f22f llRotLookAt Pt 2 2009-10-27 19:56:39 +01:00
KittoFlora
8428b25939 Add llRotLookat pt1. 2009-10-26 00:10:23 +01:00
182 changed files with 19224 additions and 3942 deletions

3
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.project
.settings
.gitignore
*.csproj
*.csproj.user
*.build
@@ -10,6 +11,7 @@
*.pidb
*.dll.build
*.dll
*.log
*.VisualState.xml
*/*/obj
*/*/*/obj
@@ -23,6 +25,7 @@
*/*/*/*/*/bin
*/*/*/*/*/*/bin
*/*/*/*/*/*/*/bin
addon-modules/
bin/Debug/*.dll
bin/*.dll.mdb
bin/*.db

View File

@@ -128,6 +128,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
availableMethods["admin_region_query"] = XmlRpcRegionQueryMethod;
availableMethods["admin_shutdown"] = XmlRpcShutdownMethod;
availableMethods["admin_broadcast"] = XmlRpcAlertMethod;
availableMethods["admin_dialog"] = XmlRpcDialogMethod;
availableMethods["admin_restart"] = XmlRpcRestartMethod;
availableMethods["admin_load_heightmap"] = XmlRpcLoadHeightmapMethod;
// User management
@@ -215,18 +216,53 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (!m_application.SceneManager.TryGetScene(regionID, out rebootedScene))
throw new Exception("region not found");
string message;
List<int> times = new List<int>();
if (requestData.ContainsKey("alerts"))
{
string[] alertTimes = requestData["alerts"].ToString().Split( new char[] {','});
foreach (string a in alertTimes)
times.Add(Convert.ToInt32(a));
}
else
{
int timeout = 30;
if (requestData.ContainsKey("milliseconds"))
timeout = Int32.Parse(requestData["milliseconds"].ToString()) / 1000;
while (timeout > 0)
{
times.Add(timeout);
if (timeout > 300)
timeout -= 120;
else if (timeout > 30)
timeout -= 30;
else
timeout -= 15;
}
}
message = "Region is restarting in {0}. Please save what you are doing and log out.";
if (requestData.ContainsKey("message"))
message = requestData["message"].ToString();
bool notice = true;
if (requestData.ContainsKey("noticetype")
&& ((string)requestData["noticetype"] == "dialog"))
{
notice = false;
}
responseData["rebooting"] = true;
IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>();
if (restartModule != null)
{
List<int> times = new List<int> { 30, 15 };
restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true);
restartModule.ScheduleRestart(UUID.Zero, message, times.ToArray(), notice);
responseData["success"] = true;
}
response.Value = responseData;
}
catch (Exception e)
{
@@ -289,6 +325,53 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.Info("[RADMIN]: Alert request complete");
return response;
}
public XmlRpcResponse XmlRpcDialogMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
m_log.Info("[RADMIN]: Dialog request started");
try
{
Hashtable requestData = (Hashtable)request.Params[0];
CheckStringParameters(request, new string[] { "password", "from", "message" });
if (m_requiredPassword != String.Empty &&
(!requestData.Contains("password") || (string)requestData["password"] != m_requiredPassword))
throw new Exception("wrong password");
string message = (string)requestData["message"];
string fromuuid = (string)requestData["from"];
m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message);
responseData["accepted"] = true;
responseData["success"] = true;
response.Value = responseData;
m_application.SceneManager.ForEachScene(
delegate(Scene scene)
{
IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>();
if (dialogModule != null)
dialogModule.SendNotificationToUsersInRegion(UUID.Zero, fromuuid, message);
});
}
catch (Exception e)
{
m_log.ErrorFormat("[RADMIN]: Broadcasting: failed: {0}", e.Message);
m_log.DebugFormat("[RADMIN]: Broadcasting: failed: {0}", e.ToString());
responseData["accepted"] = false;
responseData["success"] = false;
responseData["error"] = e.Message;
response.Value = responseData;
}
m_log.Info("[RADMIN]: Alert request complete");
return response;
}
public XmlRpcResponse XmlRpcLoadHeightmapMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
@@ -396,13 +479,33 @@ namespace OpenSim.ApplicationPlugins.RemoteController
message = "Region is going down now.";
}
m_application.SceneManager.ForEachScene(
if (requestData.ContainsKey("noticetype")
&& ((string) requestData["noticetype"] == "dialog"))
{
m_application.SceneManager.ForEachScene(
delegate(Scene scene)
{
IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>();
if (dialogModule != null)
dialogModule.SendNotificationToUsersInRegion(UUID.Zero, "System", message);
});
}
else
{
if (!requestData.ContainsKey("noticetype")
|| ((string)requestData["noticetype"] != "none"))
{
m_application.SceneManager.ForEachScene(
delegate(Scene scene)
{
IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>();
if (dialogModule != null)
dialogModule.SendGeneralAlert(message);
});
}
}
// Perform shutdown
System.Timers.Timer shutdownTimer = new System.Timers.Timer(timeout); // Wait before firing
@@ -2529,8 +2632,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
else throw new Exception("neither region_name nor region_uuid given");
Scene scene = m_application.SceneManager.CurrentScene;
int health = scene.GetHealth();
int flags;
string text;
int health = scene.GetHealth(out flags, out text);
responseData["health"] = health;
responseData["flags"] = flags;
responseData["message"] = text;
response.Value = responseData;
}

View File

@@ -593,6 +593,7 @@ namespace OpenSim.Client.MXP.ClientStack
public event DisconnectUser OnDisconnectUser;
public event RequestAvatarProperties OnRequestAvatarProperties;
public event SetAlwaysRun OnSetAlwaysRun;
public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
public event DeRezObject OnDeRezObject;
public event Action<IClientAPI> OnRegionHandShakeReply;
@@ -834,11 +835,19 @@ namespace OpenSim.Client.MXP.ClientStack
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
m_log.Info("[MXP ClientStack] Close Called");
// Tell the client to go
SendLogoutPacket();
if (sendStop == true)
{
SendLogoutPacket();
}
// Let MXPPacketServer clean it up
if (Session.SessionState != SessionState.Disconnected)
@@ -884,7 +893,13 @@ namespace OpenSim.Client.MXP.ClientStack
// Need to translate to MXP somehow
}
public void SendKillObject(ulong regionHandle, uint localID)
public void SendKillObject(ulong regionHandle, List<uint> localIDs)
{
foreach (uint localID in localIDs)
SendKillObject(regionHandle, localID);
}
private void SendKillObject(ulong regionHandle, uint localID)
{
DisappearanceEventMessage de = new DisappearanceEventMessage();
de.ObjectIndex = localID;

View File

@@ -290,6 +290,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
public event GenericCall2 OnStopMovement = delegate { };
public event Action<UUID> OnRemoveAvatar = delegate { };
public event ObjectPermissions OnObjectPermissions = delegate { };
public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy = delegate { };
public event CreateNewInventoryItem OnCreateNewInventoryItem = delegate { };
public event LinkInventoryItem OnLinkInventoryItem = delegate { };
public event CreateInventoryFolder OnCreateNewInventoryFolder = delegate { };
@@ -451,6 +452,11 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
throw new System.NotImplementedException();
}
@@ -485,7 +491,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
throw new System.NotImplementedException();
}
public void SendKillObject(ulong regionHandle, uint localID)
public void SendKillObject(ulong regionHandle, List<uint> localID)
{
throw new System.NotImplementedException();
}

View File

@@ -38,7 +38,7 @@ namespace OpenSim.Data
{
public abstract AssetBase GetAsset(UUID uuid);
public abstract void StoreAsset(AssetBase asset);
public abstract bool StoreAsset(AssetBase asset);
public abstract bool ExistsAsset(UUID uuid);
public abstract List<AssetMetadata> FetchAssetMetadataSet(int start, int count);

View File

@@ -34,7 +34,7 @@ namespace OpenSim.Data
public interface IAssetDataPlugin : IPlugin
{
AssetBase GetAsset(UUID uuid);
void StoreAsset(AssetBase asset);
bool StoreAsset(AssetBase asset);
bool ExistsAsset(UUID uuid);
List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
void Initialise(string connect);

View File

@@ -50,5 +50,6 @@ namespace OpenSim.Data
bool Store(UserAccountData data);
bool Delete(string field, string val);
UserAccountData[] GetUsers(UUID scopeID, string query);
UserAccountData[] GetUsersWhere(UUID scopeID, string where);
}
}

View File

@@ -143,7 +143,7 @@ namespace OpenSim.Data.MSSQL
/// Create asset in m_database
/// </summary>
/// <param name="asset">the asset</param>
override public void StoreAsset(AssetBase asset)
override public bool StoreAsset(AssetBase asset)
{
string sql =
@@ -192,10 +192,12 @@ namespace OpenSim.Data.MSSQL
try
{
command.ExecuteNonQuery();
return true;
}
catch(Exception e)
{
m_log.Error("[ASSET DB]: Error storing item :" + e.Message);
return false;
}
}
}

View File

@@ -238,5 +238,10 @@ namespace OpenSim.Data.MSSQL
return DoQuery(cmd);
}
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
return null;
}
}
}

View File

@@ -153,7 +153,7 @@ namespace OpenSim.Data.MySQL
/// </summary>
/// <param name="asset">Asset UUID to create</param>
/// <remarks>On failure : Throw an exception and attempt to reconnect to database</remarks>
override public void StoreAsset(AssetBase asset)
override public bool StoreAsset(AssetBase asset)
{
lock (m_dbLock)
{
@@ -201,12 +201,14 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("?data", asset.Data);
cmd.ExecuteNonQuery();
cmd.Dispose();
return true;
}
}
catch (Exception e)
{
m_log.ErrorFormat("[ASSET DB]: MySQL failure creating asset {0} with name \"{1}\". Error: {2}",
asset.FullID, asset.Name, e.Message);
return false;
}
}
}

View File

@@ -867,7 +867,7 @@ namespace OpenSim.Data.MySQL
dbcon.Open();
using (MySqlCommand sqlCmd = new MySqlCommand(
"SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags = 1", dbcon))
"SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags & 1", dbcon))
{
sqlCmd.Parameters.AddWithValue("?uuid", avatarID.ToString());
sqlCmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture);

View File

@@ -80,5 +80,20 @@ namespace OpenSim.Data.MySQL
return DoQuery(cmd);
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
MySqlCommand cmd = new MySqlCommand();
if (scopeID != UUID.Zero)
{
where = "(ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (" + where + ")";
cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
}
cmd.CommandText = String.Format("select * from {0} where " + where, m_Realm);
return DoQuery(cmd);
}
}
}

View File

@@ -717,7 +717,7 @@ ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT
COMMIT;
:VERSION 32
:VERSION 32 #---------------------
BEGIN;
CREATE TABLE `regionwindlight` (

View File

@@ -156,5 +156,10 @@ namespace OpenSim.Data.Null
return false;
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
return null;
}
}
}

View File

@@ -124,7 +124,7 @@ namespace OpenSim.Data.SQLite
/// Create an asset
/// </summary>
/// <param name="asset">Asset Base</param>
override public void StoreAsset(AssetBase asset)
override public bool StoreAsset(AssetBase asset)
{
//m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
if (ExistsAsset(asset.FullID))
@@ -146,6 +146,7 @@ namespace OpenSim.Data.SQLite
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
cmd.ExecuteNonQuery();
return true;
}
}
}
@@ -166,6 +167,7 @@ namespace OpenSim.Data.SQLite
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
cmd.ExecuteNonQuery();
return true;
}
}
}

View File

@@ -81,5 +81,10 @@ namespace OpenSim.Data.SQLite
return DoQuery(cmd);
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
return null;
}
}
}

View File

@@ -119,7 +119,7 @@ namespace OpenSim.Data.SQLiteLegacy
/// Create an asset
/// </summary>
/// <param name="asset">Asset Base</param>
override public void StoreAsset(AssetBase asset)
override public bool StoreAsset(AssetBase asset)
{
//m_log.Info("[ASSET DB]: Creating Asset " + asset.FullID.ToString());
if (ExistsAsset(asset.FullID))
@@ -139,6 +139,7 @@ namespace OpenSim.Data.SQLiteLegacy
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
cmd.ExecuteNonQuery();
return true;
}
}
}
@@ -157,6 +158,7 @@ namespace OpenSim.Data.SQLiteLegacy
cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
cmd.ExecuteNonQuery();
return true;
}
}
}

View File

@@ -77,5 +77,10 @@ namespace OpenSim.Data.SQLiteLegacy
return DoQuery(cmd);
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
return null;
}
}
}

View File

@@ -60,6 +60,8 @@ namespace OpenSim.Framework
/// </summary>
private AssetMetadata m_metadata;
private int m_uploadAttempts;
// This is needed for .NET serialization!!!
// Do NOT "Optimize" away!
public AssetBase()
@@ -197,6 +199,12 @@ namespace OpenSim.Framework
set { m_metadata.Type = value; }
}
public int UploadAttempts
{
get { return m_uploadAttempts; }
set { m_uploadAttempts = value; }
}
/// <summary>
/// Is this a region only asset, or does this exist on the asset server also
/// </summary>

View File

@@ -256,6 +256,21 @@ namespace OpenSim.Framework
// }
}
/// <summary>
/// Invalidate all of the baked textures in the appearance, useful
/// if you know that none are valid
/// </summary>
public virtual void ResetBakedTextures()
{
SetDefaultTexture();
//for (int i = 0; i < BAKE_INDICES.Length; i++)
// {
// int idx = BAKE_INDICES[i];
// m_texture.FaceTextures[idx].TextureID = UUID.Zero;
// }
}
protected virtual void SetDefaultTexture()
{
m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
@@ -399,27 +414,36 @@ namespace OpenSim.Framework
/// </summary>
public List<AvatarAttachment> GetAttachments()
{
List<AvatarAttachment> alist = new List<AvatarAttachment>();
foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
lock (m_attachments)
{
foreach (AvatarAttachment attach in kvp.Value)
alist.Add(new AvatarAttachment(attach));
}
List<AvatarAttachment> alist = new List<AvatarAttachment>();
foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
{
foreach (AvatarAttachment attach in kvp.Value)
alist.Add(new AvatarAttachment(attach));
}
return alist;
return alist;
}
}
internal void AppendAttachment(AvatarAttachment attach)
{
if (! m_attachments.ContainsKey(attach.AttachPoint))
m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
m_attachments[attach.AttachPoint].Add(attach);
lock (m_attachments)
{
if (!m_attachments.ContainsKey(attach.AttachPoint))
m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
m_attachments[attach.AttachPoint].Add(attach);
}
}
internal void ReplaceAttachment(AvatarAttachment attach)
{
m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
m_attachments[attach.AttachPoint].Add(attach);
lock (m_attachments)
{
m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
m_attachments[attach.AttachPoint].Add(attach);
}
}
/// <summary>
@@ -435,9 +459,12 @@ namespace OpenSim.Framework
if (item == UUID.Zero)
{
if (m_attachments.ContainsKey(attachpoint))
m_attachments.Remove(attachpoint);
return;
lock (m_attachments)
{
if (m_attachments.ContainsKey(attachpoint))
m_attachments.Remove(attachpoint);
return;
}
}
// check if this is an append or a replace, 0x80 marks it as an append
@@ -455,37 +482,46 @@ namespace OpenSim.Framework
public int GetAttachpoint(UUID itemID)
{
foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
lock (m_attachments)
{
int index = kvp.Value.FindIndex(delegate(AvatarAttachment a) { return a.ItemID == itemID; });
if (index >= 0)
return kvp.Key;
}
foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
{
int index = kvp.Value.FindIndex(delegate(AvatarAttachment a) { return a.ItemID == itemID; });
if (index >= 0)
return kvp.Key;
}
return 0;
return 0;
}
}
public void DetachAttachment(UUID itemID)
{
foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
lock (m_attachments)
{
int index = kvp.Value.FindIndex(delegate(AvatarAttachment a) { return a.ItemID == itemID; });
if (index >= 0)
foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
{
// Remove it from the list of attachments at that attach point
m_attachments[kvp.Key].RemoveAt(index);
int index = kvp.Value.FindIndex(delegate(AvatarAttachment a) { return a.ItemID == itemID; });
if (index >= 0)
{
// Remove it from the list of attachments at that attach point
m_attachments[kvp.Key].RemoveAt(index);
// And remove the list if there are no more attachments here
if (m_attachments[kvp.Key].Count == 0)
m_attachments.Remove(kvp.Key);
return;
// And remove the list if there are no more attachments here
if (m_attachments[kvp.Key].Count == 0)
m_attachments.Remove(kvp.Key);
return;
}
}
}
}
public void ClearAttachments()
{
m_attachments.Clear();
lock (m_attachments)
{
m_attachments.Clear();
}
}
#region Packing Functions
@@ -522,11 +558,14 @@ namespace OpenSim.Framework
OSDBinary visualparams = new OSDBinary(m_visualparams);
data["visualparams"] = visualparams;
// Attachments
OSDArray attachs = new OSDArray(m_attachments.Count);
foreach (AvatarAttachment attach in GetAttachments())
attachs.Add(attach.Pack());
data["attachments"] = attachs;
lock (m_attachments)
{
// Attachments
OSDArray attachs = new OSDArray(m_attachments.Count);
foreach (AvatarAttachment attach in GetAttachments())
attachs.Add(attach.Pack());
data["attachments"] = attachs;
}
return data;
}

View File

@@ -363,7 +363,7 @@ namespace OpenSim.Framework.Communications
_request = (HttpWebRequest) WebRequest.Create(buildUri());
_request.KeepAlive = false;
_request.ContentType = "application/xml";
_request.Timeout = 900000;
_request.Timeout = 30000;
_request.Method = RequestMethod;
_asyncException = null;
_request.ContentLength = src.Length;

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
using OpenSim.Framework;
namespace OpenSim.Framework
{
public interface ICallingCardModule
{
UUID CreateCallingCard(UUID userID, UUID creatorID, UUID folderID);
}
}

View File

@@ -265,6 +265,9 @@ namespace OpenSim.Framework
public delegate void MoveInventoryItem(
IClientAPI remoteClient, List<InventoryItemBase> items);
public delegate void MoveItemsAndLeaveCopy(
IClientAPI remoteClient, List<InventoryItemBase> items, UUID destFolder);
public delegate void RemoveInventoryItem(
IClientAPI remoteClient, List<UUID> itemIDs);
@@ -460,9 +463,9 @@ namespace OpenSim.Framework
public delegate void AgentFOV(IClientAPI client, float verticalAngle);
public delegate void MuteListEntryUpdate(IClientAPI client, UUID MuteID, string Name, int Flags,UUID AgentID);
public delegate void MuteListEntryUpdate(IClientAPI client, UUID MuteID, string Name, int type, uint flags);
public delegate void MuteListEntryRemove(IClientAPI client, UUID MuteID, string Name, UUID AgentID);
public delegate void MuteListEntryRemove(IClientAPI client, UUID MuteID, string Name);
public delegate void AvatarInterestReply(IClientAPI client,UUID target, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages);
@@ -792,6 +795,7 @@ namespace OpenSim.Framework
event RequestTaskInventory OnRequestTaskInventory;
event UpdateInventoryItem OnUpdateInventoryItem;
event CopyInventoryItem OnCopyInventoryItem;
event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
event MoveInventoryItem OnMoveInventoryItem;
event RemoveInventoryFolder OnRemoveInventoryFolder;
event RemoveInventoryItem OnRemoveInventoryItem;
@@ -962,6 +966,7 @@ namespace OpenSim.Framework
void InPacket(object NewPack);
void ProcessInPacket(Packet NewPack);
void Close();
void Close(bool sendStop);
void Kick(string message);
/// <summary>
@@ -993,7 +998,7 @@ namespace OpenSim.Framework
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="localID"></param>
void SendKillObject(ulong regionHandle, uint localID);
void SendKillObject(ulong regionHandle, List<uint> localID);
void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs);
void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args);

View File

@@ -62,7 +62,7 @@ namespace OpenSim.Framework
private uint _flags = (uint) ParcelFlags.AllowFly | (uint) ParcelFlags.AllowLandmark |
(uint) ParcelFlags.AllowAPrimitiveEntry |
(uint) ParcelFlags.AllowDeedToGroup | (uint) ParcelFlags.AllowTerraform |
(uint) ParcelFlags.AllowDeedToGroup |
(uint) ParcelFlags.CreateObjects | (uint) ParcelFlags.AllowOtherScripts |
(uint) ParcelFlags.SoundLocal;

View File

@@ -27,7 +27,7 @@
namespace OpenSim.Framework
{
public enum ParcelMediaCommandEnum
public enum ParcelMediaCommandEnum : int
{
Stop = 0,
Pause = 1,

View File

@@ -244,13 +244,22 @@ namespace OpenSim.Framework
// The Mono addin manager (in Mono.Addins.dll version 0.2.0.0)
// occasionally seems to corrupt its addin cache
// Hence, as a temporary solution we'll remove it before each startup
string customDir = Environment.GetEnvironmentVariable ("MONO_ADDINS_REGISTRY");
string v0 = "addin-db-000";
string v1 = "addin-db-001";
if (customDir != null && customDir != String.Empty)
{
v0 = Path.Combine(customDir, v0);
v1 = Path.Combine(customDir, v1);
}
try
{
if (Directory.Exists("addin-db-000"))
Directory.Delete("addin-db-000", true);
if (Directory.Exists(v0))
Directory.Delete(v0, true);
if (Directory.Exists("addin-db-001"))
Directory.Delete("addin-db-001", true);
if (Directory.Exists(v1))
Directory.Delete(v1, true);
}
catch (IOException)
{

View File

@@ -708,7 +708,12 @@ namespace OpenSim.Framework
return _lightColorR;
}
set {
_lightColorR = value;
if (value < 0)
_lightColorR = 0;
else if (value > 1.0f)
_lightColorR = 1.0f;
else
_lightColorR = value;
}
}
@@ -717,7 +722,12 @@ namespace OpenSim.Framework
return _lightColorG;
}
set {
_lightColorG = value;
if (value < 0)
_lightColorG = 0;
else if (value > 1.0f)
_lightColorG = 1.0f;
else
_lightColorG = value;
}
}
@@ -726,7 +736,12 @@ namespace OpenSim.Framework
return _lightColorB;
}
set {
_lightColorB = value;
if (value < 0)
_lightColorB = 0;
else if (value > 1.0f)
_lightColorB = 1.0f;
else
_lightColorB = value;
}
}
@@ -735,7 +750,12 @@ namespace OpenSim.Framework
return _lightColorA;
}
set {
_lightColorA = value;
if (value < 0)
_lightColorA = 0;
else if (value > 1.0f)
_lightColorA = 1.0f;
else
_lightColorA = value;
}
}
@@ -1333,7 +1353,7 @@ namespace OpenSim.Framework
prim.Textures = this.Textures;
prim.Properties = new Primitive.ObjectProperties();
prim.Properties.Name = "Primitive";
prim.Properties.Name = "Object";
prim.Properties.Description = "";
prim.Properties.CreatorID = UUID.Zero;
prim.Properties.GroupID = UUID.Zero;

View File

@@ -40,6 +40,7 @@ using OpenSim.Framework.Console;
namespace OpenSim.Framework
{
[Serializable]
public class RegionLightShareData : ICloneable
{
public bool valid = false;

View File

@@ -48,6 +48,9 @@ namespace OpenSim.Framework.RegionLoader.Web
public RegionInfo[] LoadRegions()
{
int tries = 3;
int wait = 2000;
if (m_configSource == null)
{
m_log.Error("[WEBLOADER]: Unable to load configuration source!");
@@ -64,35 +67,47 @@ namespace OpenSim.Framework.RegionLoader.Web
}
else
{
HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url);
webRequest.Timeout = 30000; //30 Second Timeout
m_log.Debug("[WEBLOADER]: Sending Download Request...");
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
m_log.Debug("[WEBLOADER]: Downloading Region Information From Remote Server...");
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
string xmlSource = String.Empty;
string tempStr = reader.ReadLine();
while (tempStr != null)
while (tries > 0)
{
xmlSource = xmlSource + tempStr;
tempStr = reader.ReadLine();
}
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
xmlSource.Length);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlSource);
if (xmlDoc.FirstChild.Name == "Regions")
{
RegionInfo[] regionInfos = new RegionInfo[xmlDoc.FirstChild.ChildNodes.Count];
int i;
for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++)
HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url);
webRequest.Timeout = 30000; //30 Second Timeout
m_log.Debug("[WEBLOADER]: Sending Download Request...");
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
m_log.Debug("[WEBLOADER]: Downloading Region Information From Remote Server...");
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
string xmlSource = String.Empty;
string tempStr = reader.ReadLine();
while (tempStr != null)
{
m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
regionInfos[i] =
new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false,m_configSource);
xmlSource = xmlSource + tempStr;
tempStr = reader.ReadLine();
}
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
xmlSource.Length);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlSource);
if (xmlDoc.FirstChild.Name == "Regions")
{
RegionInfo[] regionInfos = new RegionInfo[xmlDoc.FirstChild.ChildNodes.Count];
int i;
for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++)
{
m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
regionInfos[i] =
new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false,m_configSource);
}
if (i > 0)
return regionInfos;
}
return regionInfos;
m_log.Debug("[WEBLOADER]: Request yielded no regions.");
tries--;
if (tries > 0)
{
m_log.Debug("[WEBLOADER]: Retrying");
System.Threading.Thread.Sleep(wait);
}
}
return null;
}

View File

@@ -280,7 +280,7 @@ namespace OpenSim.Framework.Servers
EnhanceVersionInformation();
m_log.Info("[STARTUP]: OpenSimulator version: " + m_version + Environment.NewLine);
m_log.Info("[STARTUP]: Careminster version: " + m_version + Environment.NewLine);
// clr version potentially is more confusing than helpful, since it doesn't tell us if we're running under Mono/MS .NET and
// the clr version number doesn't match the project version number under Mono.
//m_log.Info("[STARTUP]: Virtual machine runtime version: " + Environment.Version + Environment.NewLine);

View File

@@ -83,7 +83,7 @@ namespace OpenSim.Framework.Servers.HttpServer
}
catch (Exception e)
{
m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: " + e.ToString(), requestUrl);
m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: with {1} " + e.ToString(), requestUrl,obj);
}
finally
{

View File

@@ -56,12 +56,28 @@ namespace OpenSim.Framework.Servers.HttpServer
/// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting
/// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
{
return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 100);
}
/// <summary>
/// Perform a synchronous REST request.
/// </summary>
/// <param name="verb"></param>
/// <param name="requestUrl"></param>
/// <param name="obj"> </param>
/// <param name="timeout"> </param>
/// <returns></returns>
///
/// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting
/// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
{
Type type = typeof (TRequest);
TResponse deserial = default(TResponse);
WebRequest request = WebRequest.Create(requestUrl);
request.Method = verb;
request.Timeout = pTimeout * 1000;
if ((verb == "POST") || (verb == "PUT"))
{
@@ -81,7 +97,6 @@ namespace OpenSim.Framework.Servers.HttpServer
int length = (int) buffer.Length;
request.ContentLength = length;
Stream requestStream = null;
try
{
@@ -103,7 +118,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{
using (WebResponse resp = request.GetResponse())
{
if (resp.ContentLength > 0)
if (resp.ContentLength != 0)
{
Stream respStream = resp.GetResponseStream();
XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));

View File

@@ -33,7 +33,7 @@ namespace OpenSim
private const Flavour VERSION_FLAVOUR = Flavour.Dev;
public enum Flavour
{
{
Unknown,
Dev,
RC1,
@@ -49,7 +49,7 @@ namespace OpenSim
public static string GetVersionString(string versionNumber, Flavour flavour)
{
string versionString = "OpenSim " + versionNumber + " " + flavour;
string versionString = "Careminster " + versionNumber + " " + flavour;
return versionString.PadRight(VERSIONINFO_VERSION_LENGTH);
}

View File

@@ -27,9 +27,13 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Reflection;
using System.Xml;
using System.Diagnostics;
using System.Xml.Schema;
using System.Xml.Serialization;
using log4net;
using OpenMetaverse;
namespace OpenSim.Framework
@@ -45,6 +49,155 @@ namespace OpenSim.Framework
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static XmlSerializer tiiSerializer = new XmlSerializer(typeof (TaskInventoryItem));
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Thread LockedByThread;
private string WriterStack;
private Dictionary<Thread, string> ReadLockers =
new Dictionary<Thread, string>();
/// <value>
/// An advanced lock for inventory data
/// </value>
private System.Threading.ReaderWriterLockSlim m_itemLock = new System.Threading.ReaderWriterLockSlim();
/// <summary>
/// Are we readlocked by the calling thread?
/// </summary>
public bool IsReadLockedByMe()
{
if (m_itemLock.RecursiveReadCount > 0)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// Lock our inventory list for reading (many can read, one can write)
/// </summary>
public void LockItemsForRead(bool locked)
{
if (locked)
{
if (m_itemLock.IsWriteLockHeld && LockedByThread != null)
{
if (!LockedByThread.IsAlive)
{
//Locked by dead thread, reset.
m_itemLock = new System.Threading.ReaderWriterLockSlim();
}
}
if (m_itemLock.RecursiveReadCount > 0)
{
m_log.Error("[TaskInventoryDictionary] Recursive read lock requested. This should not happen and means something needs to be fixed. For now though, it's safe to continue.");
try
{
StackTrace stackTrace = new StackTrace(); // get call stack
StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
// write call stack method names
foreach (StackFrame stackFrame in stackFrames)
{
m_log.Error("[SceneObjectGroup.m_parts] "+(stackFrame.GetMethod().Name)); // write method name
}
}
catch
{}
m_itemLock.ExitReadLock();
}
if (m_itemLock.RecursiveWriteCount > 0)
{
m_log.Error("[TaskInventoryDictionary] Recursive write lock requested. This should not happen and means something needs to be fixed.");
m_itemLock.ExitWriteLock();
}
while (!m_itemLock.TryEnterReadLock(60000))
{
m_log.Error("Thread lock detected while trying to aquire READ lock in TaskInventoryDictionary. Locked by thread " + LockedByThread.Name + ". I'm going to try to solve the thread lock automatically to preserve region stability, but this needs to be fixed.");
if (m_itemLock.IsWriteLockHeld)
{
m_itemLock = new System.Threading.ReaderWriterLockSlim();
System.Console.WriteLine("------------------------------------------");
System.Console.WriteLine("My call stack:\n" + Environment.StackTrace);
System.Console.WriteLine("------------------------------------------");
System.Console.WriteLine("Locker's call stack:\n" + WriterStack);
System.Console.WriteLine("------------------------------------------");
LockedByThread = null;
ReadLockers.Clear();
}
}
}
else
{
if (m_itemLock.RecursiveReadCount>0)
{
m_itemLock.ExitReadLock();
}
}
}
/// <summary>
/// Lock our inventory list for writing (many can read, one can write)
/// </summary>
public void LockItemsForWrite(bool locked)
{
if (locked)
{
//Enter a write lock, wait indefinately for one to open.
if (m_itemLock.RecursiveReadCount > 0)
{
m_log.Error("[TaskInventoryDictionary] Recursive read lock requested. This should not happen and means something needs to be fixed. For now though, it's safe to continue.");
m_itemLock.ExitReadLock();
}
if (m_itemLock.RecursiveWriteCount > 0)
{
m_log.Error("[TaskInventoryDictionary] Recursive write lock requested. This should not happen and means something needs to be fixed.");
m_itemLock.ExitWriteLock();
}
while (!m_itemLock.TryEnterWriteLock(60000))
{
if (m_itemLock.IsWriteLockHeld)
{
m_log.Error("Thread lock detected while trying to aquire WRITE lock in TaskInventoryDictionary. Locked by thread " + LockedByThread.Name + ". I'm going to try to solve the thread lock automatically to preserve region stability, but this needs to be fixed.");
System.Console.WriteLine("------------------------------------------");
System.Console.WriteLine("My call stack:\n" + Environment.StackTrace);
System.Console.WriteLine("------------------------------------------");
System.Console.WriteLine("Locker's call stack:\n" + WriterStack);
System.Console.WriteLine("------------------------------------------");
}
else
{
m_log.Error("Thread lock detected while trying to aquire WRITE lock in TaskInventoryDictionary. Locked by a reader. I'm going to try to solve the thread lock automatically to preserve region stability, but this needs to be fixed.");
System.Console.WriteLine("------------------------------------------");
System.Console.WriteLine("My call stack:\n" + Environment.StackTrace);
System.Console.WriteLine("------------------------------------------");
foreach (KeyValuePair<Thread, string> kvp in ReadLockers)
{
System.Console.WriteLine("Locker name {0} call stack:\n" + kvp.Value, kvp.Key.Name);
System.Console.WriteLine("------------------------------------------");
}
}
m_itemLock = new System.Threading.ReaderWriterLockSlim();
ReadLockers.Clear();
}
LockedByThread = Thread.CurrentThread;
WriterStack = Environment.StackTrace;
}
else
{
if (m_itemLock.RecursiveWriteCount > 0)
{
m_itemLock.ExitWriteLock();
}
}
}
#region ICloneable Members
@@ -52,13 +205,12 @@ namespace OpenSim.Framework
{
TaskInventoryDictionary clone = new TaskInventoryDictionary();
lock (this)
m_itemLock.EnterReadLock();
foreach (UUID uuid in Keys)
{
foreach (UUID uuid in Keys)
{
clone.Add(uuid, (TaskInventoryItem) this[uuid].Clone());
}
clone.Add(uuid, (TaskInventoryItem) this[uuid].Clone());
}
m_itemLock.ExitReadLock();
return clone;
}

View File

@@ -121,9 +121,12 @@ namespace OpenSim.Framework
private UUID _permsGranter;
private int _permsMask;
private int _type = 0;
private UUID _oldID;
private UUID _oldID = UUID.Zero;
private bool _ownerChanged = false;
// This used ONLY during copy. It can't be relied on at other times!
private bool _scriptRunning = true;
public UUID AssetID {
get {
@@ -387,6 +390,15 @@ namespace OpenSim.Framework
}
}
public bool ScriptRunning {
get {
return _scriptRunning;
}
set {
_scriptRunning = value;
}
}
// See ICloneable
#region ICloneable Members
@@ -404,7 +416,8 @@ namespace OpenSim.Framework
/// <param name="partID">The new part ID to which this item belongs</param>
public void ResetIDs(UUID partID)
{
OldItemID = ItemID;
if (_oldID == UUID.Zero)
_oldID = ItemID;
ItemID = UUID.Random();
ParentPartID = partID;
ParentID = partID;

View File

@@ -26,6 +26,7 @@
*/
using System;
using System.Collections.Generic;
namespace OpenSim.Framework
{
@@ -36,33 +37,30 @@ namespace OpenSim.Framework
[Serializable]
public class UndoStack<T>
{
private int m_new = 1;
private int m_old = 0;
private T[] m_Undos;
private List<T> m_undolist;
private int m_max;
public UndoStack(int capacity)
{
m_Undos = new T[capacity + 1];
m_undolist = new List<T>();
m_max = capacity;
}
public bool IsFull
{
get { return m_new == m_old; }
get { return m_undolist.Count >= m_max; }
}
public int Capacity
{
get { return m_Undos.Length - 1; }
get { return m_max; }
}
public int Count
{
get
{
int count = m_new - m_old - 1;
if (count < 0)
count += m_Undos.Length;
return count;
return m_undolist.Count;
}
}
@@ -70,45 +68,39 @@ namespace OpenSim.Framework
{
if (IsFull)
{
m_old++;
if (m_old >= m_Undos.Length)
m_old -= m_Undos.Length;
m_undolist.RemoveAt(0);
}
if (++m_new >= m_Undos.Length)
m_new -= m_Undos.Length;
m_Undos[m_new] = item;
m_undolist.Add(item);
}
public T Pop()
{
if (Count > 0)
if (m_undolist.Count > 0)
{
T deleted = m_Undos[m_new];
m_Undos[m_new--] = default(T);
if (m_new < 0)
m_new += m_Undos.Length;
return deleted;
int ind = m_undolist.Count - 1;
T item = m_undolist[ind];
m_undolist.RemoveAt(ind);
return item;
}
else
throw new InvalidOperationException("Cannot pop from emtpy stack");
throw new InvalidOperationException("Cannot pop from empty stack");
}
public T Peek()
{
return m_Undos[m_new];
if (m_undolist.Count > 0)
{
return m_undolist[m_undolist.Count - 1];
}
else
{
return default(T);
}
}
public void Clear()
{
if (Count > 0)
{
for (int i = 0; i < m_Undos.Length; i++)
{
m_Undos[i] = default(T);
}
m_new = 1;
m_old = 0;
}
m_undolist.Clear();
}
}
}

View File

@@ -1016,19 +1016,19 @@ namespace OpenSim.Framework
{
string os = String.Empty;
if (Environment.OSVersion.Platform != PlatformID.Unix)
{
os = Environment.OSVersion.ToString();
}
else
{
os = ReadEtcIssue();
}
if (os.Length > 45)
{
os = os.Substring(0, 45);
}
// if (Environment.OSVersion.Platform != PlatformID.Unix)
// {
// os = Environment.OSVersion.ToString();
// }
// else
// {
// os = ReadEtcIssue();
// }
//
// if (os.Length > 45)
// {
// os = os.Substring(0, 45);
// }
return os;
}

View File

@@ -52,7 +52,7 @@ namespace OpenSim.Framework
public ThreadWatchdogInfo(Thread thread)
{
Thread = thread;
LastTick = Environment.TickCount & Int32.MaxValue;
LastTick = Environment.TickCount;
}
}
@@ -127,7 +127,7 @@ namespace OpenSim.Framework
m_threads.Add(threadInfo.Thread.ManagedThreadId, threadInfo);
}
private static bool RemoveThread(int threadID)
public static bool RemoveThread(int threadID)
{
lock (m_threads)
return m_threads.Remove(threadID);
@@ -144,7 +144,7 @@ namespace OpenSim.Framework
try
{
if (m_threads.TryGetValue(threadID, out threadInfo))
threadInfo.LastTick = Environment.TickCount & Int32.MaxValue;
threadInfo.LastTick = Environment.TickCount;
else
AddThread(new ThreadWatchdogInfo(Thread.CurrentThread));
}
@@ -170,7 +170,7 @@ namespace OpenSim.Framework
lock (m_threads)
{
int now = Environment.TickCount & Int32.MaxValue;
int now = Environment.TickCount;
foreach (ThreadWatchdogInfo threadInfo in m_threads.Values)
{

View File

@@ -444,7 +444,7 @@ namespace OpenSim
if (alert != null)
presence.ControllingClient.Kick(alert);
else
presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n");
presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
// ...and close on our side
presence.Scene.IncomingCloseAgent(presence.UUID);
@@ -1146,7 +1146,7 @@ namespace OpenSim
MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z));
}
}
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[2], generateNewIDS, loadOffset);
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
}
else
{

View File

@@ -88,6 +88,10 @@ namespace OpenSim
protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>();
private List<string> m_permsModules;
private bool m_securePermissionsLoading = true;
/// <value>
/// The config information passed into the OpenSimulator region server.
/// </value>
@@ -185,6 +189,11 @@ namespace OpenSim
CreatePIDFile(pidFile);
userStatsURI = startupConfig.GetString("Stats_URI", String.Empty);
m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true);
string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule");
m_permsModules = new List<string>(permissionModules.Split(','));
}
// Load the simulation data service
@@ -213,6 +222,12 @@ namespace OpenSim
m_moduleLoader = new ModuleLoader(m_config.Source);
LoadPlugins();
if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch!
{
Environment.Exit(1);
}
foreach (IApplicationPlugin plugin in m_plugins)
{
plugin.PostInitialise();
@@ -360,7 +375,41 @@ namespace OpenSim
}
else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing...");
if (m_securePermissionsLoading)
{
foreach (string s in m_permsModules)
{
if (!scene.RegionModules.ContainsKey(s))
{
bool found = false;
foreach (IRegionModule m in modules)
{
if (m.Name == s)
{
found = true;
}
}
if (!found)
{
m_log.Fatal("[MODULES]: Required module " + s + " not found.");
Environment.Exit(0);
}
}
}
}
scene.SetModuleInterfaces();
// First Step of bootreport sequence
if (scene.SnmpService != null)
{
scene.SnmpService.ColdStart(1,scene);
scene.SnmpService.LinkDown(scene);
}
if (scene.SnmpService != null)
{
scene.SnmpService.BootInfo("Loading prins", scene);
}
// Prims have to be loaded after module configuration since some modules may be invoked during the load
scene.LoadPrimsFromStorage(regionInfo.originRegionID);
@@ -368,6 +417,10 @@ namespace OpenSim
// TODO : Try setting resource for region xstats here on scene
MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
if (scene.SnmpService != null)
{
scene.SnmpService.BootInfo("Grid Registration in progress", scene);
}
try
{
scene.RegisterRegionWithGrid();
@@ -378,11 +431,20 @@ namespace OpenSim
"[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
e.Message, e.StackTrace);
if (scene.SnmpService != null)
{
scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene);
}
// Carrying on now causes a lot of confusion down the
// line - we need to get the user's attention
Environment.Exit(1);
}
if (scene.SnmpService != null)
{
scene.SnmpService.BootInfo("Grid Registration done", scene);
}
scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
scene.EventManager.TriggerParcelPrimCountUpdate();
@@ -390,6 +452,11 @@ namespace OpenSim
// scripting engines.
scene.CreateScriptInstances();
if (scene.SnmpService != null)
{
scene.SnmpService.BootInfo("ScriptEngine started", scene);
}
m_sceneManager.Add(scene);
if (m_autoCreateClientStack)
@@ -398,6 +465,10 @@ namespace OpenSim
clientServer.Start();
}
if (scene.SnmpService != null)
{
scene.SnmpService.BootInfo("Initializing region modules", scene);
}
if (do_post_init)
{
foreach (IRegionModule module in modules)
@@ -409,6 +480,12 @@ namespace OpenSim
mscene = scene;
if (scene.SnmpService != null)
{
scene.SnmpService.BootInfo("The region is operational", scene);
scene.SnmpService.LinkUp(scene);
}
scene.StartTimer();
return clientServer;
@@ -417,6 +494,11 @@ namespace OpenSim
private void ShutdownRegion(Scene scene)
{
m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName);
if (scene.SnmpService != null)
{
scene.SnmpService.BootInfo("The region is shutting down", scene);
scene.SnmpService.LinkDown(scene);
}
IRegionModulesController controller;
if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller))
{

View File

@@ -202,6 +202,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_stopPacket = TexturePacketCount();
}
//Give them at least two packets, to play nice with some broken viewers (SL also behaves this way)
if (m_stopPacket == 1 && Layers[0].End > FIRST_PACKET_SIZE) m_stopPacket++;
m_currentPacket = StartPacket;
}
}

View File

@@ -155,6 +155,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event RequestTaskInventory OnRequestTaskInventory;
public event UpdateInventoryItem OnUpdateInventoryItem;
public event CopyInventoryItem OnCopyInventoryItem;
public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
public event MoveInventoryItem OnMoveInventoryItem;
public event RemoveInventoryItem OnRemoveInventoryItem;
public event RemoveInventoryFolder OnRemoveInventoryFolder;
@@ -327,7 +328,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
/// ownerless phantom.
///
/// All manipulation of this set has to occur under a lock
/// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock
///
/// </value>
protected HashSet<uint> m_killRecord;
@@ -335,6 +336,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// protected HashSet<uint> m_attachmentsSent;
private int m_moneyBalance;
private bool m_deliverPackets = true;
private int m_animationSequenceNumber = 1;
private bool m_SendLogoutPacketWhenClosing = true;
private AgentUpdateArgs lastarg;
@@ -377,6 +379,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
get { return m_startpos; }
set { m_startpos = value; }
}
public bool DeliverPackets
{
get { return m_deliverPackets; }
set {
m_deliverPackets = value;
m_udpClient.m_deliverPackets = value;
}
}
public UUID AgentId { get { return m_agentId; } }
public UUID ActiveGroupId { get { return m_activeGroupID; } }
public string ActiveGroupName { get { return m_activeGroupName; } }
@@ -475,18 +485,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Client Methods
/// <summary>
/// Shut down the client view
/// </summary>
public void Close()
{
Close(true);
}
/// <summary>
/// Shut down the client view
/// </summary>
public void Close(bool sendStop)
{
m_log.DebugFormat(
"[CLIENT]: Close has been called for {0} attached to scene {1}",
Name, m_scene.RegionInfo.RegionName);
// Send the STOP packet
DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
OutPacket(disable, ThrottleOutPacketType.Unknown);
if (sendStop)
{
// Send the STOP packet
DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
OutPacket(disable, ThrottleOutPacketType.Unknown);
}
IsActive = false;
@@ -767,7 +789,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
reply.ChatData.OwnerID = fromAgentID;
reply.ChatData.SourceID = fromAgentID;
OutPacket(reply, ThrottleOutPacketType.Task);
OutPacket(reply, ThrottleOutPacketType.Unknown);
}
/// <summary>
@@ -1053,6 +1075,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public virtual void SendLayerData(float[] map)
{
Util.FireAndForget(DoSendLayerData, map);
// Send it sync, and async. It's not that much data
// and it improves user experience just so much!
DoSendLayerData(map);
}
/// <summary>
@@ -1065,16 +1091,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
try
{
//for (int y = 0; y < 16; y++)
//{
// for (int x = 0; x < 16; x++)
// {
// SendLayerData(x, y, map);
// }
//}
// Send LayerData in a spiral pattern. Fun!
SendLayerTopRight(map, 0, 0, 15, 15);
for (int y = 0; y < 16; y++)
{
for (int x = 0; x < 16; x+=4)
{
SendLayerPacket(x, y, map);
}
}
}
catch (Exception e)
{
@@ -1082,51 +1105,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
private void SendLayerTopRight(float[] map, int x1, int y1, int x2, int y2)
{
// Row
for (int i = x1; i <= x2; i++)
SendLayerData(i, y1, map);
// Column
for (int j = y1 + 1; j <= y2; j++)
SendLayerData(x2, j, map);
if (x2 - x1 > 0)
SendLayerBottomLeft(map, x1, y1 + 1, x2 - 1, y2);
}
void SendLayerBottomLeft(float[] map, int x1, int y1, int x2, int y2)
{
// Row in reverse
for (int i = x2; i >= x1; i--)
SendLayerData(i, y2, map);
// Column in reverse
for (int j = y2 - 1; j >= y1; j--)
SendLayerData(x1, j, map);
if (x2 - x1 > 0)
SendLayerTopRight(map, x1 + 1, y1, x2, y2 - 1);
}
/// <summary>
/// Sends a set of four patches (x, x+1, ..., x+3) to the client
/// </summary>
/// <param name="map">heightmap</param>
/// <param name="px">X coordinate for patches 0..12</param>
/// <param name="py">Y coordinate for patches 0..15</param>
// private void SendLayerPacket(float[] map, int y, int x)
// {
// int[] patches = new int[4];
// patches[0] = x + 0 + y * 16;
// patches[1] = x + 1 + y * 16;
// patches[2] = x + 2 + y * 16;
// patches[3] = x + 3 + y * 16;
private void SendLayerPacket(int x, int y, float[] map)
{
int[] patches = new int[4];
patches[0] = x + 0 + y * 16;
patches[1] = x + 1 + y * 16;
patches[2] = x + 2 + y * 16;
patches[3] = x + 3 + y * 16;
// Packet layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches);
// OutPacket(layerpack, ThrottleOutPacketType.Land);
// }
float[] heightmap = (map.Length == 65536) ?
map :
LLHeightFieldMoronize(map);
try
{
Packet layerpack = TerrainCompressor.CreateLandPacket(heightmap, patches);
OutPacket(layerpack, ThrottleOutPacketType.Land);
}
catch
{
for (int px = x ; px < x + 4 ; px++)
SendLayerData(px, y, map);
}
}
/// <summary>
/// Sends a specified patch to a client
@@ -1146,7 +1153,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(heightmap, patches);
layerpack.Header.Reliable = true;
OutPacket(layerpack, ThrottleOutPacketType.Land);
OutPacket(layerpack, ThrottleOutPacketType.Task);
}
catch (Exception e)
{
@@ -1507,37 +1514,49 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(pc, ThrottleOutPacketType.Unknown);
}
public void SendKillObject(ulong regionHandle, uint localID)
public void SendKillObject(ulong regionHandle, List<uint> localIDs)
{
// m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle);
KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
// TODO: don't create new blocks if recycling an old packet
kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock();
kill.ObjectData[0].ID = localID;
kill.ObjectData = new KillObjectPacket.ObjectDataBlock[localIDs.Count];
for (int i = 0 ; i < localIDs.Count ; i++ )
{
kill.ObjectData[i] = new KillObjectPacket.ObjectDataBlock();
kill.ObjectData[i].ID = localIDs[i];
}
kill.Header.Reliable = true;
kill.Header.Zerocoded = true;
if (m_scene.GetScenePresence(localID) == null)
lock (m_killRecord)
{
// We must lock for both manipulating the kill record and sending the packet, in order to avoid a race
// condition where a kill can be processed before an out-of-date update for the same object.
lock (m_killRecord)
if (localIDs.Count == 1)
{
m_killRecord.Add(localID);
// The throttle queue used here must match that being used for updates. Otherwise, there is a
// chance that a kill packet put on a separate queue will be sent to the client before an existing
// update packet on another queue. Receiving updates after kills results in unowned and undeletable
// scene objects in a viewer until that viewer is relogged in.
OutPacket(kill, ThrottleOutPacketType.Task);
if (m_scene.GetScenePresence(localIDs[0]) != null)
{
OutPacket(kill, ThrottleOutPacketType.State);
return;
}
m_killRecord.Add(localIDs[0]);
}
else
{
lock (m_entityUpdates.SyncRoot)
{
foreach (uint localID in localIDs)
m_killRecord.Add(localID);
}
}
}
else
{
OutPacket(kill, ThrottleOutPacketType.State);
}
// The throttle queue used here must match that being used for
// updates. Otherwise, there is a chance that a kill packet put
// on a separate queue will be sent to the client before an
// existing update packet on another queue. Receiving updates
// after kills results in unowned and undeletable
// scene objects in a viewer until that viewer is relogged in.
OutPacket(kill, ThrottleOutPacketType.Task);
}
/// <summary>
@@ -2250,6 +2269,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(sound, ThrottleOutPacketType.Task);
}
public void SendTransferAbort(TransferRequestPacket transferRequest)
{
TransferAbortPacket abort = (TransferAbortPacket)PacketPool.Instance.GetPacket(PacketType.TransferAbort);
abort.TransferInfo.TransferID = transferRequest.TransferInfo.TransferID;
abort.TransferInfo.ChannelType = transferRequest.TransferInfo.ChannelType;
m_log.Debug("[Assets] Aborting transfer; asset request failed");
OutPacket(abort, ThrottleOutPacketType.Task);
}
public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
{
SoundTriggerPacket sound = (SoundTriggerPacket)PacketPool.Instance.GetPacket(PacketType.SoundTrigger);
@@ -3551,6 +3579,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// </summary>
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
{
if (entity is SceneObjectPart)
{
SceneObjectPart e = (SceneObjectPart)entity;
SceneObjectGroup g = e.ParentGroup;
if (g.RootPart.Shape.State > 30) // HUD
if (g.OwnerID != AgentId)
return; // Don't send updates for other people's HUDs
}
double priority = m_prioritizer.GetUpdatePriority(this, entity);
lock (m_entityUpdates.SyncRoot)
@@ -3567,232 +3604,257 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
int updatesThisCall = 0;
// We must lock for both manipulating the kill record and sending the packet, in order to avoid a race
// condition where a kill can be processed before an out-of-date update for the same object.
lock (m_killRecord)
{
float avgTimeDilation = 1.0f;
EntityUpdate update;
while (updatesThisCall < maxUpdates)
{
lock (m_entityUpdates.SyncRoot)
if (!m_entityUpdates.TryDequeue(out update))
break;
avgTimeDilation += update.TimeDilation;
avgTimeDilation *= 0.5f;
float avgTimeDilation = 0;
if (update.Entity is SceneObjectPart)
EntityUpdate update;
while (updatesThisCall < maxUpdates)
{
lock (m_entityUpdates.SyncRoot)
if (!m_entityUpdates.TryDequeue(out update))
break;
avgTimeDilation += update.TimeDilation;
avgTimeDilation *= 0.5f;
if (update.Entity is SceneObjectPart)
{
SceneObjectPart part = (SceneObjectPart)update.Entity;
// Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
// will never receive an update after a prim kill. Even then, keeping the kill record may be a good
// safety measure.
//
// If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update
// after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs
// updates and kills on different threads with different scheduling strategies, hence this protection.
//
// This doesn't appear to apply to child prims - a client will happily ignore these updates
// after the root prim has been deleted.
lock (m_killRecord)
{
SceneObjectPart part = (SceneObjectPart)update.Entity;
// Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
// will never receive an update after a prim kill. Even then, keeping the kill record may be a good
// safety measure.
//
// If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update
// after a kill, it will keep displaying the deleted object until relog. OpenSim currently performs
// updates and kills on different threads with different scheduling strategies, hence this protection.
//
// This doesn't appear to apply to child prims - a client will happily ignore these updates
// after the root prim has been deleted.
if (m_killRecord.Contains(part.LocalId))
{
// m_log.WarnFormat(
// "[CLIENT]: Preventing update for prim with local id {0} after client for user {1} told it was deleted",
// part.LocalId, Name);
continue;
}
if (part.ParentGroup.IsAttachment && m_disableFacelights)
if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId))
continue;
}
if (part.ParentGroup.IsDeleted)
continue;
if (part.ParentGroup.IsAttachment)
{ // Someone else's HUD, why are we getting these?
if (part.ParentGroup.OwnerID != AgentId &&
part.ParentGroup.RootPart.Shape.State >= 30)
continue;
ScenePresence sp;
// Owner is not in the sim, don't update it to
// anyone
if (!m_scene.TryGetScenePresence(part.OwnerID, out sp))
continue;
List<SceneObjectGroup> atts = sp.Attachments;
bool found = false;
foreach (SceneObjectGroup att in atts)
{
if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand &&
part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.RightHand)
if (att == part.ParentGroup)
{
part.Shape.LightEntry = false;
found = true;
break;
}
}
// It's an attachment of a valid avatar, but
// doesn't seem to be attached, skip
if (!found)
continue;
}
++updatesThisCall;
#region UpdateFlags to packet type conversion
PrimUpdateFlags updateFlags = update.Flags;
bool canUseCompressed = true;
bool canUseImproved = true;
// Compressed object updates only make sense for LL primitives
if (!(update.Entity is SceneObjectPart))
if (part.ParentGroup.IsAttachment && m_disableFacelights)
{
if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand &&
part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.RightHand)
{
part.Shape.LightEntry = false;
}
}
}
++updatesThisCall;
#region UpdateFlags to packet type conversion
PrimUpdateFlags updateFlags = update.Flags;
bool canUseCompressed = true;
bool canUseImproved = true;
// Compressed object updates only make sense for LL primitives
if (!(update.Entity is SceneObjectPart))
{
canUseCompressed = false;
}
if (updateFlags.HasFlag(PrimUpdateFlags.FullUpdate))
{
canUseCompressed = false;
canUseImproved = false;
}
else
{
if (updateFlags.HasFlag(PrimUpdateFlags.Velocity) ||
updateFlags.HasFlag(PrimUpdateFlags.Acceleration) ||
updateFlags.HasFlag(PrimUpdateFlags.CollisionPlane) ||
updateFlags.HasFlag(PrimUpdateFlags.Joint))
{
canUseCompressed = false;
}
if (updateFlags.HasFlag(PrimUpdateFlags.FullUpdate))
if (updateFlags.HasFlag(PrimUpdateFlags.PrimFlags) ||
updateFlags.HasFlag(PrimUpdateFlags.ParentID) ||
updateFlags.HasFlag(PrimUpdateFlags.Scale) ||
updateFlags.HasFlag(PrimUpdateFlags.PrimData) ||
updateFlags.HasFlag(PrimUpdateFlags.Text) ||
updateFlags.HasFlag(PrimUpdateFlags.NameValue) ||
updateFlags.HasFlag(PrimUpdateFlags.ExtraData) ||
updateFlags.HasFlag(PrimUpdateFlags.TextureAnim) ||
updateFlags.HasFlag(PrimUpdateFlags.Sound) ||
updateFlags.HasFlag(PrimUpdateFlags.Particles) ||
updateFlags.HasFlag(PrimUpdateFlags.Material) ||
updateFlags.HasFlag(PrimUpdateFlags.ClickAction) ||
updateFlags.HasFlag(PrimUpdateFlags.MediaURL) ||
updateFlags.HasFlag(PrimUpdateFlags.Joint))
{
canUseCompressed = false;
canUseImproved = false;
}
else
}
#endregion UpdateFlags to packet type conversion
#region Block Construction
// TODO: Remove this once we can build compressed updates
canUseCompressed = false;
if (!canUseImproved && !canUseCompressed)
{
if (update.Entity is ScenePresence)
{
if (updateFlags.HasFlag(PrimUpdateFlags.Velocity) ||
updateFlags.HasFlag(PrimUpdateFlags.Acceleration) ||
updateFlags.HasFlag(PrimUpdateFlags.CollisionPlane) ||
updateFlags.HasFlag(PrimUpdateFlags.Joint))
{
canUseCompressed = false;
}
if (updateFlags.HasFlag(PrimUpdateFlags.PrimFlags) ||
updateFlags.HasFlag(PrimUpdateFlags.ParentID) ||
updateFlags.HasFlag(PrimUpdateFlags.Scale) ||
updateFlags.HasFlag(PrimUpdateFlags.PrimData) ||
updateFlags.HasFlag(PrimUpdateFlags.Text) ||
updateFlags.HasFlag(PrimUpdateFlags.NameValue) ||
updateFlags.HasFlag(PrimUpdateFlags.ExtraData) ||
updateFlags.HasFlag(PrimUpdateFlags.TextureAnim) ||
updateFlags.HasFlag(PrimUpdateFlags.Sound) ||
updateFlags.HasFlag(PrimUpdateFlags.Particles) ||
updateFlags.HasFlag(PrimUpdateFlags.Material) ||
updateFlags.HasFlag(PrimUpdateFlags.ClickAction) ||
updateFlags.HasFlag(PrimUpdateFlags.MediaURL) ||
updateFlags.HasFlag(PrimUpdateFlags.Joint))
{
canUseImproved = false;
}
}
#endregion UpdateFlags to packet type conversion
#region Block Construction
// TODO: Remove this once we can build compressed updates
canUseCompressed = false;
if (!canUseImproved && !canUseCompressed)
{
if (update.Entity is ScenePresence)
{
objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity));
}
else
{
// if (update.Entity is SceneObjectPart && ((SceneObjectPart)update.Entity).IsAttachment)
// {
// SceneObjectPart sop = (SceneObjectPart)update.Entity;
// string text = sop.Text;
// if (text.IndexOf("\n") >= 0)
// text = text.Remove(text.IndexOf("\n"));
//
// if (m_attachmentsSent.Contains(sop.ParentID))
// {
//// m_log.DebugFormat(
//// "[CLIENT]: Sending full info about attached prim {0} text {1}",
//// sop.LocalId, text);
//
// objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId));
//
// m_attachmentsSent.Add(sop.LocalId);
// }
// else
// {
// m_log.DebugFormat(
// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet",
// sop.LocalId, text, sop.ParentID);
//
// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId);
// }
// }
// else
// {
objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId));
// }
}
}
else if (!canUseImproved)
{
compressedUpdateBlocks.Value.Add(CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags));
objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity));
}
else
{
if (update.Entity is ScenePresence && ((ScenePresence)update.Entity).UUID == AgentId)
// Self updates go into a special list
terseAgentUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
else
// Everything else goes here
terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
// if (update.Entity is SceneObjectPart && ((SceneObjectPart)update.Entity).IsAttachment)
// {
// SceneObjectPart sop = (SceneObjectPart)update.Entity;
// string text = sop.Text;
// if (text.IndexOf("\n") >= 0)
// text = text.Remove(text.IndexOf("\n"));
//
// if (m_attachmentsSent.Contains(sop.ParentID))
// {
//// m_log.DebugFormat(
//// "[CLIENT]: Sending full info about attached prim {0} text {1}",
//// sop.LocalId, text);
//
// objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId));
//
// m_attachmentsSent.Add(sop.LocalId);
// }
// else
// {
// m_log.DebugFormat(
// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet",
// sop.LocalId, text, sop.ParentID);
//
// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId);
// }
// }
// else
// {
objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId));
// }
}
#endregion Block Construction
}
#region Packet Sending
//const float TIME_DILATION = 1.0f;
else if (!canUseImproved)
{
compressedUpdateBlocks.Value.Add(CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags));
}
else
{
if (update.Entity is ScenePresence && ((ScenePresence)update.Entity).UUID == AgentId)
// Self updates go into a special list
terseAgentUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
else
// Everything else goes here
terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures)));
}
#endregion Block Construction
}
ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f);
#region Packet Sending
if (terseAgentUpdateBlocks.IsValueCreated)
{
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value;
const float TIME_DILATION = 1.0f;
ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f);
ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
packet.RegionData.TimeDilation = timeDilation;
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[i];
if (terseAgentUpdateBlocks.IsValueCreated)
{
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value;
OutPacket(packet, ThrottleOutPacketType.Unknown, true);
}
ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
packet.RegionData.TimeDilation = timeDilation;
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[i];
OutPacket(packet, ThrottleOutPacketType.Unknown, true);
}
if (objectUpdateBlocks.IsValueCreated)
{
List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;
if (objectUpdateBlocks.IsValueCreated)
{
List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;
ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
packet.RegionData.TimeDilation = timeDilation;
packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count];
for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[i];
OutPacket(packet, ThrottleOutPacketType.Task, true);
}
if (compressedUpdateBlocks.IsValueCreated)
{
List<ObjectUpdateCompressedPacket.ObjectDataBlock> blocks = compressedUpdateBlocks.Value;
ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
packet.RegionData.TimeDilation = timeDilation;
packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count];
for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[i];
OutPacket(packet, ThrottleOutPacketType.Task, true);
}
if (terseUpdateBlocks.IsValueCreated)
{
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
packet.RegionData.TimeDilation = timeDilation;
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[i];
OutPacket(packet, ThrottleOutPacketType.Task, true);
}
ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
packet.RegionData.TimeDilation = timeDilation;
packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count];
for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[i];
OutPacket(packet, ThrottleOutPacketType.Task, true);
}
if (compressedUpdateBlocks.IsValueCreated)
{
List<ObjectUpdateCompressedPacket.ObjectDataBlock> blocks = compressedUpdateBlocks.Value;
ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
packet.RegionData.TimeDilation = timeDilation;
packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count];
for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[i];
OutPacket(packet, ThrottleOutPacketType.Task, true);
}
if (terseUpdateBlocks.IsValueCreated)
{
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
packet.RegionData.TimeDilation = timeDilation;
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
for (int i = 0; i < blocks.Count; i++)
packet.ObjectData[i] = blocks[i];
OutPacket(packet, ThrottleOutPacketType.Task, true);
}
#endregion Packet Sending
@@ -4058,6 +4120,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
m_propertiesPacketTimer.Stop();
if (m_propertiesBlocks.Count == 0)
return;
proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[m_propertiesBlocks.Count];
int index = 0;
@@ -4449,14 +4514,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (notifyCount > 0)
{
if (notifyCount > 32)
{
m_log.InfoFormat(
"[LAND]: More than {0} avatars own prims on this parcel. Only sending back details of first {0}"
+ " - a developer might want to investigate whether this is a hard limit", 32);
notifyCount = 32;
}
// if (notifyCount > 32)
// {
// m_log.InfoFormat(
// "[LAND]: More than {0} avatars own prims on this parcel. Only sending back details of first {0}"
// + " - a developer might want to investigate whether this is a hard limit", 32);
//
// notifyCount = 32;
// }
ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock
= new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount];
@@ -4964,6 +5029,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AddLocalPacketHandler(PacketType.TransferAbort, HandleTransferAbort, false);
AddLocalPacketHandler(PacketType.MuteListRequest, HandleMuteListRequest, false);
AddLocalPacketHandler(PacketType.UseCircuitCode, HandleUseCircuitCode);
AddLocalPacketHandler(PacketType.CreateNewOutfitAttachments, HandleCreateNewOutfitAttachments);
AddLocalPacketHandler(PacketType.AgentHeightWidth, HandleAgentHeightWidth, false);
AddLocalPacketHandler(PacketType.InventoryDescendents, HandleInventoryDescendents);
AddLocalPacketHandler(PacketType.DirPlacesQuery, HandleDirPlacesQuery);
@@ -5063,6 +5129,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
(x.CameraLeftAxis != lastarg.CameraLeftAxis) ||
(x.CameraUpAxis != lastarg.CameraUpAxis) ||
(x.ControlFlags != lastarg.ControlFlags) ||
(x.ControlFlags != 0) ||
(x.Far != lastarg.Far) ||
(x.Flags != lastarg.Flags) ||
(x.State != lastarg.State) ||
@@ -5436,7 +5503,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
args.Channel = ch;
args.From = String.Empty;
args.Message = Utils.BytesToString(msg);
args.Type = ChatTypeEnum.Shout;
args.Type = ChatTypeEnum.Region; //Behaviour in SL is that the response can be heard from any distance
args.Position = new Vector3();
args.Scene = Scene;
args.Sender = this;
@@ -9408,7 +9475,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdateMuteListEntry(this, UpdateMuteListEntry.MuteData.MuteID,
Utils.BytesToString(UpdateMuteListEntry.MuteData.MuteName),
UpdateMuteListEntry.MuteData.MuteType,
UpdateMuteListEntry.AgentData.AgentID);
UpdateMuteListEntry.MuteData.MuteFlags);
return true;
}
return false;
@@ -9423,8 +9490,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
handlerRemoveMuteListEntry(this,
RemoveMuteListEntry.MuteData.MuteID,
Utils.BytesToString(RemoveMuteListEntry.MuteData.MuteName),
RemoveMuteListEntry.AgentData.AgentID);
Utils.BytesToString(RemoveMuteListEntry.MuteData.MuteName));
return true;
}
return false;
@@ -9472,6 +9538,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
return true;
}
private bool HandleCreateNewOutfitAttachments(IClientAPI sender, Packet Pack)
{
CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack;
#region Packet Session and User Check
if (m_checkPackets)
{
if (packet.AgentData.SessionID != SessionId ||
packet.AgentData.AgentID != AgentId)
return true;
}
#endregion
MoveItemsAndLeaveCopy handlerMoveItemsAndLeaveCopy = null;
List<InventoryItemBase> items = new List<InventoryItemBase>();
foreach (CreateNewOutfitAttachmentsPacket.ObjectDataBlock n in packet.ObjectData)
{
InventoryItemBase b = new InventoryItemBase();
b.ID = n.OldItemID;
b.Folder = n.OldFolderID;
items.Add(b);
}
handlerMoveItemsAndLeaveCopy = OnMoveItemsAndLeaveCopy;
if (handlerMoveItemsAndLeaveCopy != null)
{
handlerMoveItemsAndLeaveCopy(this, items, packet.HeaderData.NewFolderID);
}
return true;
}
private bool HandleAgentHeightWidth(IClientAPI sender, Packet Pack)
{
@@ -10470,11 +10567,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
StartLure handlerStartLure = OnStartLure;
if (handlerStartLure != null)
handlerStartLure(startLureRequest.Info.LureType,
Utils.BytesToString(
startLureRequest.Info.Message),
startLureRequest.TargetData[0].TargetID,
this);
{
for (int i = 0 ; i < startLureRequest.TargetData.Length ; i++)
{
handlerStartLure(startLureRequest.Info.LureType,
Utils.BytesToString(
startLureRequest.Info.Message),
startLureRequest.TargetData[i].TargetID,
this);
}
}
return true;
}
private bool HandleTeleportLureRequest(IClientAPI sender, Packet Pack)
@@ -10969,7 +11071,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
// It's a ghost! tell the client to delete it from view.
simClient.SendKillObject(Scene.RegionInfo.RegionHandle,
localId);
new List<uint>() { localId });
}
else
{
@@ -11342,22 +11444,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="Pack">OpenMetaverse.packet</param>
public void ProcessInPacket(Packet packet)
{
if (m_debugPacketLevel > 0)
{
bool outputPacket = true;
if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
outputPacket = false;
if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
outputPacket = false;
if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
outputPacket = false;
if (outputPacket)
m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type);
}
if (m_debugPacketLevel >= 255)
m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type);
if (!ProcessPacketMethod(packet))
m_log.Warn("[CLIENT]: unhandled packet " + packet.Type);
@@ -11599,7 +11687,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID);
//Note, the bool returned from the below function is useless since it is always false.
m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived);
}
/// <summary>

View File

@@ -149,6 +149,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private int m_defaultRTO = 3000;
private int m_maxRTO = 60000;
public bool m_deliverPackets = true;
/// <summary>
/// Default constructor
@@ -415,6 +416,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (category >= 0 && category < m_packetOutboxes.Length)
{
OpenSim.Framework.LocklessQueue<OutgoingPacket> queue = m_packetOutboxes[category];
if (m_deliverPackets == false)
{
queue.Enqueue(packet);
return true;
}
TokenBucket bucket = m_throttleCategories[category];
if (!forceQueue && bucket.RemoveTokens(packet.Buffer.DataLength))
@@ -451,6 +459,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <returns>True if any packets were sent, otherwise false</returns>
public bool DequeueOutgoing()
{
if (m_deliverPackets == false) return false;
OutgoingPacket packet;
OpenSim.Framework.LocklessQueue<OutgoingPacket> queue;
TokenBucket bucket;

View File

@@ -952,7 +952,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_scene.TryGetClient(udpClient.AgentID, out client))
{
client.IsLoggingOut = true;
client.Close();
client.Close(false);
}
}
@@ -964,6 +964,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
while (base.IsRunning)
{
m_scene.ThreadAlive(1);
try
{
IncomingPacket incomingPacket = null;
@@ -1006,6 +1007,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
while (base.IsRunning)
{
m_scene.ThreadAlive(2);
try
{
m_packetSent = false;

View File

@@ -133,7 +133,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
this.parent = parent;
MaxBurst = maxBurst;
DripRate = dripRate;
lastDrip = Environment.TickCount & Int32.MaxValue;
lastDrip = Environment.TickCount;
}
/// <summary>
@@ -143,41 +143,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <returns>True if the requested number of tokens were removed from
/// the bucket, otherwise false</returns>
public bool RemoveTokens(int amount)
{
bool dummy;
return RemoveTokens(amount, out dummy);
}
/// <summary>
/// Remove a given number of tokens from the bucket
/// </summary>
/// <param name="amount">Number of tokens to remove from the bucket</param>
/// <param name="dripSucceeded">True if tokens were added to the bucket
/// during this call, otherwise false</param>
/// <returns>True if the requested number of tokens were removed from
/// the bucket, otherwise false</returns>
public bool RemoveTokens(int amount, out bool dripSucceeded)
{
if (maxBurst == 0)
{
dripSucceeded = true;
return true;
}
dripSucceeded = Drip();
if (content - amount >= 0)
if (amount > maxBurst)
{
if (parent != null && !parent.RemoveTokens(amount))
return false;
content -= amount;
return true;
throw new Exception("amount " + amount + " exceeds maxBurst " + maxBurst);
}
else
Drip();
if (content < amount)
{
return false;
}
if (parent != null && !parent.RemoveTokens(amount))
{
return false;
}
content -= amount;
return true;
}
/// <summary>
@@ -193,25 +183,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
content = maxBurst;
return true;
}
else
int now = Environment.TickCount;
int deltaMS = now - lastDrip;
lastDrip = now;
if (deltaMS <= 0)
{
int now = Environment.TickCount & Int32.MaxValue;
int deltaMS = now - lastDrip;
if (deltaMS <= 0)
{
if (deltaMS < 0)
lastDrip = now;
return false;
}
int dripAmount = deltaMS * tokensPerMS;
content = Math.Min(content + dripAmount, maxBurst);
lastDrip = now;
return true;
return false;
}
long dripAmount = (long)deltaMS * (long)tokensPerMS + (long)content;
if (dripAmount > maxBurst)
{
dripAmount = maxBurst;
}
content = (int)dripAmount;
return true;
}
}
}

View File

@@ -167,6 +167,19 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
{
if (XferUploaders.ContainsKey(transactionID))
{
m_log.DebugFormat("[XFER]: Asked to update item {0} ({1})",
item.Name, item.ID);
// Here we need to get the old asset to extract the
// texture UUIDs if it's a wearable.
if (item.AssetType == (int)AssetType.Bodypart ||
item.AssetType == (int)AssetType.Clothing)
{
AssetBase oldAsset = m_Scene.AssetService.Get(item.AssetID.ToString());
if (oldAsset != null)
XferUploaders[transactionID].SetOldData(oldAsset.Data);
}
AssetBase asset = GetTransactionAsset(transactionID);
if (asset != null)
@@ -181,6 +194,9 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
IInventoryService invService = m_Scene.InventoryService;
invService.UpdateItem(item);
m_log.DebugFormat("[XFER]: Updated item {0} ({1}) with asset {2}",
item.Name, item.ID, asset.FullID);
}
}
}

View File

@@ -28,6 +28,7 @@
using System;
using System.IO;
using System.Reflection;
using System.Collections.Generic;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
@@ -38,6 +39,13 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
{
public class AssetXferUploader
{
// Viewer's notion of the default texture
private List<UUID> defaultIDs = new List<UUID> {
new UUID("5748decc-f629-461c-9a36-a35a221fe21f"),
new UUID("7ca39b4c-bd19-4699-aff7-f93fd03d3e7b"),
new UUID("6522e74d-1660-4e7f-b601-6f48c1659a77"),
new UUID("c228d1cf-4b5d-4ba8-84f4-899a0796aa97")
};
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private AssetBase m_asset;
@@ -55,6 +63,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
private UUID TransactionID = UUID.Zero;
private sbyte type = 0;
private byte wearableType = 0;
private byte[] m_oldData = null;
public ulong XferID;
private Scene m_Scene;
@@ -219,6 +228,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
private void DoCreateItem(uint callbackID)
{
ValidateAssets();
m_Scene.AssetService.Store(m_asset);
InventoryItemBase item = new InventoryItemBase();
@@ -239,12 +249,84 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
item.Flags = (uint) wearableType;
item.CreationDate = Util.UnixTimeSinceEpoch();
m_log.DebugFormat("[XFER]: Created item {0} with asset {1}",
item.ID, item.AssetID);
if (m_Scene.AddInventoryItem(item))
ourClient.SendInventoryItemCreateUpdate(item, callbackID);
else
ourClient.SendAlertMessage("Unable to create inventory item");
}
private void ValidateAssets()
{
if (m_asset.Type == (sbyte)AssetType.Clothing ||
m_asset.Type == (sbyte)AssetType.Bodypart)
{
string content = System.Text.Encoding.ASCII.GetString(m_asset.Data);
string[] lines = content.Split(new char[] {'\n'});
List<string> validated = new List<string>();
Dictionary<int, UUID> allowed = ExtractTexturesFromOldData();
int textures = 0;
foreach (string line in lines)
{
try
{
if (line.StartsWith("textures "))
{
textures = Convert.ToInt32(line.Substring(9));
validated.Add(line);
}
else if (textures > 0)
{
string[] parts = line.Split(new char[] {' '});
UUID tx = new UUID(parts[1]);
int id = Convert.ToInt32(parts[0]);
if (defaultIDs.Contains(tx) || tx == UUID.Zero ||
(allowed.ContainsKey(id) && allowed[id] == tx))
{
validated.Add(parts[0] + " " + tx.ToString());
}
else
{
int perms = m_Scene.InventoryService.GetAssetPermissions(ourClient.AgentId, tx);
int full = (int)(PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Copy);
if ((perms & full) != full)
{
m_log.ErrorFormat("[ASSET UPLOADER]: REJECTED update with texture {0} from {1} because they do not own the texture", tx, ourClient.AgentId);
validated.Add(parts[0] + " " + UUID.Zero.ToString());
}
else
{
validated.Add(line);
}
}
textures--;
}
else
{
validated.Add(line);
}
}
catch
{
// If it's malformed, skip it
}
}
string final = String.Join("\n", validated.ToArray());
m_asset.Data = System.Text.Encoding.ASCII.GetBytes(final);
}
}
/// <summary>
/// Get the asset data uploaded in this transfer.
/// </summary>
@@ -253,10 +335,55 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
{
if (m_finished)
{
ValidateAssets();
return m_asset;
}
return null;
}
public void SetOldData(byte[] d)
{
m_oldData = d;
}
private Dictionary<int,UUID> ExtractTexturesFromOldData()
{
Dictionary<int,UUID> result = new Dictionary<int,UUID>();
if (m_oldData == null)
return result;
string content = System.Text.Encoding.ASCII.GetString(m_oldData);
string[] lines = content.Split(new char[] {'\n'});
int textures = 0;
foreach (string line in lines)
{
try
{
if (line.StartsWith("textures "))
{
textures = Convert.ToInt32(line.Substring(9));
}
else if (textures > 0)
{
string[] parts = line.Split(new char[] {' '});
UUID tx = new UUID(parts[1]);
int id = Convert.ToInt32(parts[0]);
result[id] = tx;
textures--;
}
}
catch
{
// If it's malformed, skip it
}
}
return result;
}
}
}

View File

@@ -271,7 +271,16 @@ namespace Flotsam.RegionModules.AssetCache
// If the file is already cached, don't cache it, just touch it so access time is updated
if (File.Exists(filename))
{
File.SetLastAccessTime(filename, DateTime.Now);
// We don't really want to know about sharing
// violations here. If the file is locked, then
// the other thread has updated the time for us.
try
{
File.SetLastAccessTime(filename, DateTime.Now);
}
catch
{
}
} else {
// Once we start writing, make sure we flag that we're writing

View File

@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Xml;
using log4net;
using Mono.Addins;
using Nini.Config;
@@ -228,15 +229,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
public UUID RezSingleAttachmentFromInventory(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus)
{
m_log.DebugFormat(
"[ATTACHMENTS MODULE]: Rezzing attachment to point {0} from item {1} for {2}",
(AttachmentPoint)AttachmentPt, itemID, remoteClient.Name);
return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true, null);
}
public UUID RezSingleAttachmentFromInventory(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus, XmlDocument doc)
{
// TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
// be removed when that functionality is implemented in opensim
AttachmentPt &= 0x7f;
SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt);
SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt, doc);
if (updateInventoryStatus)
{
@@ -253,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, XmlDocument doc)
{
IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>();
if (invAccess != null)
@@ -291,13 +294,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (tainted)
objatt.HasGroupChanged = true;
if (doc != null)
{
objatt.LoadScriptState(doc);
objatt.ResetOwnerChangeFlag();
}
// Fire after attach, so we don't get messy perms dialogs
// 4 == AttachedRez
objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 4);
objatt.ResumeScripts();
// Do this last so that event listeners have access to all the effects of the attachment
m_scene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
//m_scene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
}
else
{
@@ -334,9 +343,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence))
{
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
item = m_scene.InventoryService.GetItem(item);
if (m_scene.InventoryService != null)
item = m_scene.InventoryService.GetItem(item);
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
if (presence.Appearance != null)
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
}
return att.UUID;
@@ -379,6 +390,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
{
// XXYY!!
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
if (item == null)
m_log.Error("[ATTACHMENT]: item == null");
if (m_scene == null)
m_log.Error("[ATTACHMENT]: m_scene == null");
if (m_scene.InventoryService == null)
m_log.Error("[ATTACHMENT]: m_scene.InventoryService == null");
item = m_scene.InventoryService.GetItem(item);
presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */);
@@ -467,6 +484,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (group.GetFromItemID() == itemID)
{
m_scene.EventManager.TriggerOnAttach(group.LocalId, itemID, UUID.Zero);
// CM / XMREngine!!!! Needed to conclude attach event
//SceneObjectSerializer.ToOriginalXmlFormat(group);
group.DetachToInventoryPrep();
m_log.Debug("[ATTACHMENTS MODULE]: Saving attachpoint: " + ((uint)group.GetAttachmentPoint()).ToString());
@@ -484,22 +503,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
}
public void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos)
{
// First we save the
// attachment point information, then we update the relative
// positioning. Then we have to mark the object as NOT an
// attachment. This is necessary in order to correctly save
// and retrieve GroupPosition information for the attachment.
// Finally, we restore the object's attachment status.
byte attachmentPoint = sog.GetAttachmentPoint();
sog.UpdateGroupPosition(pos);
sog.RootPart.IsAttachment = false;
sog.AbsolutePosition = sog.RootPart.AttachedPos;
sog.SetAttachmentPoint(attachmentPoint);
sog.HasGroupChanged = true;
}
/// <summary>
/// Update the attachment asset for the new sog details if they have changed.
/// </summary>
@@ -603,15 +606,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (!silent)
{
// Killing it here will cause the client to deselect it
// It then reappears on the avatar, deselected
// through the full update below
//
if (so.IsSelected)
{
m_scene.SendKillObject(so.RootPart.LocalId);
}
so.IsSelected = false; // fudge....
so.ScheduleGroupForFullUpdate();
}

View File

@@ -49,7 +49,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
private int m_shoutdistance = 100;
private int m_whisperdistance = 10;
private List<Scene> m_scenes = new List<Scene>();
private List<string> FreezeCache = new List<string>();
private string m_adminPrefix = "";
internal object m_syncy = new object();
internal IConfig m_config;
@@ -76,6 +77,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance);
m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance);
m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance);
m_adminPrefix = config.Configs["Chat"].GetString("admin_prefix", "");
}
public virtual void AddRegion(Scene scene)
@@ -171,7 +173,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
return;
}
DeliverChatToAvatars(ChatSourceType.Agent, c);
if (FreezeCache.Contains(c.Sender.AgentId.ToString()))
{
if (c.Type != ChatTypeEnum.StartTyping || c.Type != ChatTypeEnum.StopTyping)
c.Sender.SendAgentAlertMessage("You may not talk as you are frozen.", false);
}
else
{
DeliverChatToAvatars(ChatSourceType.Agent, c);
}
}
public virtual void OnChatFromWorld(Object sender, OSChatMessage c)
@@ -185,6 +195,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
protected virtual void DeliverChatToAvatars(ChatSourceType sourceType, OSChatMessage c)
{
string fromName = c.From;
string fromNamePrefix = "";
UUID fromID = UUID.Zero;
string message = c.Message;
IScene scene = c.Scene;
@@ -207,7 +218,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
fromPos = avatar.AbsolutePosition;
fromName = avatar.Name;
fromID = c.Sender.AgentId;
if (avatar.GodLevel >= 200)
{
fromNamePrefix = m_adminPrefix;
}
break;
case ChatSourceType.Object:
@@ -231,8 +245,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
s.ForEachScenePresence(
delegate(ScenePresence presence)
{
if (TrySendChatMessage(presence, fromPos, regionPos, fromID, fromName, c.Type, message, sourceType))
receiverIDs.Add(presence.UUID);
ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
if (Presencecheck != null)
{
// This will pass all chat from objects. Not
// perfect, but it will do. For now. Better
// than the prior behavior of muting all
// objects on a parcel with access restrictions
if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true)
{
if (TrySendChatMessage(presence, fromPos, regionPos, fromID, fromNamePrefix + fromName, c.Type, message, sourceType))
receiverIDs.Add(presence.UUID);
}
}
}
);
}
@@ -276,31 +302,34 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
}
// m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType);
HashSet<UUID> receiverIDs = new HashSet<UUID>();
((Scene)c.Scene).ForEachScenePresence(
delegate(ScenePresence presence)
{
// ignore chat from child agents
if (presence.IsChildAgent) return;
IClientAPI client = presence.ControllingClient;
// don't forward SayOwner chat from objects to
// non-owner agents
if ((c.Type == ChatTypeEnum.Owner) &&
(null != c.SenderObject) &&
(((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
return;
client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID,
(byte)sourceType, (byte)ChatAudibleLevel.Fully);
receiverIDs.Add(presence.UUID);
});
(c.Scene as Scene).EventManager.TriggerOnChatToClients(
fromID, receiverIDs, c.Message, cType, CenterOfRegion, fromName, sourceType, ChatAudibleLevel.Fully);
if (c.Scene != null)
{
((Scene)c.Scene).ForEachScenePresence
(
delegate(ScenePresence presence)
{
// ignore chat from child agents
if (presence.IsChildAgent) return;
IClientAPI client = presence.ControllingClient;
// don't forward SayOwner chat from objects to
// non-owner agents
if ((c.Type == ChatTypeEnum.Owner) &&
(null != c.SenderObject) &&
(((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
return;
client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID,
(byte)sourceType, (byte)ChatAudibleLevel.Fully);
receiverIDs.Add(presence.UUID);
}
);
(c.Scene as Scene).EventManager.TriggerOnChatToClients(
fromID, receiverIDs, c.Message, cType, CenterOfRegion, fromName, sourceType, ChatAudibleLevel.Fully);
}
}
/// <summary>
@@ -343,5 +372,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
return true;
}
Dictionary<UUID, System.Threading.Timer> Timers = new Dictionary<UUID, System.Threading.Timer>();
public void ParcelFreezeUser(IClientAPI client, UUID parcelowner, uint flags, UUID target)
{
System.Threading.Timer Timer;
if (flags == 0)
{
FreezeCache.Add(target.ToString());
System.Threading.TimerCallback timeCB = new System.Threading.TimerCallback(OnEndParcelFrozen);
Timer = new System.Threading.Timer(timeCB, target, 30000, 0);
Timers.Add(target, Timer);
}
else
{
FreezeCache.Remove(target.ToString());
Timers.TryGetValue(target, out Timer);
Timers.Remove(target);
Timer.Dispose();
}
}
private void OnEndParcelFrozen(object avatar)
{
UUID target = (UUID)avatar;
FreezeCache.Remove(target.ToString());
System.Threading.Timer Timer;
Timers.TryGetValue(target, out Timer);
Timers.Remove(target);
Timer.Dispose();
}
}
}

View File

@@ -239,4 +239,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
return result;
}
}
}
}

View File

@@ -273,7 +273,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
// Inform the friends that this user is online
StatusChange(agentID, true);
// Register that we need to send the list of online friends to this user
lock (m_NeedsListOfFriends)
m_NeedsListOfFriends.Add(agentID);
@@ -516,6 +516,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
FriendsService.StoreFriend(agentID, friendID.ToString(), 1);
FriendsService.StoreFriend(friendID, agentID.ToString(), 1);
ICallingCardModule ccm = client.Scene.RequestModuleInterface<ICallingCardModule>();
if (ccm != null)
{
ccm.CreateCallingCard(agentID, friendID, UUID.Zero);
}
// Update the local cache
UpdateFriendsCache(agentID);
@@ -679,6 +685,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
(byte)OpenMetaverse.InstantMessageDialog.FriendshipAccepted, userID.ToString(), false, Vector3.Zero);
friendClient.SendInstantMessage(im);
ICallingCardModule ccm = friendClient.Scene.RequestModuleInterface<ICallingCardModule>();
if (ccm != null)
{
ccm.CreateCallingCard(friendID, userID, UUID.Zero);
}
// Update the local cache
UpdateFriendsCache(friendID);
@@ -701,7 +714,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
// we're done
return true;
}
return false;
}

View File

@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
item = invService.GetItem(item);
if (item != null)
{
item.Flags = 1;
item.Flags |= 1;
invService.UpdateItem(item);
}
else
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
item = invService.GetItem(item);
if (item != null)
{
item.Flags = 0;
item.Flags &= ~1;
invService.UpdateItem(item);
}
else
@@ -93,4 +93,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
"[GESTURES]: Unable to find gesture to deactivate {0} for {1}", gestureId, client.Name);
}
}
}
}

View File

@@ -31,16 +31,40 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces;
using System;
using System.Reflection;
using System.Collections;
using System.Collections.Specialized;
using System.Reflection;
using System.IO;
using System.Web;
using System.Xml;
using log4net;
using Mono.Addins;
using OpenMetaverse.Messages.Linden;
using OpenMetaverse.StructuredData;
using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using Caps = OpenSim.Framework.Capabilities.Caps;
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
namespace OpenSim.Region.CoreModules.Avatar.Gods
{
public class GodsModule : IRegionModule, IGodsModule
{
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>Special UUID for actions that apply to all agents</summary>
private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb");
protected Scene m_scene;
protected IDialogModule m_dialogModule;
protected Dictionary<UUID, string> m_capsDict =
new Dictionary<UUID, string>();
public void Initialise(Scene scene, IConfigSource source)
{
@@ -48,6 +72,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
m_scene.RegisterModuleInterface<IGodsModule>(this);
m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
m_scene.EventManager.OnRegisterCaps += OnRegisterCaps;
m_scene.EventManager.OnClientClosed += OnClientClosed;
scene.EventManager.OnIncomingInstantMessage +=
OnIncomingInstantMessage;
}
public void PostInitialise() {}
@@ -67,6 +95,54 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
client.OnRequestGodlikePowers -= RequestGodlikePowers;
}
private void OnClientClosed(UUID agentID, Scene scene)
{
m_capsDict.Remove(agentID);
}
private void OnRegisterCaps(UUID agentID, Caps caps)
{
string uri = "/CAPS/" + UUID.Random();
m_capsDict[agentID] = uri;
caps.RegisterHandler("UntrustedSimulatorMessage",
new RestStreamHandler("POST", uri,
HandleUntrustedSimulatorMessage));
}
private string HandleUntrustedSimulatorMessage(string request,
string path, string param, OSHttpRequest httpRequest,
OSHttpResponse httpResponse)
{
OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
string message = osd["message"].AsString();
if (message == "GodKickUser")
{
OSDMap body = (OSDMap)osd["body"];
OSDArray userInfo = (OSDArray)body["UserInfo"];
OSDMap userData = (OSDMap)userInfo[0];
UUID agentID = userData["AgentID"].AsUUID();
UUID godID = userData["GodID"].AsUUID();
UUID godSessionID = userData["GodSessionID"].AsUUID();
uint kickFlags = userData["KickFlags"].AsUInteger();
string reason = userData["Reason"].AsString();
ScenePresence god = m_scene.GetScenePresence(godID);
if (god == null || god.ControllingClient.SessionId != godSessionID)
return String.Empty;
KickUser(godID, godSessionID, agentID, kickFlags, Util.StringToBytes1024(reason));
}
else
{
m_log.ErrorFormat("[GOD]: Unhandled UntrustedSimulatorMessage: {0}", message);
}
return String.Empty;
}
public void RequestGodlikePowers(
UUID agentID, UUID sessionID, UUID token, bool godLike, IClientAPI controllingClient)
{
@@ -115,71 +191,85 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
/// <param name="reason">The message to send to the user after it's been turned into a field</param>
public void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason)
{
UUID kickUserID = ALL_AGENTS;
if (!m_scene.Permissions.IsGod(godID))
return;
ScenePresence sp = m_scene.GetScenePresence(agentID);
if (sp != null || agentID == kickUserID)
if (sp == null && agentID != ALL_AGENTS)
{
if (m_scene.Permissions.IsGod(godID))
IMessageTransferModule transferModule =
m_scene.RequestModuleInterface<IMessageTransferModule>();
if (transferModule != null)
{
if (kickflags == 0)
{
if (agentID == kickUserID)
{
string reasonStr = Utils.BytesToString(reason);
m_scene.ForEachClient(
delegate(IClientAPI controller)
{
if (controller.AgentId != godID)
controller.Kick(reasonStr);
}
);
// This is a bit crude. It seems the client will be null before it actually stops the thread
// The thread will kill itself eventually :/
// Is there another way to make sure *all* clients get this 'inter region' message?
m_scene.ForEachScenePresence(
delegate(ScenePresence p)
{
if (p.UUID != godID && !p.IsChildAgent)
{
// Possibly this should really be p.Close() though that method doesn't send a close
// to the client
p.ControllingClient.Close();
}
}
);
}
else
{
m_scene.SceneGraph.removeUserCount(!sp.IsChildAgent);
sp.ControllingClient.Kick(Utils.BytesToString(reason));
sp.ControllingClient.Close();
}
}
if (kickflags == 1)
{
sp.AllowMovement = false;
m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
m_dialogModule.SendAlertToUser(godID, "User Frozen");
}
if (kickflags == 2)
{
sp.AllowMovement = true;
m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
m_dialogModule.SendAlertToUser(godID, "User Unfrozen");
}
m_log.DebugFormat("[GODS]: Sending nonlocal kill for agent {0}", agentID);
transferModule.SendInstantMessage(new GridInstantMessage(
m_scene, godID, "God", agentID, (byte)250, false,
Utils.BytesToString(reason), UUID.Zero, true,
new Vector3(), new byte[] {(byte)kickflags}),
delegate(bool success) {} );
}
else
return;
}
switch (kickflags)
{
case 0:
if (sp != null)
{
m_dialogModule.SendAlertToUser(godID, "Kick request denied");
KickPresence(sp, Utils.BytesToString(reason));
}
else if (agentID == ALL_AGENTS)
{
m_scene.ForEachScenePresence(
delegate(ScenePresence p)
{
if (p.UUID != godID && (!m_scene.Permissions.IsGod(p.UUID)))
KickPresence(p, Utils.BytesToString(reason));
}
);
}
break;
case 1:
if (sp != null)
{
sp.AllowMovement = false;
m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
m_dialogModule.SendAlertToUser(godID, "User Frozen");
}
break;
case 2:
if (sp != null)
{
sp.AllowMovement = true;
m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
m_dialogModule.SendAlertToUser(godID, "User Unfrozen");
}
break;
default:
break;
}
}
private void KickPresence(ScenePresence sp, string reason)
{
if (sp.IsChildAgent)
return;
sp.ControllingClient.Kick(reason);
sp.Scene.IncomingCloseAgent(sp.UUID);
}
private void OnIncomingInstantMessage(GridInstantMessage msg)
{
if (msg.dialog == (uint)250) // Nonlocal kick
{
UUID agentID = new UUID(msg.toAgentID);
string reason = msg.message;
UUID godID = new UUID(msg.fromAgentID);
uint kickMode = (uint)msg.binaryBucket[0];
KickUser(godID, UUID.Zero, agentID, kickMode, Util.StringToBytes1024(reason));
}
}
}
}
}

View File

@@ -156,6 +156,32 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
return;
}
//DateTime dt = DateTime.UtcNow;
// Ticks from UtcNow, but make it look like local. Evil, huh?
//dt = DateTime.SpecifyKind(dt, DateTimeKind.Local);
//try
//{
// // Convert that to the PST timezone
// TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("America/Los_Angeles");
// dt = TimeZoneInfo.ConvertTime(dt, timeZoneInfo);
//}
//catch
//{
// //m_log.Info("[OFFLINE MESSAGING]: No PST timezone found on this machine. Saving with local timestamp.");
//}
//// And make it look local again to fool the unix time util
//dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc);
// If client is null, this message comes from storage and IS offline
if (client != null)
im.offline = 0;
if (im.offline == 0)
im.timestamp = (uint)Util.UnixTimeSinceEpoch();
if (m_TransferModule != null)
{
if (client != null)

View File

@@ -47,6 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private bool m_Enabled = false;
protected string m_MessageKey = String.Empty;
protected List<Scene> m_Scenes = new List<Scene>();
protected Dictionary<UUID, UUID> m_UserRegionMap = new Dictionary<UUID, UUID>();
@@ -66,14 +67,17 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
public virtual void Initialise(IConfigSource config)
{
IConfig cnf = config.Configs["Messaging"];
if (cnf != null && cnf.GetString(
"MessageTransferModule", "MessageTransferModule") !=
"MessageTransferModule")
if (cnf != null)
{
m_log.Debug("[MESSAGE TRANSFER]: Disabled by configuration");
return;
}
if (cnf.GetString("MessageTransferModule",
"MessageTransferModule") != "MessageTransferModule")
{
return;
}
m_MessageKey = cnf.GetString("MessageKey", String.Empty);
}
m_log.Debug("[MESSAGE TRANSFER]: Module enabled");
m_Enabled = true;
}
@@ -145,8 +149,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
ScenePresence user = (ScenePresence) scene.Entities[toAgentID];
if (!user.IsChildAgent)
{
// Local message
m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID);
// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering to client");
user.ControllingClient.SendInstantMessage(im);
// Message sent
@@ -168,7 +171,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
// Local message
ScenePresence user = (ScenePresence) scene.Entities[toAgentID];
m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", user.Name, toAgentID);
// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering to client");
user.ControllingClient.SendInstantMessage(im);
// Message sent
@@ -251,6 +254,19 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
&& requestData.ContainsKey("position_z") && requestData.ContainsKey("region_id")
&& requestData.ContainsKey("binary_bucket"))
{
if (m_MessageKey != String.Empty)
{
XmlRpcResponse error_resp = new XmlRpcResponse();
Hashtable error_respdata = new Hashtable();
error_respdata["success"] = "FALSE";
error_resp.Value = error_respdata;
if (!requestData.Contains("message_key"))
return error_resp;
if (m_MessageKey != (string)requestData["message_key"])
return error_resp;
}
// Do the easy way of validating the UUIDs
UUID.TryParse((string)requestData["from_agent_id"], out fromAgentID);
UUID.TryParse((string)requestData["to_agent_id"], out toAgentID);
@@ -533,7 +549,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
if (upd != null)
{
GridRegion reginfo = m_Scenes[0].GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID,
GridRegion reginfo = m_Scenes[0].GridService.GetRegionByUUID(UUID.Zero,
upd.RegionID);
if (reginfo != null)
{
@@ -682,6 +698,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
gim["position_z"] = msg.Position.Z.ToString();
gim["region_id"] = msg.RegionID.ToString();
gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket,Base64FormattingOptions.None);
if (m_MessageKey != String.Empty)
gim["message_key"] = m_MessageKey;
return gim;
}

View File

@@ -172,13 +172,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void RetrieveInstantMessages(IClientAPI client)
{
if (m_RestURL != "")
{
m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId);
if (m_RestURL == String.Empty)
return;
List<GridInstantMessage> msglist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridInstantMessage>>(
m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId);
List<GridInstantMessage> msglist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridInstantMessage>>(
"POST", m_RestURL + "/RetrieveMessages/", client.AgentId);
if (msglist != null)
{
foreach (GridInstantMessage im in msglist)
{
// client.SendInstantMessage(im);
@@ -189,6 +192,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
// Needed for proper state management for stored group
// invitations
//
im.offline = 1;
Scene s = FindScene(client.AgentId);
if (s != null)
s.EventManager.TriggerIncomingInstantMessage(im);
@@ -198,26 +204,38 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void UndeliveredMessage(GridInstantMessage im)
{
if ((im.offline != 0)
&& (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages)))
if (im.dialog != (byte)InstantMessageDialog.MessageFromObject &&
im.dialog != (byte)InstantMessageDialog.MessageFromAgent &&
im.dialog != (byte)InstantMessageDialog.GroupNotice &&
im.dialog != (byte)InstantMessageDialog.GroupInvitation &&
im.dialog != (byte)InstantMessageDialog.InventoryOffered)
{
bool success = SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>(
"POST", m_RestURL+"/SaveMessage/", im);
return;
}
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
{
IClientAPI client = FindClient(new UUID(im.fromAgentID));
if (client == null)
return;
// It's not delivered. Make sure the scope id is saved
// We don't need the imSessionID here anymore, overwrite it
Scene scene = FindScene(new UUID(im.fromAgentID));
if (scene == null)
scene = m_SceneList[0];
client.SendInstantMessage(new GridInstantMessage(
null, new UUID(im.toAgentID),
"System", new UUID(im.fromAgentID),
(byte)InstantMessageDialog.MessageFromAgent,
"User is not logged in. "+
(success ? "Message saved." : "Message not saved"),
false, new Vector3()));
}
bool success = SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>(
"POST", m_RestURL+"/SaveMessage/?scope=" +
scene.RegionInfo.ScopeID.ToString(), im);
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
{
IClientAPI client = FindClient(new UUID(im.fromAgentID));
if (client == null)
return;
client.SendInstantMessage(new GridInstantMessage(
null, new UUID(im.toAgentID),
"System", new UUID(im.fromAgentID),
(byte)InstantMessageDialog.MessageFromAgent,
"User is not logged in. "+
(success ? "Message saved." : "Message not saved"),
false, new Vector3()));
}
}
}

View File

@@ -139,9 +139,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
protected void SaveInvItem(InventoryItemBase inventoryItem, string path, Dictionary<string, object> options, IUserAccountService userAccountService)
{
if (options.ContainsKey("verbose"))
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving item {0} with asset {1}", inventoryItem.ID, inventoryItem.AssetID);
string filename = path + CreateArchiveItemName(inventoryItem);
// Record the creator of this item for user record purposes (which might go away soon)
@@ -165,9 +162,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
InventoryFolderBase inventoryFolder, string path, bool saveThisFolderItself,
Dictionary<string, object> options, IUserAccountService userAccountService)
{
if (options.ContainsKey("verbose"))
m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving folder {0}", inventoryFolder.Name);
if (saveThisFolderItself)
{
path += CreateArchiveFolderName(inventoryFolder);

View File

@@ -122,13 +122,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
scene.AddCommand(
this, "save iar",
"save iar [--p|-profile=<url>] <first> <last> <inventory path> <password> [<IAR path>] [--v|-verbose]",
"save iar [--p|-profile=<url>] <first> <last> <inventory path> <password> [<IAR path>]",
"Save user inventory archive (IAR).",
"<first> is the user's first name." + Environment.NewLine
+ "<last> is the user's last name." + Environment.NewLine
+ "<inventory path> is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine
+ "-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine
+ "-v|--verbose extra debug messages." + Environment.NewLine
+ "<IAR path> is the filesystem path at which to save the IAR."
+ string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME),
HandleSaveInvConsoleCommand);
@@ -395,7 +394,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
OptionSet ops = new OptionSet();
//ops.Add("v|version=", delegate(string v) { options["version"] = v; });
ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; });
List<string> mainParams = ops.Parse(cmdparams);

View File

@@ -175,8 +175,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
if (im.binaryBucket.Length < 17) // Invalid
return;
UUID receipientID = new UUID(im.toAgentID);
ScenePresence user = scene.GetScenePresence(receipientID);
UUID recipientID = new UUID(im.toAgentID);
ScenePresence user = scene.GetScenePresence(recipientID);
UUID copyID;
// First byte is the asset type
@@ -191,7 +191,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
folderID, new UUID(im.toAgentID));
InventoryFolderBase folderCopy
= scene.GiveInventoryFolder(receipientID, client.AgentId, folderID, UUID.Zero);
= scene.GiveInventoryFolder(recipientID, client.AgentId, folderID, UUID.Zero);
if (folderCopy == null)
{
@@ -248,6 +248,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
im.imSessionID = itemID.Guid;
}
im.offline = 1; // Remember these
// Send the IM to the recipient. The item is already
// in their inventory, so it will not be lost if
// they are offline.
@@ -417,22 +419,67 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
///
/// </summary>
/// <param name="msg"></param>
private void OnGridInstantMessage(GridInstantMessage msg)
private void OnGridInstantMessage(GridInstantMessage im)
{
// Check if this is ours to handle
//
Scene scene = FindClientScene(new UUID(msg.toAgentID));
Scene scene = FindClientScene(new UUID(im.toAgentID));
if (scene == null)
return;
// Find agent to deliver to
//
ScenePresence user = scene.GetScenePresence(new UUID(msg.toAgentID));
ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID));
if (user == null)
return;
// Just forward to local handling
OnInstantMessage(user.ControllingClient, msg);
// This requires a little bit of processing because we have to make the
// new item visible in the recipient's inventory here
//
if (im.dialog == (byte) InstantMessageDialog.InventoryOffered)
{
if (im.binaryBucket.Length < 17) // Invalid
return;
UUID recipientID = new UUID(im.toAgentID);
// First byte is the asset type
AssetType assetType = (AssetType)im.binaryBucket[0];
if (AssetType.Folder == assetType)
{
UUID folderID = new UUID(im.binaryBucket, 1);
InventoryFolderBase given =
new InventoryFolderBase(folderID, recipientID);
InventoryFolderBase folder =
scene.InventoryService.GetFolder(given);
if (folder != null)
user.ControllingClient.SendBulkUpdateInventory(folder);
}
else
{
UUID itemID = new UUID(im.binaryBucket, 1);
InventoryItemBase given =
new InventoryItemBase(itemID, recipientID);
InventoryItemBase item =
scene.InventoryService.GetItem(given);
if (item != null)
{
user.ControllingClient.SendBulkUpdateInventory(item);
}
}
user.ControllingClient.SendInstantMessage(im);
}
else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted ||
im.dialog == (byte) InstantMessageDialog.InventoryDeclined)
{
user.ControllingClient.SendInstantMessage(im);
}
}
}
}

View File

@@ -148,14 +148,27 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
(uint)presence.AbsolutePosition.Y,
(uint)presence.AbsolutePosition.Z);
m_log.DebugFormat("TP invite with message {0}", message);
m_log.DebugFormat("[LURE]: TP invite with message {0}", message);
GridInstantMessage m;
if (scene.Permissions.IsAdministrator(client.AgentId) && presence.GodLevel >= 200 && (!scene.Permissions.IsAdministrator(targetid)))
{
m = new GridInstantMessage(scene, client.AgentId,
client.FirstName+" "+client.LastName, targetid,
(byte)InstantMessageDialog.GodLikeRequestTeleport, false,
message, dest, false, presence.AbsolutePosition,
new Byte[0]);
}
else
{
m = new GridInstantMessage(scene, client.AgentId,
client.FirstName+" "+client.LastName, targetid,
(byte)InstantMessageDialog.RequestTeleport, false,
message, dest, false, presence.AbsolutePosition,
new Byte[0]);
}
GridInstantMessage m = new GridInstantMessage(scene, client.AgentId,
client.FirstName+" "+client.LastName, targetid,
(byte)InstantMessageDialog.RequestTeleport, false,
message, dest, false, presence.AbsolutePosition,
new Byte[0]);
if (m_TransferModule != null)
{
m_TransferModule.SendInstantMessage(m,
@@ -190,7 +203,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
{
// Forward remote teleport requests
//
if (msg.dialog != 22)
if (msg.dialog != (byte)InstantMessageDialog.RequestTeleport &&
msg.dialog != (byte)InstantMessageDialog.GodLikeRequestTeleport)
return;
if (m_TransferModule != null)

View File

@@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
protected virtual void OnNewClient(IClientAPI client)
{
client.OnTeleportHomeRequest += TeleportHome;
client.OnTeleportHomeRequest += TeleportHomeFired;
}
public virtual void Close()
@@ -268,7 +268,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// This may be a costly operation. The reg.ExternalEndPoint field is not a passive field,
// it's actually doing a lot of work.
IPEndPoint endPoint = finalDestination.ExternalEndPoint;
if (endPoint.Address != null)
if (endPoint != null && endPoint.Address != null)
{
// Fixing a bug where teleporting while sitting results in the avatar ending up removed from
// both regions
@@ -505,7 +505,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
protected void KillEntity(Scene scene, uint localID)
{
scene.SendKillObject(localID);
scene.SendKillObject(new List<uint>() { localID });
}
protected virtual GridRegion GetFinalDestination(GridRegion region)
@@ -543,7 +543,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
#region Teleport Home
public virtual void TeleportHome(UUID id, IClientAPI client)
public void TeleportHomeFired(UUID id, IClientAPI client)
{
TeleportHome(id, client);
}
public virtual bool TeleportHome(UUID id, IClientAPI client)
{
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName);
@@ -552,12 +557,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
if (uinfo != null)
{
if (uinfo.HomeRegionID == UUID.Zero)
{
// can't find the Home region: Tell viewer and abort
client.SendTeleportFailed("You don't have a home position set.");
return false;
}
GridRegion regionInfo = m_aScene.GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID);
if (regionInfo == null)
{
// can't find the Home region: Tell viewer and abort
client.SendTeleportFailed("Your home region could not be found.");
return;
return false;
}
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})",
@@ -568,6 +579,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt,
(uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome));
}
else
{
// can't find the Home region: Tell viewer and abort
client.SendTeleportFailed("Your home region could not be found.");
return false;
}
return true;
}
#endregion
@@ -852,15 +870,19 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID);
IEventQueue eq = agent.Scene.RequestModuleInterface<IEventQueue>();
if (eq != null)
IPEndPoint neighbourExternal = neighbourRegion.ExternalEndPoint;
if (neighbourExternal != null)
{
eq.CrossRegion(neighbourHandle, pos, agent.Velocity, neighbourRegion.ExternalEndPoint,
capsPath, agent.UUID, agent.ControllingClient.SessionId);
}
else
{
agent.ControllingClient.CrossRegion(neighbourHandle, pos, agent.Velocity, neighbourRegion.ExternalEndPoint,
capsPath);
if (eq != null)
{
eq.CrossRegion(neighbourHandle, pos, agent.Velocity, neighbourExternal,
capsPath, agent.UUID, agent.ControllingClient.SessionId);
}
else
{
agent.ControllingClient.CrossRegion(neighbourHandle, pos, agent.Velocity, neighbourExternal,
capsPath);
}
}
if (!WaitForCallback(agent.UUID))
@@ -964,10 +986,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.Id0 = currentAgentCircuit.Id0;
}
InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
d.BeginInvoke(sp, agent, region, region.ExternalEndPoint, true,
IPEndPoint external = region.ExternalEndPoint;
if (external != null)
{
InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
d.BeginInvoke(sp, agent, region, external, true,
InformClientOfNeighbourCompleted,
d);
}
}
#endregion
@@ -1100,6 +1126,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
try
{
//neighbour.ExternalEndPoint may return null, which will be caught
d.BeginInvoke(sp, cagents[count], neighbour, neighbour.ExternalEndPoint, newAgent,
InformClientOfNeighbourCompleted,
d);
@@ -1203,8 +1230,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_log.Debug("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString());
}
if (!regionAccepted)
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Region {0} did not accept agent: {1}", reg.RegionName, reason);
}
/// <summary>

View File

@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
protected override void OnNewClient(IClientAPI client)
{
client.OnTeleportHomeRequest += TeleportHome;
client.OnTeleportHomeRequest += TeleportHomeFired;
client.OnConnectionClosed += new Action<IClientAPI>(OnConnectionClosed);
}
@@ -177,7 +177,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason);
}
public override void TeleportHome(UUID id, IClientAPI client)
public void TeleportHomeFired(UUID id, IClientAPI client)
{
TeleportHome(id, client);
}
public override bool TeleportHome(UUID id, IClientAPI client)
{
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName);
@@ -187,8 +192,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
{
// local grid user
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: User is local");
base.TeleportHome(id, client);
return;
return base.TeleportHome(id, client);
}
// Foreign user wants to go home
@@ -198,7 +202,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
{
client.SendTeleportFailed("Your information has been lost");
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Unable to locate agent's gateway information");
return;
return false;
}
IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString());
@@ -208,7 +212,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
{
client.SendTeleportFailed("Your home region could not be found");
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent's home region not found");
return;
return false;
}
ScenePresence sp = ((Scene)(client.Scene)).GetScenePresence(client.AgentId);
@@ -216,7 +220,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
{
client.SendTeleportFailed("Internal error");
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent not found in the scene where it is supposed to be");
return;
return false;
}
IEventQueue eq = sp.Scene.RequestModuleInterface<IEventQueue>();
@@ -226,6 +230,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ExternalHostName, homeGatekeeper.HttpPort, homeGatekeeper.RegionName);
DoTeleport(sp, homeGatekeeper, finalDestination, position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome), eq);
return true;
}
#endregion

View File

@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Net;
using System.Xml;
using System.Reflection;
using System.Threading;
@@ -202,11 +203,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
List<SceneObjectGroup> objectGroups, IClientAPI remoteClient)
{
// HACK: This is only working for lists containing a single item!
// It's just a hack to make this WIP compile and run. Nothing
// currently calls this with multiple items.
UUID ret = UUID.Zero;
// The following code groups the SOG's by owner. No objects
// belonging to different people can be coalesced, for obvious
// reasons.
Dictionary<UUID, List<SceneObjectGroup>> deletes =
new Dictionary<UUID, List<SceneObjectGroup>>();
@@ -218,262 +219,337 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
deletes[g.OwnerID].Add(g);
}
foreach (List<SceneObjectGroup> objlist in deletes.Values)
{
foreach (SceneObjectGroup g in objlist)
ret = DeleteToInventory(action, folderID, g, remoteClient);
}
return ret;
}
private UUID DeleteToInventory(DeRezAction action, UUID folderID,
SceneObjectGroup objectGroup, IClientAPI remoteClient)
{
// This is pethod scoped and will be returned. It will be the
// last created asset id
UUID assetID = UUID.Zero;
Vector3 inventoryStoredPosition = new Vector3
(((objectGroup.AbsolutePosition.X > (int)Constants.RegionSize)
? 250
: objectGroup.AbsolutePosition.X)
,
(objectGroup.AbsolutePosition.X > (int)Constants.RegionSize)
? 250
: objectGroup.AbsolutePosition.X,
objectGroup.AbsolutePosition.Z);
Vector3 originalPosition = objectGroup.AbsolutePosition;
objectGroup.AbsolutePosition = inventoryStoredPosition;
string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(objectGroup);
objectGroup.AbsolutePosition = originalPosition;
// Get the user info of the item destination
//
UUID userID = UUID.Zero;
if (action == DeRezAction.Take || action == DeRezAction.TakeCopy ||
action == DeRezAction.SaveToExistingUserInventoryItem)
// Each iteration is really a separate asset being created,
// with distinct destinations as well.
foreach (List<SceneObjectGroup> objlist in deletes.Values)
{
// Take or take copy require a taker
// Saving changes requires a local user
//
if (remoteClient == null)
return UUID.Zero;
Dictionary<UUID, string> xmlStrings =
new Dictionary<UUID, string>();
userID = remoteClient.AgentId;
}
else
{
// All returns / deletes go to the object owner
//
userID = objectGroup.RootPart.OwnerID;
}
if (userID == UUID.Zero) // Can't proceed
{
return UUID.Zero;
}
// If we're returning someone's item, it goes back to the
// owner's Lost And Found folder.
// Delete is treated like return in this case
// Deleting your own items makes them go to trash
//
InventoryFolderBase folder = null;
InventoryItemBase item = null;
if (DeRezAction.SaveToExistingUserInventoryItem == action)
{
item = new InventoryItemBase(objectGroup.RootPart.FromUserInventoryItemID, userID);
item = m_Scene.InventoryService.GetItem(item);
//item = userInfo.RootFolder.FindItem(
// objectGroup.RootPart.FromUserInventoryItemID);
if (null == item)
foreach (SceneObjectGroup objectGroup in objlist)
{
m_log.DebugFormat(
"[AGENT INVENTORY]: Object {0} {1} scheduled for save to inventory has already been deleted.",
objectGroup.Name, objectGroup.UUID);
return UUID.Zero;
}
}
else
{
// Folder magic
//
if (action == DeRezAction.Delete)
{
// Deleting someone else's item
//
if (remoteClient == null ||
objectGroup.OwnerID != remoteClient.AgentId)
{
Vector3 inventoryStoredPosition = new Vector3
(((objectGroup.AbsolutePosition.X > (int)Constants.RegionSize)
? 250
: objectGroup.AbsolutePosition.X)
,
(objectGroup.AbsolutePosition.X > (int)Constants.RegionSize)
? 250
: objectGroup.AbsolutePosition.X,
objectGroup.AbsolutePosition.Z);
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
}
else
{
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
}
}
else if (action == DeRezAction.Return)
{
Vector3 originalPosition = objectGroup.AbsolutePosition;
// Dump to lost + found unconditionally
//
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
}
// Restore attachment data after trip through the sim
if (objectGroup.RootPart.AttachPoint > 0)
inventoryStoredPosition = objectGroup.RootPart.AttachOffset;
objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint;
if (folderID == UUID.Zero && folder == null)
{
if (action == DeRezAction.Delete)
{
// Deletes go to trash by default
//
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
}
else
{
if (remoteClient == null ||
objectGroup.OwnerID != remoteClient.AgentId)
{
// Taking copy of another person's item. Take to
// Objects folder.
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.Object);
}
else
{
// Catch all. Use lost & found
//
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
}
}
}
// Override and put into where it came from, if it came
// from anywhere in inventory
//
if (action == DeRezAction.Take || action == DeRezAction.TakeCopy)
{
if (objectGroup.RootPart.FromFolderID != UUID.Zero)
{
InventoryFolderBase f = new InventoryFolderBase(objectGroup.RootPart.FromFolderID, userID);
folder = m_Scene.InventoryService.GetFolder(f);
}
}
if (folder == null) // None of the above
{
folder = new InventoryFolderBase(folderID);
if (folder == null) // Nowhere to put it
{
return UUID.Zero;
}
}
item = new InventoryItemBase();
item.CreatorId = objectGroup.RootPart.CreatorID.ToString();
item.CreatorData = objectGroup.RootPart.CreatorData;
item.ID = UUID.Random();
item.InvType = (int)InventoryType.Object;
item.Folder = folder.ID;
item.Owner = userID;
}
AssetBase asset = CreateAsset(
objectGroup.GetPartName(objectGroup.RootPart.LocalId),
objectGroup.GetPartDescription(objectGroup.RootPart.LocalId),
(sbyte)AssetType.Object,
Utils.StringToBytes(sceneObjectXml),
objectGroup.OwnerID.ToString());
m_Scene.AssetService.Store(asset);
assetID = asset.FullID;
if (DeRezAction.SaveToExistingUserInventoryItem == action)
{
item.AssetID = asset.FullID;
m_Scene.InventoryService.UpdateItem(item);
}
else
{
item.AssetID = asset.FullID;
if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions())
{
uint perms = objectGroup.GetEffectivePermissions();
uint nextPerms = (perms & 7) << 13;
if ((nextPerms & (uint)PermissionMask.Copy) == 0)
perms &= ~(uint)PermissionMask.Copy;
if ((nextPerms & (uint)PermissionMask.Transfer) == 0)
perms &= ~(uint)PermissionMask.Transfer;
if ((nextPerms & (uint)PermissionMask.Modify) == 0)
perms &= ~(uint)PermissionMask.Modify;
objectGroup.AbsolutePosition = inventoryStoredPosition;
// Make sure all bits but the ones we want are clear
// on take.
// This will be applied to the current perms, so
// it will do what we want.
objectGroup.RootPart.NextOwnerMask &=
((uint)PermissionMask.Copy |
((uint)PermissionMask.Copy |
(uint)PermissionMask.Transfer |
(uint)PermissionMask.Modify);
objectGroup.RootPart.NextOwnerMask |=
(uint)PermissionMask.Move;
item.BasePermissions = perms & objectGroup.RootPart.NextOwnerMask;
item.CurrentPermissions = item.BasePermissions;
item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask;
item.GroupPermissions = objectGroup.RootPart.GroupMask & objectGroup.RootPart.NextOwnerMask;
item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
}
else
{
item.BasePermissions = objectGroup.GetEffectivePermissions();
item.CurrentPermissions = objectGroup.GetEffectivePermissions();
item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask;
item.GroupPermissions = objectGroup.RootPart.GroupMask;
string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(objectGroup);
item.CurrentPermissions &=
((uint)PermissionMask.Copy |
(uint)PermissionMask.Transfer |
(uint)PermissionMask.Modify |
(uint)PermissionMask.Move |
7); // Preserve folded permissions
objectGroup.AbsolutePosition = originalPosition;
xmlStrings[objectGroup.UUID] = sceneObjectXml;
}
// TODO: add the new fields (Flags, Sale info, etc)
item.CreationDate = Util.UnixTimeSinceEpoch();
item.Description = asset.Description;
item.Name = asset.Name;
item.AssetType = asset.Type;
string itemXml;
m_Scene.AddInventoryItem(item);
if (objlist.Count > 1)
{
float minX, minY, minZ;
float maxX, maxY, maxZ;
if (remoteClient != null && item.Owner == remoteClient.AgentId)
{
remoteClient.SendInventoryItemCreateUpdate(item, 0);
}
else
{
ScenePresence notifyUser = m_Scene.GetScenePresence(item.Owner);
if (notifyUser != null)
Vector3[] offsets = m_Scene.GetCombinedBoundingBox(objlist,
out minX, out maxX, out minY, out maxY,
out minZ, out maxZ);
// CreateWrapper
XmlDocument itemDoc = new XmlDocument();
XmlElement root = itemDoc.CreateElement("", "CoalescedObject", "");
itemDoc.AppendChild(root);
// Embed the offsets into the group XML
for ( int i = 0 ; i < objlist.Count ; i++ )
{
notifyUser.ControllingClient.SendInventoryItemCreateUpdate(item, 0);
XmlDocument doc = new XmlDocument();
SceneObjectGroup g = objlist[i];
doc.LoadXml(xmlStrings[g.UUID]);
XmlElement e = (XmlElement)doc.SelectSingleNode("/SceneObjectGroup");
e.SetAttribute("offsetx", offsets[i].X.ToString());
e.SetAttribute("offsety", offsets[i].Y.ToString());
e.SetAttribute("offsetz", offsets[i].Z.ToString());
XmlNode objectNode = itemDoc.ImportNode(e, true);
root.AppendChild(objectNode);
}
float sizeX = maxX - minX;
float sizeY = maxY - minY;
float sizeZ = maxZ - minZ;
root.SetAttribute("x", sizeX.ToString());
root.SetAttribute("y", sizeY.ToString());
root.SetAttribute("z", sizeZ.ToString());
itemXml = itemDoc.InnerXml;
}
else
{
itemXml = xmlStrings[objlist[0].UUID];
}
// Get the user info of the item destination
//
UUID userID = UUID.Zero;
if (action == DeRezAction.Take || action == DeRezAction.TakeCopy ||
action == DeRezAction.SaveToExistingUserInventoryItem)
{
// Take or take copy require a taker
// Saving changes requires a local user
//
if (remoteClient == null)
return UUID.Zero;
userID = remoteClient.AgentId;
}
else
{
// All returns / deletes go to the object owner
//
userID = objlist[0].RootPart.OwnerID;
}
if (userID == UUID.Zero) // Can't proceed
{
return UUID.Zero;
}
// If we're returning someone's item, it goes back to the
// owner's Lost And Found folder.
// Delete is treated like return in this case
// Deleting your own items makes them go to trash
//
InventoryFolderBase folder = null;
InventoryItemBase item = null;
if (DeRezAction.SaveToExistingUserInventoryItem == action)
{
item = new InventoryItemBase(objlist[0].RootPart.FromUserInventoryItemID, userID);
item = m_Scene.InventoryService.GetItem(item);
//item = userInfo.RootFolder.FindItem(
// objectGroup.RootPart.FromUserInventoryItemID);
if (null == item)
{
m_log.DebugFormat(
"[AGENT INVENTORY]: Object {0} {1} scheduled for save to inventory has already been deleted.",
objlist[0].Name, objlist[0].UUID);
return UUID.Zero;
}
}
else
{
// Folder magic
//
if (action == DeRezAction.Delete)
{
// Deleting someone else's item
//
if (remoteClient == null ||
objlist[0].OwnerID != remoteClient.AgentId)
{
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
}
else
{
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
}
}
else if (action == DeRezAction.Return)
{
// Dump to lost + found unconditionally
//
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
}
if (folderID == UUID.Zero && folder == null)
{
if (action == DeRezAction.Delete)
{
// Deletes go to trash by default
//
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
}
else
{
if (remoteClient == null ||
objlist[0].OwnerID != remoteClient.AgentId)
{
// Taking copy of another person's item. Take to
// Objects folder.
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.Object);
}
else
{
// Catch all. Use lost & found
//
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
}
}
}
// Override and put into where it came from, if it came
// from anywhere in inventory
//
if (action == DeRezAction.Take || action == DeRezAction.TakeCopy)
{
if (objlist[0].RootPart.FromFolderID != UUID.Zero && objlist[0].OwnerID == remoteClient.AgentId)
{
InventoryFolderBase f = new InventoryFolderBase(objlist[0].RootPart.FromFolderID, userID);
folder = m_Scene.InventoryService.GetFolder(f);
}
}
if (folder == null) // None of the above
{
folder = new InventoryFolderBase(folderID);
if (folder == null) // Nowhere to put it
{
return UUID.Zero;
}
}
item = new InventoryItemBase();
// Can't know creator is the same, so null it in inventory
if (objlist.Count > 1)
{
item.CreatorId = UUID.Zero.ToString();
item.CreatorData = String.Empty;
}
else
{
item.CreatorId = objlist[0].RootPart.CreatorID.ToString();
item.CreatorData = objlist[0].RootPart.CreatorData;
}
item.ID = UUID.Random();
item.InvType = (int)InventoryType.Object;
item.Folder = folder.ID;
item.Owner = userID;
if (objlist.Count > 1)
{
item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems;
}
else
{
item.SaleType = objlist[0].RootPart.ObjectSaleType;
item.SalePrice = objlist[0].RootPart.SalePrice;
}
}
AssetBase asset = CreateAsset(
objlist[0].GetPartName(objlist[0].RootPart.LocalId),
objlist[0].GetPartDescription(objlist[0].RootPart.LocalId),
(sbyte)AssetType.Object,
Utils.StringToBytes(itemXml),
objlist[0].OwnerID.ToString());
m_Scene.AssetService.Store(asset);
assetID = asset.FullID;
if (DeRezAction.SaveToExistingUserInventoryItem == action)
{
item.AssetID = asset.FullID;
m_Scene.InventoryService.UpdateItem(item);
}
else
{
item.AssetID = asset.FullID;
uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move) | 7;
foreach (SceneObjectGroup grp in objlist)
effectivePerms &= grp.GetEffectivePermissions();
effectivePerms |= (uint)PermissionMask.Move;
if (remoteClient != null && (remoteClient.AgentId != objlist[0].RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions())
{
uint perms = effectivePerms;
uint nextPerms = (perms & 7) << 13;
if ((nextPerms & (uint)PermissionMask.Copy) == 0)
perms &= ~(uint)PermissionMask.Copy;
if ((nextPerms & (uint)PermissionMask.Transfer) == 0)
perms &= ~(uint)PermissionMask.Transfer;
if ((nextPerms & (uint)PermissionMask.Modify) == 0)
perms &= ~(uint)PermissionMask.Modify;
item.BasePermissions = perms & objlist[0].RootPart.NextOwnerMask;
item.CurrentPermissions = item.BasePermissions;
item.NextPermissions = perms & objlist[0].RootPart.NextOwnerMask;
item.EveryOnePermissions = objlist[0].RootPart.EveryoneMask & objlist[0].RootPart.NextOwnerMask;
item.GroupPermissions = objlist[0].RootPart.GroupMask & objlist[0].RootPart.NextOwnerMask;
item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
}
else
{
item.BasePermissions = effectivePerms;
item.CurrentPermissions = effectivePerms;
item.NextPermissions = objlist[0].RootPart.NextOwnerMask & effectivePerms;
item.EveryOnePermissions = objlist[0].RootPart.EveryoneMask & effectivePerms;
item.GroupPermissions = objlist[0].RootPart.GroupMask & effectivePerms;
item.CurrentPermissions &=
((uint)PermissionMask.Copy |
(uint)PermissionMask.Transfer |
(uint)PermissionMask.Modify |
(uint)PermissionMask.Move |
7); // Preserve folded permissions
}
item.CreationDate = Util.UnixTimeSinceEpoch();
item.Description = asset.Description;
item.Name = asset.Name;
item.AssetType = asset.Type;
m_Scene.AddInventoryItem(item);
if (remoteClient != null && item.Owner == remoteClient.AgentId)
{
remoteClient.SendInventoryItemCreateUpdate(item, 0);
}
else
{
ScenePresence notifyUser = m_Scene.GetScenePresence(item.Owner);
if (notifyUser != null)
{
notifyUser.ControllingClient.SendInventoryItemCreateUpdate(item, 0);
}
}
}
}
return assetID;
}
@@ -524,8 +600,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (item != null)
{
if (item.ID == UUID.Zero)
{
m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 1");
}
AssetBase rezAsset = m_Scene.AssetService.Get(item.AssetID.ToString());
SceneObjectGroup group = null;
if (rezAsset != null)
{
UUID itemId = UUID.Zero;
@@ -534,34 +617,83 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
// item that it came from. This allows us to enable 'save object to inventory'
if (!m_Scene.Permissions.BypassPermissions())
{
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == (uint)PermissionMask.Copy)
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == (uint)PermissionMask.Copy && (item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0)
{
itemId = item.ID;
}
}
else
{
// Brave new fullperm world
//
itemId = item.ID;
if ((item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0)
{
// Brave new fullperm world
itemId = item.ID;
}
}
if (item.ID == UUID.Zero)
{
m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 2");
}
string xmlData = Utils.BytesToString(rezAsset.Data);
SceneObjectGroup group
= SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData);
List<SceneObjectGroup> objlist =
new List<SceneObjectGroup>();
List<Vector3> veclist = new List<Vector3>();
Util.FireAndForget(delegate { AddUserData(group); });
group.RootPart.FromFolderID = item.Folder;
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlData);
XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
if (e == null || attachment) // Single
{
SceneObjectGroup g =
SceneObjectSerializer.FromOriginalXmlFormat(
itemId, xmlData);
objlist.Add(g);
veclist.Add(new Vector3(0, 0, 0));
// If it's rezzed in world, select it. Much easier to
// find small items.
//
if (!attachment)
group.RootPart.CreateSelected = true;
float offsetHeight = 0;
pos = m_Scene.GetNewRezLocation(
RayStart, RayEnd, RayTargetID, Quaternion.Identity,
BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false);
pos.Z += offsetHeight;
}
else
{
XmlElement coll = (XmlElement)e;
float bx = Convert.ToSingle(coll.GetAttribute("x"));
float by = Convert.ToSingle(coll.GetAttribute("y"));
float bz = Convert.ToSingle(coll.GetAttribute("z"));
Vector3 bbox = new Vector3(bx, by, bz);
pos = m_Scene.GetNewRezLocation(RayStart, RayEnd,
RayTargetID, Quaternion.Identity,
BypassRayCast, bRayEndIsIntersection, true,
bbox, false);
pos -= bbox / 2;
XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
foreach (XmlNode n in groups)
{
SceneObjectGroup g =
SceneObjectSerializer.FromOriginalXmlFormat(
itemId, n.OuterXml);
objlist.Add(g);
XmlElement el = (XmlElement)n;
float x = Convert.ToSingle(el.GetAttribute("offsetx"));
float y = Convert.ToSingle(el.GetAttribute("offsety"));
float z = Convert.ToSingle(el.GetAttribute("offsetz"));
veclist.Add(new Vector3(x, y, z));
}
}
int primcount = 0;
foreach (SceneObjectGroup g in objlist)
primcount += g.PrimCount;
if (!m_Scene.Permissions.CanRezObject(
group.PrimCount, remoteClient.AgentId, pos)
primcount, remoteClient.AgentId, pos)
&& !attachment)
{
// The client operates in no fail mode. It will
@@ -574,133 +706,163 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
return null;
}
group.ResetIDs();
for (int i = 0 ; i < objlist.Count ; i++ )
{
group = objlist[i];
if (attachment)
{
group.RootPart.Flags |= PrimFlags.Phantom;
group.RootPart.IsAttachment = true;
Vector3 storedPosition = group.AbsolutePosition;
if (group.UUID == UUID.Zero)
{
m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 3");
}
group.RootPart.FromFolderID = item.Folder;
// If we're rezzing an attachment then don't ask
// AddNewSceneObject() to update the client since
// we'll be doing that later on. Scheduling more
// than one full update during the attachment
// process causes some clients to fail to display
// the attachment properly.
// Also, don't persist attachments.
m_Scene.AddNewSceneObject(group, false, false);
}
else
{
m_Scene.AddNewSceneObject(group, true, false);
}
// If it's rezzed in world, select it. Much easier to
// find small items.
//
if (!attachment)
{
group.RootPart.CreateSelected = true;
foreach (SceneObjectPart child in group.Parts)
child.CreateSelected = true;
}
// m_log.InfoFormat("ray end point for inventory rezz is {0} {1} {2} ", RayEnd.X, RayEnd.Y, RayEnd.Z);
// if attachment we set it's asset id so object updates can reflect that
// if not, we set it's position in world.
if (!attachment)
{
group.ScheduleGroupForFullUpdate();
float offsetHeight = 0;
pos = m_Scene.GetNewRezLocation(
RayStart, RayEnd, RayTargetID, Quaternion.Identity,
BypassRayCast, bRayEndIsIntersection, true, group.GetAxisAlignedBoundingBox(out offsetHeight), false);
pos.Z += offsetHeight;
group.AbsolutePosition = pos;
// m_log.InfoFormat("rezx point for inventory rezz is {0} {1} {2} and offsetheight was {3}", pos.X, pos.Y, pos.Z, offsetHeight);
}
else
{
group.SetFromItemID(itemID);
}
SceneObjectPart rootPart = null;
try
{
rootPart = group.GetChildPart(group.UUID);
}
catch (NullReferenceException)
{
string isAttachment = "";
group.ResetIDs();
if (attachment)
isAttachment = " Object was an attachment";
{
group.RootPart.Flags |= PrimFlags.Phantom;
group.RootPart.IsAttachment = true;
m_log.Error("[AGENT INVENTORY]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment);
}
// If we're rezzing an attachment then don't ask
// AddNewSceneObject() to update the client since
// we'll be doing that later on. Scheduling more
// than one full update during the attachment
// process causes some clients to fail to display
// the attachment properly.
// Also, don't persist attachments.
m_Scene.AddNewSceneObject(group, false, false);
}
else
{
m_Scene.AddNewSceneObject(group, true, false);
}
// Since renaming the item in the inventory does not affect the name stored
// in the serialization, transfer the correct name from the inventory to the
// object itself before we rez.
rootPart.Name = item.Name;
rootPart.Description = item.Description;
// if attachment we set it's asset id so object updates
// can reflect that, if not, we set it's position in world.
if (!attachment)
{
group.ScheduleGroupForFullUpdate();
group.AbsolutePosition = pos + veclist[i];
}
else
{
group.SetFromItemID(itemID);
}
if ((item.Flags & (uint)InventoryItemFlags.ObjectSlamSale) != 0)
{
rootPart.ObjectSaleType = item.SaleType;
rootPart.SalePrice = item.SalePrice;
}
SceneObjectPart rootPart = null;
group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
if ((rootPart.OwnerID != item.Owner) ||
try
{
rootPart = group.GetChildPart(group.UUID);
}
catch (NullReferenceException)
{
string isAttachment = "";
if (attachment)
isAttachment = " Object was an attachment";
m_log.Error("[AGENT INVENTORY]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment);
}
// Since renaming the item in the inventory does not
// affect the name stored in the serialization, transfer
// the correct name from the inventory to the
// object itself before we rez.
// On coalesced objects, this has no effect.
if ((item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0)
{
rootPart.Name = item.Name;
rootPart.Description = item.Description;
}
if ((item.Flags & (uint)InventoryItemFlags.ObjectSlamSale) != 0)
{
rootPart.ObjectSaleType = item.SaleType;
rootPart.SalePrice = item.SalePrice;
}
group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
// TODO: Remove the magic number badness
if ((rootPart.OwnerID != item.Owner) ||
(item.CurrentPermissions & 16) != 0 || // Magic number
(item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
{
//Need to kill the for sale here
rootPart.ObjectSaleType = 0;
rootPart.SalePrice = 10;
if (m_Scene.Permissions.PropagatePermissions())
{
foreach (SceneObjectPart part in group.Parts)
//Need to kill the for sale here
rootPart.ObjectSaleType = 0;
rootPart.SalePrice = 10;
if (m_Scene.Permissions.PropagatePermissions())
{
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
part.EveryoneMask = item.EveryOnePermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
foreach (SceneObjectPart part in group.Parts)
{
if ((item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0)
{
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
part.EveryoneMask = item.EveryOnePermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
}
}
group.ApplyNextOwnerPermissions();
}
}
foreach (SceneObjectPart part in group.Parts)
{
// TODO: Remove the magic number badness
if ((part.OwnerID != item.Owner) ||
(item.CurrentPermissions & 16) != 0 || // Magic number
(item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
{
part.LastOwnerID = part.OwnerID;
part.OwnerID = item.Owner;
part.Inventory.ChangeInventoryOwner(item.Owner);
}
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
part.EveryoneMask = item.EveryOnePermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
}
rootPart.TrimPermissions();
if (!attachment)
{
if (group.RootPart.Shape.PCode == (byte)PCode.Prim)
{
// Save attachment data
group.RootPart.AttachPoint = group.RootPart.Shape.State;
group.RootPart.AttachOffset = storedPosition;
group.ClearPartAttachmentData();
}
group.ApplyNextOwnerPermissions();
// Fire on_rez
group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1);
rootPart.ParentGroup.ResumeScripts();
rootPart.ScheduleFullUpdate();
}
}
foreach (SceneObjectPart part in group.Parts)
{
if ((part.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0)
{
part.LastOwnerID = part.OwnerID;
part.OwnerID = item.Owner;
part.Inventory.ChangeInventoryOwner(item.Owner);
part.GroupMask = 0; // DO NOT propagate here
}
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
part.EveryoneMask = item.EveryOnePermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
}
rootPart.TrimPermissions();
if (!attachment)
{
if (group.RootPart.Shape.PCode == (byte)PCode.Prim)
{
group.ClearPartAttachmentData();
}
// Fire on_rez
group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1);
rootPart.ParentGroup.ResumeScripts();
rootPart.ScheduleFullUpdate();
}
if (!m_Scene.Permissions.BypassPermissions())
{
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
@@ -716,9 +878,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
}
}
return rootPart.ParentGroup;
}
return group;
}
return null;

View File

@@ -341,6 +341,10 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
try
{
Request = (HttpWebRequest) WebRequest.Create(Url);
//This works around some buggy HTTP Servers like Lighttpd
Request.ServicePoint.Expect100Continue = false;
Request.Method = HttpMethod;
Request.ContentType = HttpMIMEType;

View File

@@ -142,7 +142,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
return urlcode;
}
string url = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + "/lslhttp/" + urlcode.ToString() + "/";
string url = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + "/lslhttp/" + urlcode.ToString();
UrlData urlData = new UrlData();
urlData.hostID = host.UUID;
@@ -152,10 +152,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
urlData.urlcode = urlcode;
urlData.requests = new Dictionary<UUID, RequestData>();
m_UrlMap[url] = urlData;
string uri = "/lslhttp/" + urlcode.ToString() + "/";
string uri = "/lslhttp/" + urlcode.ToString();
m_HttpServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll,
new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents,
@@ -386,6 +385,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
return response;
}
public void HttpRequestHandler(UUID requestID, Hashtable request)
{
lock (request)
@@ -400,8 +400,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
int pos1 = uri.IndexOf("/");// /lslhttp
int pos2 = uri.IndexOf("/", pos1 + 1);// /lslhttp/
int pos3 = uri.IndexOf("/", pos2 + 1);// /lslhttp/<UUID>/
string uri_tmp = uri.Substring(0, pos3 + 1);
int pos3 = pos2 + 37; // /lslhttp/urlcode
string uri_tmp = uri.Substring(0, pos3);
//HTTP server code doesn't provide us with QueryStrings
string pathInfo;
string queryString;

View File

@@ -57,9 +57,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector");
config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService");
config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
config.Configs["GridService"].Set("Region_Test_Region_1", "DefaultRegion");
config.Configs["GridService"].Set("Region_Test_Region_2", "FallbackRegion");
config.Configs["GridService"].Set("Region_Test_Region_3", "FallbackRegion");
config.Configs["GridService"].Set("Region_Test_Region_1", "DefaultRegion");
config.Configs["GridService"].Set("Region_Test_Region_2", "FallbackRegion");
config.Configs["GridService"].Set("Region_Test_Region_3", "FallbackRegion");
config.Configs["GridService"].Set("Region_Other_Region_4", "FallbackRegion");
m_LocalConnector = new LocalGridServicesConnector(config);
@@ -128,8 +128,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
Assert.IsNotNull(result, "Retrieved GetRegionByName is null");
Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match");
m_LocalConnector.RegisterRegion(UUID.Zero, r2);
m_LocalConnector.RegisterRegion(UUID.Zero, r3);
m_LocalConnector.RegisterRegion(UUID.Zero, r2);
m_LocalConnector.RegisterRegion(UUID.Zero, r3);
m_LocalConnector.RegisterRegion(UUID.Zero, r4);
result = m_LocalConnector.GetRegionByUUID(UUID.Zero, new UUID(1));
@@ -154,38 +154,38 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
Assert.IsNotNull(results, "Retrieved GetRegionRange collection is null");
Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected");
results = m_LocalConnector.GetDefaultRegions(UUID.Zero);
Assert.IsNotNull(results, "Retrieved GetDefaultRegions collection is null");
Assert.That(results.Count, Is.EqualTo(1), "Retrieved default regions collection has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(1)), "Retrieved default region's UUID does not match");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r1.RegionLocX, r1.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 1 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 1 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r2.RegionLocX, r2.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 2 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 2 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 2-4-3");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 2-4-3");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 2-4-3");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r3.RegionLocX, r3.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 3 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 3 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 3-4-2");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 3-4-2");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 3-4-2");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r4.RegionLocX, r4.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 4 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 4 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 4-3-2");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 4-3-2");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 4-3-2");
results = m_LocalConnector.GetDefaultRegions(UUID.Zero);
Assert.IsNotNull(results, "Retrieved GetDefaultRegions collection is null");
Assert.That(results.Count, Is.EqualTo(1), "Retrieved default regions collection has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(1)), "Retrieved default region's UUID does not match");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r1.RegionLocX, r1.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 1 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 1 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r2.RegionLocX, r2.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 2 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 2 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 2-4-3");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 2-4-3");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 2-4-3");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r3.RegionLocX, r3.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 3 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 3 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 3-4-2");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 3-4-2");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 3-4-2");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r4.RegionLocX, r4.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 4 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 4 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 4-3-2");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 4-3-2");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 4-3-2");
results = m_LocalConnector.GetHyperlinks(UUID.Zero);
Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null");

View File

@@ -300,10 +300,24 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
if (s.RegionInfo.RegionID == destination.RegionID)
{
//m_log.Debug("[LOCAL COMMS]: Found region to SendCloseAgent");
// Let's spawn a threadlet right here, because this may take
// a while
Util.FireAndForget(delegate { s.IncomingCloseAgent(id); });
return true;
return s.IncomingCloseAgent(id);
}
}
//m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent");
return false;
}
public bool CloseChildAgent(GridRegion destination, UUID id)
{
if (destination == null)
return false;
foreach (Scene s in m_sceneList)
{
if (s.RegionInfo.RegionID == destination.RegionID)
{
//m_log.Debug("[LOCAL COMMS]: Found region to SendCloseAgent");
return s.IncomingCloseChildAgent(id);
}
}
//m_log.Debug("[LOCAL COMMS]: region not found in SendCloseAgent");

View File

@@ -269,6 +269,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
return false;
}
public bool CloseChildAgent(GridRegion destination, UUID id)
{
if (destination == null)
return false;
// Try local first
if (m_localBackend.CloseChildAgent(destination, id))
return true;
// else do the remote thing
if (!m_localBackend.IsLocalRegion(destination.RegionHandle))
return m_remoteConnector.CloseChildAgent(destination, id);
return false;
}
public bool CloseAgent(GridRegion destination, UUID id)
{

View File

@@ -172,6 +172,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
return m_UserService.GetUserAccount(scopeID, Email);
}
public List<UserAccount> GetUserAccountsWhere(UUID scopeID, string query)
{
return null;
}
public List<UserAccount> GetUserAccounts(UUID scopeID, string query)
{
return m_UserService.GetUserAccounts(scopeID, query);

View File

@@ -287,6 +287,23 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// being no copy/no mod for everyone
lock (part.TaskInventory)
{
if (!ResolveUserUuid(part.CreatorID))
part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner;
if (!ResolveUserUuid(part.OwnerID))
part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
if (!ResolveUserUuid(part.LastOwnerID))
part.LastOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
// And zap any troublesome sit target information
part.SitTargetOrientation = new Quaternion(0, 0, 0, 1);
part.SitTargetPosition = new Vector3(0, 0, 0);
// Fix ownership/creator of inventory items
// Not doing so results in inventory items
// being no copy/no mod for everyone
part.TaskInventory.LockItemsForRead(true);
TaskInventoryDictionary inv = part.TaskInventory;
foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv)
{
@@ -302,6 +319,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
if (UserManager != null)
UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData);
}
part.TaskInventory.LockItemsForRead(false);
}
}

View File

@@ -249,18 +249,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
if (asset != null)
{
if (m_options.ContainsKey("verbose"))
m_log.InfoFormat("[ARCHIVER]: Writing asset {0}", id);
// m_log.DebugFormat("[ARCHIVER]: Writing asset {0}", id);
m_foundAssetUuids.Add(asset.FullID);
m_assetsArchiver.WriteAsset(PostProcess(asset));
}
else
{
if (m_options.ContainsKey("verbose"))
m_log.InfoFormat("[ARCHIVER]: Recording asset {0} as not found", id);
// m_log.DebugFormat("[ARCHIVER]: Recording asset {0} as not found", id);
m_notFoundAssetUuids.Add(new UUID(id));
}

View File

@@ -29,6 +29,7 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Security;
using System.Timers;
using log4net;
using Nini.Config;
using OpenMetaverse;
@@ -45,6 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
private delegate void LookupUUIDS(List<UUID> uuidLst);
private Scene m_scene;
private Timer m_regionChangeTimer = new Timer();
private EstateTerrainXferHandler TerrainUploader;
@@ -246,7 +248,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
timeInSeconds -= 15;
}
restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true);
restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), false);
}
}
@@ -266,7 +268,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
if ((estateAccessType & 4) != 0) // User add
{
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
{
m_scene.RegionInfo.EstateSettings.AddEstateUser(user);
m_scene.RegionInfo.EstateSettings.Save();
@@ -281,7 +283,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 8) != 0) // User remove
{
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
{
m_scene.RegionInfo.EstateSettings.RemoveEstateUser(user);
m_scene.RegionInfo.EstateSettings.Save();
@@ -296,7 +298,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 16) != 0) // Group add
{
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
{
m_scene.RegionInfo.EstateSettings.AddEstateGroup(user);
m_scene.RegionInfo.EstateSettings.Save();
@@ -310,7 +312,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
if ((estateAccessType & 32) != 0) // Group remove
{
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions())
if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions())
{
m_scene.RegionInfo.EstateSettings.RemoveEstateGroup(user);
m_scene.RegionInfo.EstateSettings.Save();
@@ -359,7 +361,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
if (!s.IsChildAgent)
{
m_scene.TeleportClientHome(user, s.ControllingClient);
if (!m_scene.TeleportClientHome(user, s.ControllingClient))
{
s.ControllingClient.Kick("Your access to the region was revoked and TP home failed - you have been logged out.");
s.ControllingClient.Close();
}
}
}
@@ -493,7 +499,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
ScenePresence s = m_scene.GetScenePresence(prey);
if (s != null)
{
m_scene.TeleportClientHome(prey, s.ControllingClient);
if (!m_scene.TeleportClientHome(prey, s.ControllingClient))
{
s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
s.ControllingClient.Close();
}
}
}
}
@@ -512,7 +522,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
// Also make sure they are actually in the region
if (p != null && !p.IsChildAgent)
{
m_scene.TeleportClientHome(p.UUID, p.ControllingClient);
if (!m_scene.TeleportClientHome(p.UUID, p.ControllingClient))
{
p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out.");
p.ControllingClient.Close();
}
}
}
});
@@ -921,6 +935,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
m_scene.RegisterModuleInterface<IEstateModule>(this);
m_scene.EventManager.OnNewClient += EventManager_OnNewClient;
m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
m_regionChangeTimer.AutoReset = false;
m_regionChangeTimer.Interval = 2000;
m_regionChangeTimer.Elapsed += RaiseRegionInfoChange;
m_scene.AddCommand(this, "set terrain texture",
"set terrain texture <number> <uuid> [<x>] [<y>]",
@@ -1192,6 +1209,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
protected void TriggerRegionInfoChange()
{
m_regionChangeTimer.Stop();
m_regionChangeTimer.Start();
}
protected void RaiseRegionInfoChange(object sender, ElapsedEventArgs e)
{
ChangeDelegate change = OnRegionInfoChange;

View File

@@ -85,6 +85,8 @@ namespace OpenSim.Region.CoreModules.World.Land
private int m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1;
private bool m_allowedForcefulBans = true;
private UUID DefaultGodParcelGroup;
private string DefaultGodParcelName;
// caches ExtendedLandData
private Cache parcelInfoCache;
@@ -100,6 +102,12 @@ namespace OpenSim.Region.CoreModules.World.Land
public void Initialise(IConfigSource source)
{
IConfig cnf = source.Configs["LandManagement"];
if (cnf != null)
{
DefaultGodParcelGroup = new UUID(cnf.GetString("DefaultAdministratorGroupUUID", UUID.Zero.ToString()));
DefaultGodParcelName = cnf.GetString("DefaultAdministratorParcelName", "Default Parcel");
}
}
public void AddRegion(Scene scene)
@@ -351,7 +359,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{
if (avatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT)
{
if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID))
if (parcelAvatarIsEntering.IsEitherBannedOrRestricted(avatar.UUID))
{
SendYouAreBannedNotice(avatar);
ForceAvatarToPosition(avatar, m_scene.GetNearestAllowedPosition(avatar));
@@ -662,7 +670,7 @@ namespace OpenSim.Region.CoreModules.World.Land
int x;
int y;
if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0)
if (x_float > Constants.RegionSize || x_float < 0 || y_float > Constants.RegionSize || y_float < 0)
return null;
try
@@ -1005,6 +1013,10 @@ namespace OpenSim.Region.CoreModules.World.Land
//Owner Flag
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER);
}
else if (currentParcelBlock.LandData.IsGroupOwned && remote_client.IsGroupMember(currentParcelBlock.LandData.GroupID))
{
tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_GROUP);
}
else if (currentParcelBlock.LandData.SalePrice > 0 &&
(currentParcelBlock.LandData.AuthBuyerID == UUID.Zero ||
currentParcelBlock.LandData.AuthBuyerID == remote_client.AgentId))
@@ -1299,7 +1311,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{
land.DeedToGroup(groupID);
}
EventManagerOnParcelPrimCountTainted();
}
@@ -1307,18 +1319,31 @@ namespace OpenSim.Region.CoreModules.World.Land
public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data)
{
for (int i = 0; i < data.Count; i++)
lock (m_landList)
{
IncomingLandObjectFromStorage(data[i]);
//Remove all the land objects in the sim and then process our new data
foreach (int n in m_landList.Keys)
{
m_scene.EventManager.TriggerLandObjectRemoved(m_landList[n].LandData.GlobalID);
}
m_landIDList.Initialize();
m_landList.Clear();
for (int i = 0; i < data.Count; i++)
{
IncomingLandObjectFromStorage(data[i]);
}
}
}
public void IncomingLandObjectFromStorage(LandData data)
{
ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
new_land.LandData = data.Copy();
new_land.SetLandBitmapFromByteArray();
AddLandObject(new_land);
new_land.SendLandUpdateToAvatarsOverMe();
}
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
@@ -1591,5 +1616,321 @@ namespace OpenSim.Region.CoreModules.World.Land
UpdateLandObject(localID, land.LandData);
}
public void ClientOnParcelGodMark(IClientAPI client, UUID god, int landID)
{
ILandObject land = null;
List<ILandObject> Land = ((Scene)client.Scene).LandChannel.AllParcels();
foreach (ILandObject landObject in Land)
{
if (landObject.LandData.LocalID == landID)
{
land = landObject;
}
}
land.DeedToGroup(DefaultGodParcelGroup);
land.LandData.Name = DefaultGodParcelName;
land.SendLandUpdateToAvatarsOverMe();
}
private void ClientOnSimWideDeletes(IClientAPI client, UUID agentID, int flags, UUID targetID)
{
ScenePresence SP;
((Scene)client.Scene).TryGetScenePresence(client.AgentId, out SP);
List<SceneObjectGroup> returns = new List<SceneObjectGroup>();
if (SP.UserLevel != 0)
{
if (flags == 0) //All parcels, scripted or not
{
((Scene)client.Scene).ForEachSOG(delegate(SceneObjectGroup e)
{
if (e.OwnerID == targetID)
{
returns.Add(e);
}
}
);
}
if (flags == 4) //All parcels, scripted object
{
((Scene)client.Scene).ForEachSOG(delegate(SceneObjectGroup e)
{
if (e.OwnerID == targetID)
{
if (e.scriptScore >= 0.01)
{
returns.Add(e);
}
}
}
);
}
if (flags == 4) //not target parcel, scripted object
{
((Scene)client.Scene).ForEachSOG(delegate(SceneObjectGroup e)
{
if (e.OwnerID == targetID)
{
ILandObject landobject = ((Scene)client.Scene).LandChannel.GetLandObject(e.AbsolutePosition.X, e.AbsolutePosition.Y);
if (landobject.LandData.OwnerID != e.OwnerID)
{
if (e.scriptScore >= 0.01)
{
returns.Add(e);
}
}
}
}
);
}
foreach (SceneObjectGroup ol in returns)
{
ReturnObject(ol, client);
}
}
}
public void ReturnObject(SceneObjectGroup obj, IClientAPI client)
{
SceneObjectGroup[] objs = new SceneObjectGroup[1];
objs[0] = obj;
((Scene)client.Scene).returnObjects(objs, client.AgentId);
}
Dictionary<UUID, System.Threading.Timer> Timers = new Dictionary<UUID, System.Threading.Timer>();
public void ClientOnParcelFreezeUser(IClientAPI client, UUID parcelowner, uint flags, UUID target)
{
ScenePresence targetAvatar = null;
((Scene)client.Scene).TryGetScenePresence(target, out targetAvatar);
ScenePresence parcelManager = null;
((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager);
System.Threading.Timer Timer;
if (targetAvatar.UserLevel == 0)
{
ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y);
if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze))
return;
if (flags == 0)
{
targetAvatar.AllowMovement = false;
targetAvatar.ControllingClient.SendAlertMessage(parcelManager.Firstname + " " + parcelManager.Lastname + " has frozen you for 30 seconds. You cannot move or interact with the world.");
parcelManager.ControllingClient.SendAlertMessage("Avatar Frozen.");
System.Threading.TimerCallback timeCB = new System.Threading.TimerCallback(OnEndParcelFrozen);
Timer = new System.Threading.Timer(timeCB, targetAvatar, 30000, 0);
Timers.Add(targetAvatar.UUID, Timer);
}
else
{
targetAvatar.AllowMovement = true;
targetAvatar.ControllingClient.SendAlertMessage(parcelManager.Firstname + " " + parcelManager.Lastname + " has unfrozen you.");
parcelManager.ControllingClient.SendAlertMessage("Avatar Unfrozen.");
Timers.TryGetValue(targetAvatar.UUID, out Timer);
Timers.Remove(targetAvatar.UUID);
Timer.Dispose();
}
}
}
private void OnEndParcelFrozen(object avatar)
{
ScenePresence targetAvatar = (ScenePresence)avatar;
targetAvatar.AllowMovement = true;
System.Threading.Timer Timer;
Timers.TryGetValue(targetAvatar.UUID, out Timer);
Timers.Remove(targetAvatar.UUID);
targetAvatar.ControllingClient.SendAgentAlertMessage("The freeze has worn off; you may go about your business.", false);
}
public void ClientOnParcelEjectUser(IClientAPI client, UUID parcelowner, uint flags, UUID target)
{
ScenePresence targetAvatar = null;
((Scene)client.Scene).TryGetScenePresence(target, out targetAvatar);
ScenePresence parcelManager = null;
((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager);
//Just eject
if (flags == 0)
{
if (targetAvatar.UserLevel == 0)
{
ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y);
if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze))
return;
Vector3 position = new Vector3(0, 0, 0);
List<ILandObject> allParcels = new List<ILandObject>();
allParcels = AllParcels();
if (allParcels.Count != 1)
{
foreach (ILandObject parcel in allParcels)
{
if (parcel.LandData.GlobalID != land.LandData.GlobalID)
{
if (parcel.IsEitherBannedOrRestricted(targetAvatar.UUID) != true)
{
for (int x = 1; x <= Constants.RegionSize; x += 2)
{
for (int y = 1; y <= Constants.RegionSize; y += 2)
{
if (parcel.ContainsPoint(x, y))
{
position = new Vector3(x, y, targetAvatar.AbsolutePosition.Z);
targetAvatar.TeleportWithMomentum(position);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected.");
return;
}
}
}
}
}
}
}
Vector3 targetVector;
if (targetAvatar.AbsolutePosition.X > targetAvatar.AbsolutePosition.Y)
{
if (targetAvatar.AbsolutePosition.X > .5 * Constants.RegionSize)
{
targetVector = new Vector3(Constants.RegionSize, targetAvatar.AbsolutePosition.Y, targetAvatar.AbsolutePosition.Z); ;
targetAvatar.TeleportWithMomentum(targetVector);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected.");
return;
}
else
{
targetVector = new Vector3(0, targetAvatar.AbsolutePosition.Y, targetAvatar.AbsolutePosition.Z); ;
targetAvatar.TeleportWithMomentum(targetVector);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected.");
return;
}
}
else
{
if (targetAvatar.AbsolutePosition.Y > .5 * Constants.RegionSize)
{
targetVector = new Vector3(targetAvatar.AbsolutePosition.X, Constants.RegionSize, targetAvatar.AbsolutePosition.Z); ;
targetAvatar.TeleportWithMomentum(targetVector);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected.");
return;
}
else
{
targetVector = new Vector3(targetAvatar.AbsolutePosition.X, 0, targetAvatar.AbsolutePosition.Z); ;
targetAvatar.TeleportWithMomentum(targetVector);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected.");
return;
}
}
}
}
//Eject and ban
if (flags == 1)
{
if (targetAvatar.UserLevel == 0)
{
ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y);
if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze))
return;
Vector3 position = new Vector3(0, 0, 0);
List<ILandObject> allParcels = new List<ILandObject>();
allParcels = AllParcels();
if (allParcels.Count != 1)
{
foreach (ILandObject parcel in allParcels)
{
if (parcel.LandData.GlobalID != land.LandData.GlobalID)
{
if (parcel.IsEitherBannedOrRestricted(targetAvatar.UUID) != true)
{
for (int x = 1; x <= Constants.RegionSize; x += 2)
{
for (int y = 1; y <= Constants.RegionSize; y += 2)
{
if (parcel.ContainsPoint(x, y))
{
position = new Vector3(x, y, targetAvatar.AbsolutePosition.Z);
targetAvatar.TeleportWithMomentum(position);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected and banned by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected and Banned.");
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = targetAvatar.UUID;
entry.Flags = AccessList.Ban;
entry.Time = new DateTime();
land.LandData.ParcelAccessList.Add(entry);
return;
}
}
}
}
}
}
}
Vector3 targetVector;
if (targetAvatar.AbsolutePosition.X > targetAvatar.AbsolutePosition.Y)
{
if (targetAvatar.AbsolutePosition.X > .5 * Constants.RegionSize)
{
targetVector = new Vector3(Constants.RegionSize, targetAvatar.AbsolutePosition.Y, targetAvatar.AbsolutePosition.Z); ;
targetAvatar.TeleportWithMomentum(targetVector);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected and banned by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected and Banned.");
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = targetAvatar.UUID;
entry.Flags = AccessList.Ban;
entry.Time = new DateTime();
land.LandData.ParcelAccessList.Add(entry);
return;
}
else
{
targetVector = new Vector3(0, targetAvatar.AbsolutePosition.Y, targetAvatar.AbsolutePosition.Z); ;
targetAvatar.TeleportWithMomentum(targetVector);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected and banned by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected and Banned.");
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = targetAvatar.UUID;
entry.Flags = AccessList.Ban;
entry.Time = new DateTime();
land.LandData.ParcelAccessList.Add(entry);
return;
}
}
else
{
if (targetAvatar.AbsolutePosition.Y > .5 * Constants.RegionSize)
{
targetVector = new Vector3(targetAvatar.AbsolutePosition.X, Constants.RegionSize, targetAvatar.AbsolutePosition.Z); ;
targetAvatar.TeleportWithMomentum(targetVector);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected and banned by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected and Banned.");
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = targetAvatar.UUID;
entry.Flags = AccessList.Ban;
entry.Time = new DateTime();
land.LandData.ParcelAccessList.Add(entry);
return;
}
else
{
targetVector = new Vector3(targetAvatar.AbsolutePosition.X, 0, targetAvatar.AbsolutePosition.Z); ;
targetAvatar.TeleportWithMomentum(targetVector);
targetAvatar.ControllingClient.SendAlertMessage("You have been ejected and banned by " + parcelManager.Firstname + " " + parcelManager.Lastname);
parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected and Banned.");
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = targetAvatar.UUID;
entry.Flags = AccessList.Ban;
entry.Time = new DateTime();
land.LandData.ParcelAccessList.Add(entry);
return;
}
}
}
}
}
}
}

View File

@@ -364,6 +364,37 @@ namespace OpenSim.Region.CoreModules.World.Land
return false;
}
public bool HasGroupAccess(UUID avatar)
{
if (LandData.GroupID != UUID.Zero && (LandData.Flags & (uint)ParcelFlags.UseAccessGroup) == (uint)ParcelFlags.UseAccessGroup)
{
ScenePresence sp;
if (!m_scene.TryGetScenePresence(avatar, out sp))
{
IGroupsModule groupsModule = m_scene.RequestModuleInterface<IGroupsModule>();
if (groupsModule == null)
return false;
GroupMembershipData[] membership = groupsModule.GetMembershipData(avatar);
if (membership == null || membership.Length == 0)
return false;
foreach (GroupMembershipData d in membership)
{
if (d.GroupID == LandData.GroupID)
return true;
}
return false;
}
if (!sp.ControllingClient.IsGroupMember(LandData.GroupID))
return false;
return true;
}
return false;
}
public bool IsBannedFromLand(UUID avatar)
{
if (m_scene.Permissions.IsAdministrator(avatar))
@@ -400,9 +431,13 @@ namespace OpenSim.Region.CoreModules.World.Land
return false;
}) == -1 && LandData.OwnerID != avatar)
{
return true;
if (!HasGroupAccess(avatar))
{
return true;
}
}
}
return false;
}

View File

@@ -362,7 +362,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
public string Name
{
get { return "PermissionsModule"; }
get { return "DefaultPermissionsModule"; }
}
public bool IsSharedModule

View File

@@ -28,6 +28,8 @@
using System;
using System.Reflection;
using System.Timers;
using System.IO;
using System.Diagnostics;
using System.Threading;
using System.Collections.Generic;
using log4net;
@@ -56,13 +58,23 @@ namespace OpenSim.Region.CoreModules.World.Region
protected UUID m_Initiator;
protected bool m_Notice = false;
protected IDialogModule m_DialogModule = null;
protected string m_MarkerPath = String.Empty;
public void Initialise(IConfigSource config)
{
IConfig restartConfig = config.Configs["RestartModule"];
if (restartConfig != null)
{
m_MarkerPath = restartConfig.GetString("MarkerPath", String.Empty);
}
}
public void AddRegion(Scene scene)
{
if (m_MarkerPath != String.Empty)
File.Delete(Path.Combine(m_MarkerPath,
scene.RegionInfo.RegionID.ToString()));
m_Scene = scene;
scene.RegisterModuleInterface<IRestartModule>(this);
MainConsole.Instance.Commands.AddCommand("RestartModule",
@@ -114,6 +126,7 @@ namespace OpenSim.Region.CoreModules.World.Region
if (alerts == null)
{
CreateMarkerFile();
m_Scene.RestartNow();
return;
}
@@ -127,6 +140,7 @@ namespace OpenSim.Region.CoreModules.World.Region
if (m_Alerts[0] == 0)
{
CreateMarkerFile();
m_Scene.RestartNow();
return;
}
@@ -140,6 +154,7 @@ namespace OpenSim.Region.CoreModules.World.Region
{
if (m_Alerts.Count == 0 || m_Alerts[0] == 0)
{
CreateMarkerFile();
m_Scene.RestartNow();
return 0;
}
@@ -259,5 +274,25 @@ namespace OpenSim.Region.CoreModules.World.Region
ScheduleRestart(UUID.Zero, args[3], times.ToArray(), notice);
}
protected void CreateMarkerFile()
{
if (m_MarkerPath == String.Empty)
return;
string path = Path.Combine(m_MarkerPath, m_Scene.RegionInfo.RegionID.ToString());
try
{
string pidstring = System.Diagnostics.Process.GetCurrentProcess().Id.ToString();
FileStream fs = File.Create(path);
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
Byte[] buf = enc.GetBytes(pidstring);
fs.Write(buf, 0, buf.Length);
fs.Close();
}
catch (Exception)
{
}
}
}
}

View File

@@ -549,6 +549,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised());
m_scene.SaveTerrain();
m_scene.EventManager.TriggerTerrainUpdate();
// Clients who look at the map will never see changes after they looked at the map, so i've commented this out.
//m_scene.CreateTerrainTexture(true);
}

View File

@@ -86,9 +86,9 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
private void OnMapNameRequest(IClientAPI remoteClient, string mapName)
{
if (mapName.Length < 3)
if (mapName.Length < 2)
{
remoteClient.SendAlertMessage("Use a search string with at least 3 characters");
remoteClient.SendAlertMessage("Use a search string with at least 2 characters");
return;
}
@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName);
if (info != null) regionInfos.Add(info);
}
m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count);
List<MapBlockData> blocks = new List<MapBlockData>();
MapBlockData data;
@@ -128,14 +128,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
data.Agents = 0;
data.Access = 255;
data.MapImageId = UUID.Zero;
data.Name = ""; // mapName;
data.Name = mapName;
data.RegionFlags = 0;
data.WaterHeight = 0; // not used
data.X = 0;
data.Y = 0;
blocks.Add(data);
remoteClient.SendMapBlock(blocks, 0);
remoteClient.SendMapBlock(blocks, 2);
}
// private Scene GetClientScene(IClientAPI client)

View File

@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
@@ -110,7 +111,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
m_parts.Remove(part.UUID);
remoteClient.SendKillObject(m_regionHandle, part.LocalId);
remoteClient.SendKillObject(m_regionHandle, new List<uint>() { part.LocalId} );
remoteClient.AddMoney(1);
remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
}
@@ -121,7 +122,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
m_parts.Remove(m_rootPart.UUID);
m_scene.DeleteSceneObject(this, false);
remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId);
remoteClient.SendKillObject(m_regionHandle, new List<uint>() { m_rootPart.LocalId });
remoteClient.AddMoney(50);
remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
}

View File

@@ -79,7 +79,7 @@ namespace OpenSim.Region.Examples.SimpleModule
public event DisconnectUser OnDisconnectUser;
public event RequestAvatarProperties OnRequestAvatarProperties;
public event SetAlwaysRun OnSetAlwaysRun;
public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
public event DeRezObject OnDeRezObject;
public event Action<IClientAPI> OnRegionHandShakeReply;
public event GenericCall1 OnRequestWearables;
@@ -429,7 +429,7 @@ namespace OpenSim.Region.Examples.SimpleModule
}
public virtual void SendKillObject(ulong regionHandle, uint localID)
public virtual void SendKillObject(ulong regionHandle, List<uint> localID)
{
}
@@ -832,6 +832,11 @@ namespace OpenSim.Region.Examples.SimpleModule
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
}

View File

@@ -26,6 +26,7 @@
*/
using System;
using System.Xml;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
@@ -82,6 +83,10 @@ namespace OpenSim.Region.Framework.Interfaces
UUID RezSingleAttachmentFromInventory(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus);
// Same as above, but also load script states from a separate doc
UUID RezSingleAttachmentFromInventory(
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus, XmlDocument doc);
/// <summary>
/// Rez multiple attachments from a user's inventory
/// </summary>
@@ -113,17 +118,14 @@ namespace OpenSim.Region.Framework.Interfaces
/// <summary>
/// Update the user inventory to show a detach.
/// </summary>
/// <param name="itemID">/param>
/// <param name="remoteClient"></param>
/// <param name="itemID">
/// A <see cref="UUID"/>
/// </param>
/// <param name="remoteClient">
/// A <see cref="IClientAPI"/>
/// </param>
void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient);
/// <summary>
/// Update the position of an attachment.
/// </summary>
/// <param name="sog"></param>
/// <param name="pos"></param>
void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos);
/// <summary>
/// Update the user inventory with a changed attachment
/// </summary>

View File

@@ -115,6 +115,8 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="stateSource"></param>
void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource);
ArrayList CreateScriptInstanceEr(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource);
/// <summary>
/// Stop a script which is in this prim's inventory.
/// </summary>
@@ -229,5 +231,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// A <see cref="Dictionary`2"/>
/// </returns>
Dictionary<UUID, string> GetScriptStates();
Dictionary<UUID, string> GetScriptStates(bool oldIDs);
}
}

View File

@@ -40,7 +40,7 @@ namespace OpenSim.Region.Framework.Interfaces
void Teleport(ScenePresence agent, ulong regionHandle, Vector3 position,
Vector3 lookAt, uint teleportFlags);
void TeleportHome(UUID id, IClientAPI client);
bool TeleportHome(UUID id, IClientAPI client);
void Cross(ScenePresence agent, bool isFlying);

View File

@@ -67,6 +67,14 @@ namespace OpenSim.Region.Framework.Interfaces
/// <returns></returns>
bool SendReleaseAgent(ulong regionHandle, UUID id, string uri);
/// <summary>
/// Close chid agent.
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="id"></param>
/// <returns></returns>
bool SendCloseChildAgent(ulong regionHandle, UUID id);
/// <summary>
/// Close agent.
/// </summary>

View File

@@ -50,5 +50,7 @@ namespace OpenSim.Region.Framework.Interfaces
void ResumeScript(UUID itemID);
ArrayList GetScriptErrors(UUID itemID);
bool HasScript(UUID itemID, out bool running);
}
}

View File

@@ -0,0 +1,27 @@
///////////////////////////////////////////////////////////////////
//
// (c) Careminster LImited, Melanie Thielker and the Meta7 Team
//
// This file is not open source. All rights reserved
// Mod 2
using OpenSim.Region.Framework.Scenes;
public interface ISnmpModule
{
void Trap(int code, string Message, Scene scene);
void Critical(string Message, Scene scene);
void Warning(string Message, Scene scene);
void Major(string Message, Scene scene);
void ColdStart(int step , Scene scene);
void Shutdown(int step , Scene scene);
//
// Node Start/stop events
//
void LinkUp(Scene scene);
void LinkDown(Scene scene);
void BootInfo(string data, Scene scene);
void trapDebug(string Module,string data, Scene scene);
void trapXMRE(int data, string Message, Scene scene);
}

View File

@@ -226,7 +226,8 @@ namespace OpenSim.Region.Framework
"[MODULES]: Could not load types for [{0}]. Exception {1}", pluginAssembly.FullName, e);
// justincc: Right now this is fatal to really get the user's attention
throw e;
// TomMeta: WTF? No, how about we /don't/ throw a fatal exception when there's no need to?
//throw e;
}
}

View File

@@ -53,11 +53,17 @@ namespace OpenSim.Region.Framework.Scenes.Animation
{
get { return m_movementAnimation; }
}
protected string m_movementAnimation = "DEFAULT";
// protected string m_movementAnimation = "DEFAULT"; //KF: 'DEFAULT' does not exist!
protected string m_movementAnimation = "CROUCH"; //KF: CROUCH ensures reliable Av Anim. init.
private int m_animTickFall;
private int m_animTickJump;
// private int m_animTickJump;
public int m_animTickJump; // ScenePresence has to see this to control +Z force
public bool m_jumping = false; // Add for jumping
public float m_jumpVelocity = 0f; // Add for jumping
private int m_landing = 0; // Add for jumping
public bool m_falling = false; // Add for falling
private float m_fallHeight; // Add for falling
/// <value>
/// The scene presence that this animator applies to
/// </value>
@@ -114,7 +120,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation
public void ResetAnimations()
{
Console.WriteLine("ResetA.............");
m_animations.Clear();
TrySetMovementAnimation("STAND");
}
/// <summary>
@@ -123,8 +131,6 @@ namespace OpenSim.Region.Framework.Scenes.Animation
/// </summary>
public void TrySetMovementAnimation(string anim)
{
//m_log.DebugFormat("Updating movement animation to {0}", anim);
if (!m_scenePresence.IsChildAgent)
{
if (m_animations.TrySetDefaultAnimation(
@@ -142,14 +148,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation
/// </summary>
public string GetMovementAnimation()
{
const float FALL_DELAY = 0.33f;
const float PREJUMP_DELAY = 0.25f;
//Console.WriteLine("GMA-------"); //##
//#@ const float FALL_DELAY = 0.33f;
const float FALL_DELAY = 800f; //## mS
//rm for jumping const float PREJUMP_DELAY = 0.25f;
const float PREJUMP_DELAY = 200f; // mS add for jumping
const float JUMP_PERIOD = 800f; // mS add for jumping
#region Inputs
if (m_scenePresence.SitGround)
{
return "SIT_GROUND_CONSTRAINED";
}
AgentManager.ControlFlags controlFlags = (AgentManager.ControlFlags)m_scenePresence.AgentControlFlags;
PhysicsActor actor = m_scenePresence.PhysicsActor;
@@ -159,11 +165,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
Vector3 left = Vector3.Transform(Vector3.UnitY, rotMatrix);
// Check control flags
bool heldForward =
(((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) || ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS));
bool heldBack = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG;
bool heldLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS;
bool heldRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG;
bool heldForward = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_AT_POS || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS);
bool heldBack = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG);
bool heldLeft = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS);
bool heldRight = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG);
//bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT;
//bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT;
bool heldUp = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == AgentManager.ControlFlags.AGENT_CONTROL_UP_POS;
@@ -182,8 +187,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
// Is the avatar trying to move?
// bool moving = (move != Vector3.Zero);
bool jumping = m_animTickJump != 0;
// rm for jumping bool jumping = m_animTickJump != 0;
#endregion Inputs
#region Flying
@@ -192,6 +196,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation
{
m_animTickFall = 0;
m_animTickJump = 0;
m_jumping = false; //add for jumping
m_falling = true; //add for falling
m_jumpVelocity = 0f; //add for jumping
actor.Selected = false; //add for jumping flag
m_fallHeight = actor.Position.Z; // save latest flying height
if (move.X != 0f || move.Y != 0f)
{
@@ -203,8 +212,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation
}
else if (move.Z < 0f)
{
if (actor != null && actor.IsColliding)
if (actor != null && actor.IsColliding)
{ //##
//Console.WriteLine("LAND FLYING"); // ##
return "LAND";
} //#
else
return "HOVER_DOWN";
}
@@ -218,48 +230,127 @@ namespace OpenSim.Region.Framework.Scenes.Animation
#region Falling/Floating/Landing
if (actor == null || !actor.IsColliding)
// rm for jumping if (actor == null || !actor.IsColliding)
if ((actor == null || !actor.IsColliding) && !m_jumping) // add for jumping
{
float fallElapsed = (float)(Environment.TickCount - m_animTickFall) / 1000f;
// rm float fallElapsed = (float)(Environment.TickCount - m_animTickFall) / 1000f;
float fallElapsed = (float)(Environment.TickCount - m_animTickFall); // add, in mS
float fallVelocity = (actor != null) ? actor.Velocity.Z : 0.0f;
//Console.WriteLine("falling t={0} v={1}", fallElapsed, fallVelocity); //##
if (m_animTickFall == 0 || (fallElapsed > FALL_DELAY && fallVelocity >= 0.0f))
// rm for fall if (m_animTickFall == 0 || (fallElapsed > FALL_DELAY && fallVelocity >= 0.0f))
if (!m_jumping && (fallVelocity < -3.0f) ) m_falling = true; // add for falling and jumping
if (m_animTickFall == 0 || (fallVelocity >= 0.0f)) // add for jumping
// not falling yet or going up
{
// Just started falling
// reset start of fall time
m_animTickFall = Environment.TickCount;
}
else if (!jumping && fallElapsed > FALL_DELAY)
// else if (!jumping && fallElapsed > FALL_DELAY)
else if (!m_jumping && (fallElapsed > FALL_DELAY) && (fallVelocity < -3.0f) && (m_scenePresence.m_wasFlying)) // add for falling and jumping
{
// Falling long enough to trigger the animation
//Console.WriteLine("FALLDOWN"); //##
return "FALLDOWN";
}
else if (m_animTickJump == -1)
{
m_animTickJump = 0;
return "STAND";
}
return m_movementAnimation;
}
#endregion Falling/Floating/Landing
#region Jumping // section added for jumping...
int jumptime;
jumptime = Environment.TickCount - m_animTickJump;
if ((move.Z > 0f) && (!m_jumping))
{
//Console.WriteLine("PJ {0}", jumptime); //##
// Start jumping, prejump
m_animTickFall = 0;
m_jumping = true;
m_falling = false;
actor.Selected = true; // borrowed for jmping flag
m_animTickJump = Environment.TickCount;
m_jumpVelocity = 0.35f;
return "PREJUMP";
}
if(m_jumping)
{
if ( (jumptime > (JUMP_PERIOD * 1.5f)) && actor.IsColliding)
{
//Console.WriteLine("LA {0}", jumptime); //##
// end jumping
m_jumping = false;
m_falling = false;
actor.Selected = false; // borrowed for jumping flag
m_jumpVelocity = 0f;
m_animTickFall = Environment.TickCount;
return "LAND";
}
else if (jumptime > JUMP_PERIOD)
{
//Console.WriteLine("JD {0}", jumptime); //##
// jump down
m_jumpVelocity = 0f;
return "JUMP";
}
else if (jumptime > PREJUMP_DELAY)
{
//Console.WriteLine("JU {0}", jumptime); //##
// jump up
m_jumping = true;
m_jumpVelocity = 10f;
return "JUMP";
}
}
#endregion Jumping // end added section
#region Ground Movement
if (m_movementAnimation == "FALLDOWN")
{
m_falling = false;
m_animTickFall = Environment.TickCount;
// TODO: SOFT_LAND support
return "LAND";
float fallHeight = m_fallHeight - actor.Position.Z;
//Console.WriteLine("Hit from {0}", fallHeight); //##
if (fallHeight > 15.0f) // add for falling
return "STANDUP";
else if (fallHeight > 8.0f) // add for falling
return "SOFT_LAND"; // add for falling
else // add for falling
return "LAND"; // add for falling
}
else if (m_movementAnimation == "LAND")
// rm jumping float landElapsed = (float)(Environment.TickCount - m_animTickFall) / 1000f;
// rm jumping if ((m_animTickFall != 0) && (landElapsed <= FALL_DELAY))
// rm for landing return "LAND";
else if ((m_movementAnimation == "LAND") || (m_movementAnimation == "SOFT_LAND") || (m_movementAnimation == "STANDUP"))
{
float landElapsed = (float)(Environment.TickCount - m_animTickFall) / 1000f;
if ((m_animTickFall != 0) && (landElapsed <= FALL_DELAY))
return "LAND";
}
int landElapsed = Environment.TickCount - m_animTickFall; // add for jumping
int limit = 1000; // add for jumping
if(m_movementAnimation == "LAND") limit = 350; // add for jumping
// NB if the above is set too long a weird anim reset from some place prevents STAND from being sent to client
if ((m_animTickFall != 0) && (landElapsed <= limit)) // add for jumping
{
//Console.WriteLine("Lelapse {0}", m_movementAnimation); //##
return m_movementAnimation;
}
else
{
//Console.WriteLine("end/STAND"); //##
m_fallHeight = actor.Position.Z; // save latest flying height
return "STAND";
}
}
/* This section removed, replaced by jumping section
m_animTickFall = 0;
if (move.Z > 0f)
@@ -271,7 +362,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
m_animTickJump = Environment.TickCount;
return "PREJUMP";
}
else if (Environment.TickCount - m_animTickJump > PREJUMP_DELAY * 1000.0f)
else if (Environment.TickCount - m_animTickJump > PREJUMP_DELAY * 800.0f)
{
// Start actual jump
if (m_animTickJump == -1)
@@ -284,37 +375,40 @@ namespace OpenSim.Region.Framework.Scenes.Animation
m_animTickJump = -1;
return "JUMP";
}
else
return "JUMP";
}
else
{
// Not jumping
m_animTickJump = 0;
if (move.X != 0f || move.Y != 0f)
{
// Walking / crouchwalking / running
if (move.Z < 0f)
return "CROUCHWALK";
else if (m_scenePresence.SetAlwaysRun)
return "RUN";
else
return "WALK";
}
*/
// next section moved outside paren. and realigned for jumping
if (move.X != 0f || move.Y != 0f)
{
m_fallHeight = actor.Position.Z; // save latest flying height
m_falling = false; // Add for falling
// Walking / crouchwalking / running
if (move.Z < 0f)
return "CROUCHWALK";
else if (m_scenePresence.SetAlwaysRun)
return "RUN";
else
{
// Not walking
if (move.Z < 0f)
return "CROUCH";
else
return "STAND";
}
return "WALK";
}
// rm for jumping else
else if (!m_jumping) // add for jumping
{
m_falling = false; // Add for falling
// Not walking
if (move.Z < 0f)
return "CROUCH";
else
return "STAND";
}
// end section realign for jumping
#endregion Ground Movement
//return m_movementAnimation;
m_falling = false; // Add for falling
return m_movementAnimation;
}
/// <summary>
@@ -323,7 +417,15 @@ namespace OpenSim.Region.Framework.Scenes.Animation
public void UpdateMovementAnimations()
{
m_movementAnimation = GetMovementAnimation();
TrySetMovementAnimation(m_movementAnimation);
/* if (m_movementAnimation == "PREJUMP" && !m_scenePresence.Scene.m_usePreJump)
{
// This was the previous behavior before PREJUMP
TrySetMovementAnimation("JUMP");
}
else
{ removed for jumping */
TrySetMovementAnimation(m_movementAnimation);
// rm for jumping }
}
public UUID[] GetAnimationArray()

View File

@@ -104,8 +104,15 @@ namespace OpenSim.Region.Framework.Scenes
// better than losing the object for now.
if (permissionToDelete)
{
List<uint> killIDs = new List<uint>();
foreach (SceneObjectGroup g in objectGroups)
{
killIDs.Add(g.LocalId);
g.DeleteGroupFromScene(false);
}
m_scene.SendKillObject(killIDs);
}
}
@@ -137,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
x = m_inventoryDeletes.Dequeue();
m_log.DebugFormat(
"[ASYNC DELETER]: Sending object to user's inventory, {0} item(s) remaining.", left);
"[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.", left, x.action, x.objectGroups.Count);
try
{
@@ -177,4 +184,4 @@ namespace OpenSim.Region.Framework.Scenes
return false;
}
}
}
}

View File

@@ -55,8 +55,12 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void OnTerrainTickDelegate();
public delegate void OnTerrainUpdateDelegate();
public event OnTerrainTickDelegate OnTerrainTick;
public event OnTerrainUpdateDelegate OnTerrainUpdate;
public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup);
public event OnBackupDelegate OnBackup;
@@ -757,6 +761,26 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
public void TriggerTerrainUpdate()
{
OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate;
if (handlerTerrainUpdate != null)
{
foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList())
{
try
{
d();
}
catch (Exception e)
{
m_log.ErrorFormat(
"[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}",
e.Message, e.StackTrace);
}
}
}
}
public void TriggerTerrainTick()
{

View File

@@ -167,6 +167,7 @@ namespace OpenSim.Region.Framework.Scenes
private double GetPriorityByFrontBack(IClientAPI client, ISceneEntity entity)
{
if (entity == null) return double.NaN;
ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
if (presence != null)
{
@@ -224,22 +225,16 @@ namespace OpenSim.Region.Framework.Scenes
if (entity == null)
return double.NaN;
// Use group position for child prims
Vector3 entityPos = entity.AbsolutePosition;
if (entity is SceneObjectPart)
{
SceneObjectGroup group = (entity as SceneObjectPart).ParentGroup;
if (group != null)
entityPos = group.AbsolutePosition;
else
entityPos = entity.AbsolutePosition;
}
else
entityPos = entity.AbsolutePosition;
ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
if (presence != null)
{
// Use group position for child prims
Vector3 entityPos;
if (entity is SceneObjectPart)
entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition;
else
entityPos = entity.AbsolutePosition;
if (!presence.IsChildAgent)
{
if (entity is ScenePresence)
@@ -259,12 +254,19 @@ namespace OpenSim.Region.Framework.Scenes
if (entity is SceneObjectPart)
{
PhysicsActor physActor = ((SceneObjectPart)entity).ParentGroup.RootPart.PhysActor;
if (physActor == null || !physActor.IsPhysical)
priority += 100;
if (((SceneObjectPart)entity).ParentGroup.RootPart.IsAttachment)
{
priority = 1.0;
}
else
{
PhysicsActor physActor = ((SceneObjectPart)entity).ParentGroup.RootPart.PhysActor;
if (physActor == null || !physActor.IsPhysical)
priority += 100;
}
if (((SceneObjectPart)entity).ParentGroup.RootPart != (SceneObjectPart)entity)
priority +=1;
}
return priority;
}

View File

@@ -99,34 +99,22 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="item"></param>
public bool AddInventoryItem(InventoryItemBase item)
{
if (UUID.Zero == item.Folder)
InventoryFolderBase folder;
if (item.Folder == UUID.Zero)
{
InventoryFolderBase f = InventoryService.GetFolderForType(item.Owner, (AssetType)item.AssetType);
if (f != null)
folder = InventoryService.GetFolderForType(item.Owner, (AssetType)item.AssetType);
if (folder == null)
{
// m_log.DebugFormat(
// "[LOCAL INVENTORY SERVICES CONNECTOR]: Found folder {0} type {1} for item {2}",
// f.Name, (AssetType)f.Type, item.Name);
item.Folder = f.ID;
}
else
{
f = InventoryService.GetRootFolder(item.Owner);
if (f != null)
{
item.Folder = f.ID;
}
else
{
m_log.WarnFormat(
"[AGENT INVENTORY]: Could not find root folder for {0} when trying to add item {1} with no parent folder specified",
item.Owner, item.Name);
folder = InventoryService.GetRootFolder(item.Owner);
if (folder == null)
return false;
}
}
item.Folder = folder.ID;
}
if (InventoryService.AddItem(item))
{
int userlevel = 0;
@@ -252,8 +240,7 @@ namespace OpenSim.Region.Framework.Scenes
// Update item with new asset
item.AssetID = asset.FullID;
if (group.UpdateInventoryItem(item))
remoteClient.SendAgentAlertMessage("Script saved", false);
group.UpdateInventoryItem(item);
part.GetProperties(remoteClient);
@@ -264,12 +251,7 @@ namespace OpenSim.Region.Framework.Scenes
{
// Needs to determine which engine was running it and use that
//
part.Inventory.CreateScriptInstance(item.ItemID, 0, false, DefaultScriptEngine, 0);
errors = part.Inventory.GetScriptErrors(item.ItemID);
}
else
{
remoteClient.SendAgentAlertMessage("Script saved", false);
errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 0);
}
part.ParentGroup.ResumeScripts();
return errors;
@@ -698,6 +680,8 @@ namespace OpenSim.Region.Framework.Scenes
return;
}
if (newName == null) newName = item.Name;
AssetBase asset = AssetService.Get(item.AssetID.ToString());
if (asset != null)
@@ -750,6 +734,24 @@ namespace OpenSim.Region.Framework.Scenes
return asset;
}
/// <summary>
/// Move an item within the agent's inventory, and leave a copy (used in making a new outfit)
/// </summary>
public void MoveInventoryItemsLeaveCopy(IClientAPI remoteClient, List<InventoryItemBase> items, UUID destfolder)
{
List<InventoryItemBase> moveitems = new List<InventoryItemBase>();
foreach (InventoryItemBase b in items)
{
CopyInventoryItem(remoteClient, 0, remoteClient.AgentId, b.ID, b.Folder, null);
InventoryItemBase n = InventoryService.GetItem(b);
n.Folder = destfolder;
moveitems.Add(n);
remoteClient.SendInventoryItemCreateUpdate(n, 0);
}
MoveInventoryItem(remoteClient, moveitems);
}
/// <summary>
/// Move an item within the agent's inventory.
/// </summary>
@@ -983,8 +985,12 @@ namespace OpenSim.Region.Framework.Scenes
public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID)
{
SceneObjectPart part = GetSceneObjectPart(localID);
SceneObjectGroup group = part.ParentGroup;
if (group != null)
SceneObjectGroup group = null;
if (part != null)
{
group = part.ParentGroup;
}
if (part != null && group != null)
{
if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId))
return;
@@ -1433,13 +1439,6 @@ namespace OpenSim.Region.Framework.Scenes
{
agentTransactions.HandleTaskItemUpdateFromTransaction(
remoteClient, part, transactionID, currentItem);
if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
remoteClient.SendAgentAlertMessage("Notecard saved", false);
else if ((InventoryType)itemInfo.InvType == InventoryType.LSL)
remoteClient.SendAgentAlertMessage("Script saved", false);
else
remoteClient.SendAgentAlertMessage("Item saved", false);
}
// Base ALWAYS has move
@@ -1580,7 +1579,7 @@ namespace OpenSim.Region.Framework.Scenes
return;
AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType,
Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}"),
Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n\n touch_start(integer num)\n {\n }\n}"),
remoteClient.AgentId);
AssetService.Store(asset);
@@ -1733,23 +1732,32 @@ namespace OpenSim.Region.Framework.Scenes
// build a list of eligible objects
List<uint> deleteIDs = new List<uint>();
List<SceneObjectGroup> deleteGroups = new List<SceneObjectGroup>();
// Start with true for both, then remove the flags if objects
// that we can't derez are part of the selection
bool permissionToTake = true;
bool permissionToTakeCopy = true;
bool permissionToDelete = true;
List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>();
foreach (uint localID in localIDs)
{
// Start with true for both, then remove the flags if objects
// that we can't derez are part of the selection
bool permissionToTake = true;
bool permissionToTakeCopy = true;
bool permissionToDelete = true;
// Invalid id
SceneObjectPart part = GetSceneObjectPart(localID);
if (part == null)
{
//Client still thinks the object exists, kill it
deleteIDs.Add(localID);
continue;
}
// Already deleted by someone else
if (part.ParentGroup == null || part.ParentGroup.IsDeleted)
{
//Client still thinks the object exists, kill it
deleteIDs.Add(localID);
continue;
}
// Can't delete child prims
if (part != part.ParentGroup.RootPart)
@@ -1757,9 +1765,6 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectGroup grp = part.ParentGroup;
deleteIDs.Add(localID);
deleteGroups.Add(grp);
if (remoteClient == null)
{
// Autoreturn has a null client. Nothing else does. So
@@ -1776,80 +1781,104 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId))
if (action == DeRezAction.TakeCopy)
{
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId))
permissionToTakeCopy = false;
}
else
{
permissionToTakeCopy = false;
}
if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId))
permissionToTake = false;
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
permissionToDelete = false;
}
}
// Handle god perms
if ((remoteClient != null) && Permissions.IsGod(remoteClient.AgentId))
{
permissionToTake = true;
permissionToTakeCopy = true;
permissionToDelete = true;
}
// If we're re-saving, we don't even want to delete
if (action == DeRezAction.SaveToExistingUserInventoryItem)
permissionToDelete = false;
// if we want to take a copy, we also don't want to delete
// Note: after this point, the permissionToTakeCopy flag
// becomes irrelevant. It already includes the permissionToTake
// permission and after excluding no copy items here, we can
// just use that.
if (action == DeRezAction.TakeCopy)
{
// If we don't have permission, stop right here
if (!permissionToTakeCopy)
return;
permissionToTake = true;
// Don't delete
permissionToDelete = false;
}
if (action == DeRezAction.Return)
{
if (remoteClient != null)
// Handle god perms
if ((remoteClient != null) && Permissions.IsGod(remoteClient.AgentId))
{
if (Permissions.CanReturnObjects(
null,
remoteClient.AgentId,
deleteGroups))
permissionToTake = true;
permissionToTakeCopy = true;
permissionToDelete = true;
}
// If we're re-saving, we don't even want to delete
if (action == DeRezAction.SaveToExistingUserInventoryItem)
permissionToDelete = false;
// if we want to take a copy, we also don't want to delete
// Note: after this point, the permissionToTakeCopy flag
// becomes irrelevant. It already includes the permissionToTake
// permission and after excluding no copy items here, we can
// just use that.
if (action == DeRezAction.TakeCopy)
{
// If we don't have permission, stop right here
if (!permissionToTakeCopy)
return;
permissionToTake = true;
// Don't delete
permissionToDelete = false;
}
if (action == DeRezAction.Return)
{
if (remoteClient != null)
{
if (Permissions.CanReturnObjects(
null,
remoteClient.AgentId,
deleteGroups))
{
permissionToTake = true;
permissionToDelete = true;
AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return");
}
}
else // Auto return passes through here with null agent
{
permissionToTake = true;
permissionToDelete = true;
foreach (SceneObjectGroup g in deleteGroups)
{
AddReturn(g.OwnerID, g.Name, g.AbsolutePosition, "parcel owner return");
}
}
}
else // Auto return passes through here with null agent
if (permissionToTake && (!permissionToDelete))
takeGroups.Add(grp);
if (permissionToDelete)
{
permissionToTake = true;
permissionToDelete = true;
if (permissionToTake)
deleteGroups.Add(grp);
deleteIDs.Add(grp.LocalId);
}
}
if (permissionToTake)
{
m_asyncSceneObjectDeleter.DeleteToInventory(
action, destinationID, deleteGroups, remoteClient,
permissionToDelete);
}
else if (permissionToDelete)
SendKillObject(deleteIDs);
if (deleteGroups.Count > 0)
{
foreach (SceneObjectGroup g in deleteGroups)
DeleteSceneObject(g, false);
deleteIDs.Remove(g.LocalId);
m_asyncSceneObjectDeleter.DeleteToInventory(
action, destinationID, deleteGroups, remoteClient,
true);
}
if (takeGroups.Count > 0)
{
m_asyncSceneObjectDeleter.DeleteToInventory(
action, destinationID, takeGroups, remoteClient,
false);
}
if (deleteIDs.Count > 0)
{
foreach (SceneObjectGroup g in deleteGroups)
DeleteSceneObject(g, true);
}
}
@@ -1901,21 +1930,29 @@ namespace OpenSim.Region.Framework.Scenes
else // oopsies
item.Folder = UUID.Zero;
// Set up base perms properly
uint permsBase = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify);
permsBase &= grp.RootPart.BaseMask;
permsBase |= (uint)PermissionMask.Move;
// Make sure we don't lock it
grp.RootPart.NextOwnerMask |= (uint)PermissionMask.Move;
if ((remoteClient.AgentId != grp.RootPart.OwnerID) && Permissions.PropagatePermissions())
{
item.BasePermissions = grp.RootPart.NextOwnerMask;
item.CurrentPermissions = grp.RootPart.NextOwnerMask;
item.NextPermissions = grp.RootPart.NextOwnerMask;
item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask;
item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask;
item.BasePermissions = permsBase & grp.RootPart.NextOwnerMask;
item.CurrentPermissions = permsBase & grp.RootPart.NextOwnerMask;
item.NextPermissions = permsBase & grp.RootPart.NextOwnerMask;
item.EveryOnePermissions = permsBase & grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask;
item.GroupPermissions = permsBase & grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask;
}
else
{
item.BasePermissions = grp.RootPart.BaseMask;
item.CurrentPermissions = grp.RootPart.OwnerMask;
item.NextPermissions = grp.RootPart.NextOwnerMask;
item.EveryOnePermissions = grp.RootPart.EveryoneMask;
item.GroupPermissions = grp.RootPart.GroupMask;
item.BasePermissions = permsBase;
item.CurrentPermissions = permsBase & grp.RootPart.OwnerMask;
item.NextPermissions = permsBase & grp.RootPart.NextOwnerMask;
item.EveryOnePermissions = permsBase & grp.RootPart.EveryoneMask;
item.GroupPermissions = permsBase & grp.RootPart.GroupMask;
}
item.CreationDate = Util.UnixTimeSinceEpoch();
@@ -2021,6 +2058,9 @@ namespace OpenSim.Region.Framework.Scenes
public void SetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID, bool running)
{
if (!Permissions.CanEditScript(itemID, objectID, controllingClient.AgentId))
return;
SceneObjectPart part = GetSceneObjectPart(objectID);
if (part == null)
return;

View File

@@ -49,6 +49,7 @@ namespace OpenSim.Region.Framework.Scenes
public delegate bool DuplicateObjectHandler(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition);
public delegate bool EditObjectHandler(UUID objectID, UUID editorID, Scene scene);
public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene);
public delegate bool ViewObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene);
public delegate bool MoveObjectHandler(UUID objectID, UUID moverID, Scene scene);
public delegate bool ObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene);
public delegate bool ReturnObjectsHandler(ILandObject land, UUID user, List<SceneObjectGroup> objects, Scene scene);
@@ -116,6 +117,7 @@ namespace OpenSim.Region.Framework.Scenes
public event DuplicateObjectHandler OnDuplicateObject;
public event EditObjectHandler OnEditObject;
public event EditObjectInventoryHandler OnEditObjectInventory;
public event ViewObjectInventoryHandler OnViewObjectInventory;
public event MoveObjectHandler OnMoveObject;
public event ObjectEntryHandler OnObjectEntry;
public event ReturnObjectsHandler OnReturnObjects;
@@ -401,6 +403,21 @@ namespace OpenSim.Region.Framework.Scenes
return true;
}
public bool CanViewObjectInventory(UUID objectID, UUID editorID)
{
ViewObjectInventoryHandler handler = OnViewObjectInventory;
if (handler != null)
{
Delegate[] list = handler.GetInvocationList();
foreach (ViewObjectInventoryHandler h in list)
{
if (h(objectID, editorID, m_scene) == false)
return false;
}
}
return true;
}
#endregion
#region MOVE OBJECT

View File

@@ -84,6 +84,7 @@ namespace OpenSim.Region.Framework.Scenes
// TODO: need to figure out how allow client agents but deny
// root agents when ACL denies access to root agent
public bool m_strictAccessControl = true;
public bool m_seeIntoBannedRegion = false;
public int MaxUndoCount = 5;
public bool LoginsDisabled = true;
public bool LoadingPrims;
@@ -102,6 +103,7 @@ namespace OpenSim.Region.Framework.Scenes
protected ModuleLoader m_moduleLoader;
protected AgentCircuitManager m_authenticateHandler;
protected SceneCommunicationService m_sceneGridService;
protected ISnmpModule m_snmpService = null;
protected ISimulationDataService m_SimulationDataService;
protected IEstateDataService m_EstateDataService;
@@ -149,7 +151,7 @@ namespace OpenSim.Region.Framework.Scenes
private int m_update_events = 1;
private int m_update_backup = 200;
private int m_update_terrain = 50;
// private int m_update_land = 1;
private int m_update_land = 10;
private int m_update_coarse_locations = 50;
private int frameMS;
@@ -163,6 +165,7 @@ namespace OpenSim.Region.Framework.Scenes
private int landMS;
private int lastCompletedFrame;
public bool CombineRegions = false;
private bool m_physics_enabled = true;
private bool m_scripts_enabled = true;
private string m_defaultScriptEngine;
@@ -171,6 +174,8 @@ namespace OpenSim.Region.Framework.Scenes
private volatile bool shuttingdown;
private int m_lastUpdate;
private int m_lastIncoming;
private int m_lastOutgoing;
private bool m_firstHeartbeat = true;
private object m_deleting_scene_object = new object();
@@ -222,6 +227,19 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_sceneGridService; }
}
public ISnmpModule SnmpService
{
get
{
if (m_snmpService == null)
{
m_snmpService = RequestModuleInterface<ISnmpModule>();
}
return m_snmpService;
}
}
public ISimulationDataService SimulationDataService
{
get
@@ -553,6 +571,8 @@ namespace OpenSim.Region.Framework.Scenes
m_regionName = m_regInfo.RegionName;
m_datastore = m_regInfo.DataStore;
m_lastUpdate = Util.EnvironmentTickCount();
m_lastIncoming = 0;
m_lastOutgoing = 0;
m_physicalPrim = physicalPrim;
m_seeIntoRegionFromNeighbor = SeeIntoRegionFromNeighbor;
@@ -566,6 +586,8 @@ namespace OpenSim.Region.Framework.Scenes
#region Region Settings
// Load region settings
m_regInfo.WindlightSettings = SimulationDataService.LoadRegionWindlightSettings(m_regInfo.RegionID);
m_regInfo.RegionSettings = simDataService.LoadRegionSettings(m_regInfo.RegionID);
if (estateDataService != null)
m_regInfo.EstateSettings = estateDataService.LoadEstateSettings(m_regInfo.RegionID, false);
@@ -625,9 +647,10 @@ namespace OpenSim.Region.Framework.Scenes
//Animation states
m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
// TODO: Change default to true once the feature is supported
m_usePreJump = startupConfig.GetBoolean("enableprejump", false);
m_usePreJump = startupConfig.GetBoolean("enableprejump", true);
m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
m_log.DebugFormat("[SCENE]: prejump is {0}", m_usePreJump ? "ON" : "OFF");
if (RegionInfo.NonphysPrimMax > 0)
{
m_maxNonphys = RegionInfo.NonphysPrimMax;
@@ -659,6 +682,7 @@ namespace OpenSim.Region.Framework.Scenes
m_persistAfter *= 10000000;
m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "XEngine");
m_log.InfoFormat("[SCENE]: Default script engine {0}", m_defaultScriptEngine);
IConfig packetConfig = m_config.Configs["PacketPool"];
if (packetConfig != null)
@@ -668,6 +692,8 @@ namespace OpenSim.Region.Framework.Scenes
}
m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
m_seeIntoBannedRegion = startupConfig.GetBoolean("SeeIntoBannedRegion", m_seeIntoBannedRegion);
CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false);
m_generateMaptiles = startupConfig.GetBoolean("GenerateMaptiles", true);
if (m_generateMaptiles)
@@ -692,9 +718,9 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
catch
catch (Exception e)
{
m_log.Warn("[SCENE]: Failed to load StartupConfig");
m_log.Error("[SCENE]: Failed to load StartupConfig: " + e.ToString());
}
#endregion Region Config
@@ -1065,7 +1091,9 @@ namespace OpenSim.Region.Framework.Scenes
//m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat);
if (HeartbeatThread != null)
{
m_log.ErrorFormat("[SCENE]: Restarting heartbeat thread because it hasn't reported in in region {0}", RegionInfo.RegionName);
HeartbeatThread.Abort();
Watchdog.RemoveThread(HeartbeatThread.ManagedThreadId);
HeartbeatThread = null;
}
m_lastUpdate = Util.EnvironmentTickCount();
@@ -1188,9 +1216,6 @@ namespace OpenSim.Region.Framework.Scenes
try
{
Update();
m_lastUpdate = Util.EnvironmentTickCount();
m_firstHeartbeat = false;
}
catch (ThreadAbortException)
{
@@ -1305,12 +1330,12 @@ namespace OpenSim.Region.Framework.Scenes
terrainMS = Util.EnvironmentTickCountSubtract(terMS);
}
//if (m_frame % m_update_land == 0)
//{
// int ldMS = Util.EnvironmentTickCount();
// UpdateLand();
// landMS = Util.EnvironmentTickCountSubtract(ldMS);
//}
if (m_frame % m_update_land == 0)
{
int ldMS = Util.EnvironmentTickCount();
UpdateLand();
landMS = Util.EnvironmentTickCountSubtract(ldMS);
}
frameMS = Util.EnvironmentTickCountSubtract(tmpFrameMS);
otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
@@ -1381,6 +1406,9 @@ namespace OpenSim.Region.Framework.Scenes
// Tell the watchdog that this thread is still alive
Watchdog.UpdateThread();
m_lastUpdate = Util.EnvironmentTickCount();
m_firstHeartbeat = false;
}
}
@@ -1400,9 +1428,9 @@ namespace OpenSim.Region.Framework.Scenes
private void CheckAtTargets()
{
Dictionary<UUID, SceneObjectGroup>.ValueCollection objs;
List<SceneObjectGroup> objs = new List<SceneObjectGroup>();
lock (m_groupsWithTargets)
objs = m_groupsWithTargets.Values;
objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values);
foreach (SceneObjectGroup entry in objs)
entry.checkAtTargets();
@@ -1736,14 +1764,24 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns></returns>
public Vector3 GetNewRezLocation(Vector3 RayStart, Vector3 RayEnd, UUID RayTargetID, Quaternion rot, byte bypassRayCast, byte RayEndIsIntersection, bool frontFacesOnly, Vector3 scale, bool FaceCenter)
{
float wheight = (float)RegionInfo.RegionSettings.WaterHeight;
Vector3 wpos = Vector3.Zero;
// Check for water surface intersection from above
if ( (RayStart.Z > wheight) && (RayEnd.Z < wheight) )
{
float ratio = (RayStart.Z - wheight) / (RayStart.Z - RayEnd.Z);
wpos.X = RayStart.X - (ratio * (RayStart.X - RayEnd.X));
wpos.Y = RayStart.Y - (ratio * (RayStart.Y - RayEnd.Y));
wpos.Z = wheight;
}
Vector3 pos = Vector3.Zero;
if (RayEndIsIntersection == (byte)1)
{
pos = RayEnd;
return pos;
}
if (RayTargetID != UUID.Zero)
else if (RayTargetID != UUID.Zero)
{
SceneObjectPart target = GetSceneObjectPart(RayTargetID);
@@ -1765,7 +1803,7 @@ namespace OpenSim.Region.Framework.Scenes
EntityIntersection ei = target.TestIntersectionOBB(NewRay, Quaternion.Identity, frontFacesOnly, FaceCenter);
// Un-comment out the following line to Get Raytrace results printed to the console.
// m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString());
// m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString());
float ScaleOffset = 0.5f;
// If we hit something
@@ -1788,13 +1826,10 @@ namespace OpenSim.Region.Framework.Scenes
//pos.Z -= 0.25F;
}
return pos;
}
else
{
// We don't have a target here, so we're going to raytrace all the objects in the scene.
EntityIntersection ei = m_sceneGraph.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection), true, false);
// Un-comment the following line to print the raytrace results to the console.
@@ -1803,13 +1838,12 @@ namespace OpenSim.Region.Framework.Scenes
if (ei.HitTF)
{
pos = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z);
} else
}
else
{
// fall back to our stupid functionality
pos = RayEnd;
}
return pos;
}
}
else
@@ -1820,8 +1854,12 @@ namespace OpenSim.Region.Framework.Scenes
//increase height so its above the ground.
//should be getting the normal of the ground at the rez point and using that?
pos.Z += scale.Z / 2f;
return pos;
// return pos;
}
// check against posible water intercept
if (wpos.Z > pos.Z) pos = wpos;
return pos;
}
@@ -1901,7 +1939,10 @@ namespace OpenSim.Region.Framework.Scenes
public bool AddRestoredSceneObject(
SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates)
{
return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, sendClientUpdates);
bool result = m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, sendClientUpdates);
if (result)
sceneObject.IsDeleted = false;
return result;
}
/// <summary>
@@ -1978,6 +2019,15 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
public void DeleteAllSceneObjects()
{
DeleteAllSceneObjects(false);
}
/// <summary>
/// Delete every object from the scene. This does not include attachments worn by avatars.
/// </summary>
public void DeleteAllSceneObjects(bool exceptNoCopy)
{
List<SceneObjectGroup> toReturn = new List<SceneObjectGroup>();
lock (Entities)
{
EntityBase[] entities = Entities.GetEntities();
@@ -1986,11 +2036,24 @@ namespace OpenSim.Region.Framework.Scenes
if (e is SceneObjectGroup)
{
SceneObjectGroup sog = (SceneObjectGroup)e;
if (!sog.IsAttachment)
DeleteSceneObject((SceneObjectGroup)e, false);
if (sog != null && !sog.IsAttachment)
{
if (!exceptNoCopy || ((sog.GetEffectivePermissions() & (uint)PermissionMask.Copy) != 0))
{
DeleteSceneObject((SceneObjectGroup)e, false);
}
else
{
toReturn.Add((SceneObjectGroup)e);
}
}
}
}
}
if (toReturn.Count > 0)
{
returnObjects(toReturn.ToArray(), UUID.Zero);
}
}
/// <summary>
@@ -2039,6 +2102,8 @@ namespace OpenSim.Region.Framework.Scenes
}
group.DeleteGroupFromScene(silent);
if (!silent)
SendKillObject(new List<uint>() { group.LocalId });
// m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID);
}
@@ -2369,6 +2434,12 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns>True if the SceneObjectGroup was added, False if it was not</returns>
public bool AddSceneObject(SceneObjectGroup sceneObject)
{
if (sceneObject.OwnerID == UUID.Zero)
{
m_log.ErrorFormat("[SCENE]: Owner ID for {0} was zero", sceneObject.UUID);
return false;
}
// If the user is banned, we won't let any of their objects
// enter. Period.
//
@@ -2416,15 +2487,28 @@ namespace OpenSim.Region.Framework.Scenes
if (AttachmentsModule != null)
AttachmentsModule.AttachObject(sp.ControllingClient, grp, 0, false);
m_log.DebugFormat("[SCENE]: Attachment {0} arrived and scene presence was found, attaching", sceneObject.UUID);
}
else
{
m_log.DebugFormat("[SCENE]: Attachment {0} arrived and scene presence was not found, setting to temp", sceneObject.UUID);
RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
RootPrim.AddFlag(PrimFlags.TemporaryOnRez);
}
if (sceneObject.OwnerID == UUID.Zero)
{
m_log.ErrorFormat("[SCENE]: Owner ID for {0} was zero after attachment processing. BUG!", sceneObject.UUID);
return false;
}
}
else
{
if (sceneObject.OwnerID == UUID.Zero)
{
m_log.ErrorFormat("[SCENE]: Owner ID for non-attachment {0} was zero", sceneObject.UUID);
return false;
}
AddRestoredSceneObject(sceneObject, true, false);
if (!Permissions.CanObjectEntry(sceneObject.UUID,
@@ -2536,12 +2620,19 @@ namespace OpenSim.Region.Framework.Scenes
}
}
if (GetScenePresence(client.AgentId) != null)
if (TryGetScenePresence(client.AgentId, out presence))
{
m_LastLogin = Util.EnvironmentTickCount();
EventManager.TriggerOnNewClient(client);
if (vialogin)
{
EventManager.TriggerOnClientLogin(client);
// Send initial parcel data
Vector3 pos = presence.AbsolutePosition;
ILandObject land = LandChannel.GetLandObject(pos.X, pos.Y);
land.SendLandUpdateToClient(presence.ControllingClient);
}
}
}
@@ -2592,19 +2683,12 @@ namespace OpenSim.Region.Framework.Scenes
// and the scene presence and the client, if they exist
try
{
// We need to wait for the client to make UDP contact first.
// It's the UDP contact that creates the scene presence
ScenePresence sp = WaitGetScenePresence(agentID);
ScenePresence sp = GetScenePresence(agentID);
PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
if (sp != null)
{
PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
sp.ControllingClient.Close();
}
else
{
m_log.WarnFormat("[SCENE]: Could not find scene presence for {0}", agentID);
}
// BANG! SLASH!
m_authenticateHandler.RemoveCircuit(agentID);
@@ -2704,6 +2788,7 @@ namespace OpenSim.Region.Framework.Scenes
client.OnFetchInventory += HandleFetchInventory;
client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
client.OnCopyInventoryItem += CopyInventoryItem;
client.OnMoveItemsAndLeaveCopy += MoveInventoryItemsLeaveCopy;
client.OnMoveInventoryItem += MoveInventoryItem;
client.OnRemoveInventoryItem += RemoveInventoryItem;
client.OnRemoveInventoryFolder += RemoveInventoryFolder;
@@ -2882,15 +2967,16 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
/// <param name="agentId">The avatar's Unique ID</param>
/// <param name="client">The IClientAPI for the client</param>
public virtual void TeleportClientHome(UUID agentId, IClientAPI client)
public virtual bool TeleportClientHome(UUID agentId, IClientAPI client)
{
if (m_teleportModule != null)
m_teleportModule.TeleportHome(agentId, client);
return m_teleportModule.TeleportHome(agentId, client);
else
{
m_log.DebugFormat("[SCENE]: Unable to teleport user home: no AgentTransferModule is active");
client.SendTeleportFailed("Unable to perform teleports on this simulator.");
}
return false;
}
/// <summary>
@@ -2989,6 +3075,16 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="flags"></param>
public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags)
{
//Add half the avatar's height so that the user doesn't fall through prims
ScenePresence presence;
if (TryGetScenePresence(remoteClient.AgentId, out presence))
{
if (presence.Appearance != null)
{
position.Z = position.Z + (presence.Appearance.AvatarHeight / 2);
}
}
if (GridUserService != null && GridUserService.SetHome(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt))
// FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.
m_dialogModule.SendAlertToUser(remoteClient, "Home position set.");
@@ -3082,7 +3178,9 @@ namespace OpenSim.Region.Framework.Scenes
regions.Remove(RegionInfo.RegionHandle);
m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
}
m_log.Debug("[Scene] Beginning ClientClosed");
m_eventManager.TriggerClientClosed(agentID, this);
m_log.Debug("[Scene] Finished ClientClosed");
}
catch (NullReferenceException)
{
@@ -3090,7 +3188,12 @@ namespace OpenSim.Region.Framework.Scenes
// Avatar is already disposed :/
}
m_log.Debug("[Scene] Beginning OnRemovePresence");
m_eventManager.TriggerOnRemovePresence(agentID);
m_log.Debug("[Scene] Finished OnRemovePresence");
if (avatar != null && (!avatar.IsChildAgent))
avatar.SaveChangedAttachments();
if (avatar != null && (!avatar.IsChildAgent))
avatar.SaveChangedAttachments();
@@ -3099,7 +3202,7 @@ namespace OpenSim.Region.Framework.Scenes
delegate(IClientAPI client)
{
//We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway
try { client.SendKillObject(avatar.RegionHandle, avatar.LocalId); }
try { client.SendKillObject(avatar.RegionHandle, new List<uint>() { avatar.LocalId}); }
catch (NullReferenceException) { }
});
@@ -3110,8 +3213,11 @@ namespace OpenSim.Region.Framework.Scenes
}
// Remove the avatar from the scene
m_log.Debug("[Scene] Begin RemoveScenePresence");
m_sceneGraph.RemoveScenePresence(agentID);
m_log.Debug("[Scene] Finished RemoveScenePresence. Removing the client manager");
m_clientManager.Remove(agentID);
m_log.Debug("[Scene] Removed the client manager. Firing avatar.close");
try
{
@@ -3125,9 +3231,10 @@ namespace OpenSim.Region.Framework.Scenes
{
m_log.Error("[SCENE] Scene.cs:RemoveClient exception: " + e.ToString());
}
m_log.Debug("[Scene] Done. Firing RemoveCircuit");
m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode);
CleanDroppedAttachments();
m_log.Debug("[Scene] The avatar has left the building");
//m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false));
//m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true));
}
@@ -3158,18 +3265,24 @@ namespace OpenSim.Region.Framework.Scenes
#region Entities
public void SendKillObject(uint localID)
public void SendKillObject(List<uint> localIDs)
{
SceneObjectPart part = GetSceneObjectPart(localID);
if (part != null) // It is a prim
List<uint> deleteIDs = new List<uint>();
foreach (uint localID in localIDs)
{
if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) // Valid
SceneObjectPart part = GetSceneObjectPart(localID);
if (part != null) // It is a prim
{
if (part.ParentGroup.RootPart != part) // Child part
return;
if (part.ParentGroup != null && !part.ParentGroup.IsDeleted) // Valid
{
if (part.ParentGroup.RootPart != part) // Child part
continue;
}
}
deleteIDs.Add(localID);
}
ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); });
ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, deleteIDs); });
}
#endregion
@@ -3187,7 +3300,6 @@ namespace OpenSim.Region.Framework.Scenes
//m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate;
//m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar;
m_sceneGridService.OnLogOffUser += HandleLogOffUserFromGrid;
m_sceneGridService.KiPrimitive += SendKillObject;
m_sceneGridService.OnGetLandData += GetLandData;
}
@@ -3196,7 +3308,6 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
public void UnRegisterRegionWithComms()
{
m_sceneGridService.KiPrimitive -= SendKillObject;
m_sceneGridService.OnLogOffUser -= HandleLogOffUserFromGrid;
//m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar;
//m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
@@ -3283,6 +3394,7 @@ namespace OpenSim.Region.Framework.Scenes
{
if (land != null && !TestLandRestrictions(agent, land, out reason))
{
m_log.DebugFormat("[CONNECTION BEGIN]: Denying access to {0} due to no land access", agent.AgentID.ToString());
return false;
}
}
@@ -3400,6 +3512,8 @@ namespace OpenSim.Region.Framework.Scenes
}
}
// Honor parcel landing type and position.
/*
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
if (land != null)
{
if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
@@ -3407,6 +3521,7 @@ namespace OpenSim.Region.Framework.Scenes
agent.startpos = land.LandData.UserLocation;
}
}
*/// This is now handled properly in ScenePresence.MakeRootAgent
}
return true;
@@ -3502,7 +3617,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_regInfo.EstateSettings != null)
{
if (m_regInfo.EstateSettings.IsBanned(agent.AgentID))
if ((!m_seeIntoBannedRegion) && m_regInfo.EstateSettings.IsBanned(agent.AgentID))
{
m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
@@ -3692,6 +3807,12 @@ namespace OpenSim.Region.Framework.Scenes
// We have to wait until the viewer contacts this region after receiving EAC.
// That calls AddNewClient, which finally creates the ScenePresence
if (m_regInfo.EstateSettings.IsBanned(cAgentData.AgentID))
{
m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: banned", cAgentData.AgentID);
return false;
}
ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2);
if (nearestParcel == null)
{
@@ -3699,6 +3820,14 @@ namespace OpenSim.Region.Framework.Scenes
return false;
}
int num = m_sceneGraph.GetNumberOfScenePresences();
if (num >= RegionInfo.RegionSettings.AgentLimit)
{
if (!Permissions.IsAdministrator(cAgentData.AgentID))
return false;
}
ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID);
if (childAgentUpdate != null)
@@ -3765,12 +3894,22 @@ namespace OpenSim.Region.Framework.Scenes
return false;
}
public bool IncomingCloseAgent(UUID agentID)
{
return IncomingCloseAgent(agentID, false);
}
public bool IncomingCloseChildAgent(UUID agentID)
{
return IncomingCloseAgent(agentID, true);
}
/// <summary>
/// Tell a single agent to disconnect from the region.
/// </summary>
/// <param name="regionHandle"></param>
/// <param name="agentID"></param>
public bool IncomingCloseAgent(UUID agentID)
/// <param name="childOnly"></param>
public bool IncomingCloseAgent(UUID agentID, bool childOnly)
{
//m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID);
@@ -3782,7 +3921,7 @@ namespace OpenSim.Region.Framework.Scenes
{
m_sceneGraph.removeUserCount(false);
}
else
else if (!childOnly)
{
m_sceneGraph.removeUserCount(true);
}
@@ -3798,9 +3937,12 @@ namespace OpenSim.Region.Framework.Scenes
}
else
presence.ControllingClient.SendShutdownConnectionNotice();
presence.ControllingClient.Close(false);
}
else if (!childOnly)
{
presence.ControllingClient.Close(true);
}
presence.ControllingClient.Close();
return true;
}
@@ -4408,34 +4550,66 @@ namespace OpenSim.Region.Framework.Scenes
SimulationDataService.RemoveObject(uuid, m_regInfo.RegionID);
}
public int GetHealth()
public int GetHealth(out int flags, out string message)
{
// Returns:
// 1 = sim is up and accepting http requests. The heartbeat has
// stopped and the sim is probably locked up, but a remote
// admin restart may succeed
//
//
// 2 = Sim is up and the heartbeat is running. The sim is likely
// usable for people within and logins _may_ work
// usable for people within
//
// 3 = We have seen a new user enter within the past 4 minutes
// 3 = Sim is up and one packet thread is running. Sim is
// unstable and will not accept new logins
//
// 4 = Sim is up and both packet threads are running. Sim is
// likely usable
//
// 5 = We have seen a new user enter within the past 4 minutes
// which can be seen as positive confirmation of sim health
//
flags = 0;
message = String.Empty;
CheckHeartbeat();
if (m_firstHeartbeat || (m_lastIncoming == 0 && m_lastOutgoing == 0))
{
// We're still starting
// 0 means "in startup", it can't happen another way, since
// to get here, we must be able to accept http connections
return 0;
}
int health=1; // Start at 1, means we're up
if ((Util.EnvironmentTickCountSubtract(m_lastUpdate)) < 1000)
if (Util.EnvironmentTickCountSubtract(m_lastUpdate) < 1000)
{
health+=1;
else
flags |= 1;
}
if (Util.EnvironmentTickCountSubtract(m_lastIncoming) < 1000)
{
health+=1;
flags |= 2;
}
if (Util.EnvironmentTickCountSubtract(m_lastOutgoing) < 1000)
{
health+=1;
flags |= 4;
}
if (flags != 7)
return health;
// A login in the last 4 mins? We can't be doing too badly
//
if ((Util.EnvironmentTickCountSubtract(m_LastLogin)) < 240000)
if (Util.EnvironmentTickCountSubtract(m_LastLogin) < 240000)
health++;
else
return health;
CheckHeartbeat();
return health;
}
@@ -4628,7 +4802,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_firstHeartbeat)
return;
if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 2000)
if (Util.EnvironmentTickCountSubtract(m_lastUpdate) > 10000)
StartTimer();
}
@@ -4886,8 +5060,17 @@ namespace OpenSim.Region.Framework.Scenes
{
float ominX, ominY, ominZ, omaxX, omaxY, omaxZ;
Vector3 vec = g.AbsolutePosition;
g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ);
ominX += vec.X;
omaxX += vec.X;
ominY += vec.Y;
omaxY += vec.Y;
ominZ += vec.Z;
omaxZ += vec.Z;
if (minX > ominX)
minX = ominX;
if (minY > ominY)
@@ -4957,10 +5140,28 @@ namespace OpenSim.Region.Framework.Scenes
});
}
foreach (SceneObjectGroup grp in objectsToDelete)
if (objectsToDelete.Count > 0)
{
m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID);
DeleteSceneObject(grp, true);
m_log.DebugFormat("[SCENE]: Starting delete of {0} dropped attachments", objectsToDelete.Count);
foreach (SceneObjectGroup grp in objectsToDelete)
{
m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID);
DeleteSceneObject(grp, true);
}
m_log.Debug("[SCENE]: Finished dropped attachment deletion");
}
}
public void ThreadAlive(int threadCode)
{
switch(threadCode)
{
case 1: // Incoming
m_lastIncoming = Util.EnvironmentTickCount();
break;
case 2: // Incoming
m_lastOutgoing = Util.EnvironmentTickCount();
break;
}
}

View File

@@ -44,8 +44,6 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
namespace OpenSim.Region.Framework.Scenes
{
public delegate void KiPrimitiveDelegate(uint localID);
public delegate void RemoveKnownRegionsFromAvatarList(UUID avatarID, List<ulong> regionlst);
/// <summary>
@@ -113,8 +111,6 @@ namespace OpenSim.Region.Framework.Scenes
// private LogOffUser handlerLogOffUser = null;
// private GetLandData handlerGetLandData = null; // OnGetLandData
public KiPrimitiveDelegate KiPrimitive;
public SceneCommunicationService()
{
}
@@ -168,7 +164,7 @@ namespace OpenSim.Region.Framework.Scenes
if (neighbour != null)
{
m_log.DebugFormat("[INTERGRID]: Successfully informed neighbour {0}-{1} that I'm here", x / Constants.RegionSize, y / Constants.RegionSize);
// m_log.DebugFormat("[INTERGRID]: Successfully informed neighbour {0}-{1} that I'm here", x / Constants.RegionSize, y / Constants.RegionSize);
m_scene.EventManager.TriggerOnRegionUp(neighbour);
}
else
@@ -183,7 +179,7 @@ namespace OpenSim.Region.Framework.Scenes
//m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName);
List<GridRegion> neighbours = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID);
m_log.DebugFormat("[INTERGRID]: Informing {0} neighbours that this region is up", neighbours.Count);
//m_log.DebugFormat("[INTERGRID]: Informing {0} neighbours that this region is up", neighbours.Count);
foreach (GridRegion n in neighbours)
{
InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync;
@@ -258,46 +254,42 @@ namespace OpenSim.Region.Framework.Scenes
}
//public delegate void SendCloseChildAgentDelegate(UUID agentID, ulong regionHandle);
//private void SendCloseChildAgentCompleted(IAsyncResult iar)
//{
// SendCloseChildAgentDelegate icon = (SendCloseChildAgentDelegate)iar.AsyncState;
// icon.EndInvoke(iar);
//}
public delegate void SendCloseChildAgentDelegate(UUID agentID, ulong regionHandle);
/// <summary>
/// Closes a child agent on a given region
/// This Closes child agents on neighboring regions
/// Calls an asynchronous method to do so.. so it doesn't lag the sim.
/// </summary>
protected void SendCloseChildAgent(UUID agentID, ulong regionHandle)
protected void SendCloseChildAgentAsync(UUID agentID, ulong regionHandle)
{
m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle);
//m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle);
// let's do our best, but there's not much we can do if the neighbour doesn't accept.
//m_commsProvider.InterRegion.TellRegionToCloseChildConnection(regionHandle, agentID);
uint x = 0, y = 0;
Utils.LongToUInts(regionHandle, out x, out y);
GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y);
m_scene.SimulationService.CloseAgent(destination, agentID);
m_scene.SimulationService.CloseChildAgent(destination, agentID);
}
private void SendCloseChildAgentCompleted(IAsyncResult iar)
{
SendCloseChildAgentDelegate icon = (SendCloseChildAgentDelegate)iar.AsyncState;
icon.EndInvoke(iar);
}
/// <summary>
/// Closes a child agents in a collection of regions. Does so asynchronously
/// so that the caller doesn't wait.
/// </summary>
/// <param name="agentID"></param>
/// <param name="regionslst"></param>
public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst)
{
Util.FireAndForget(delegate
foreach (ulong handle in regionslst)
{
foreach (ulong handle in regionslst)
{
SendCloseChildAgent(agentID, handle);
}
});
SendCloseChildAgentDelegate d = SendCloseChildAgentAsync;
d.BeginInvoke(agentID, handle,
SendCloseChildAgentCompleted,
d);
}
}
public List<GridRegion> RequestNamedRegions(string name, int maxNumber)
{
return m_scene.GridService.GetRegionsByName(UUID.Zero, name, maxNumber);

View File

@@ -43,6 +43,12 @@ namespace OpenSim.Region.Framework.Scenes
public delegate void ObjectDuplicateDelegate(EntityBase original, EntityBase clone);
public delegate void AttachToBackupDelegate(SceneObjectGroup sog);
public delegate void DetachFromBackupDelegate(SceneObjectGroup sog);
public delegate void ChangedBackupDelegate(SceneObjectGroup sog);
public delegate void ObjectCreateDelegate(EntityBase obj);
public delegate void ObjectDeleteDelegate(EntityBase obj);
@@ -61,6 +67,9 @@ namespace OpenSim.Region.Framework.Scenes
private PhysicsCrash handlerPhysicsCrash = null;
public event ObjectDuplicateDelegate OnObjectDuplicate;
public event AttachToBackupDelegate OnAttachToBackup;
public event DetachFromBackupDelegate OnDetachFromBackup;
public event ChangedBackupDelegate OnChangeBackup;
public event ObjectCreateDelegate OnObjectCreate;
public event ObjectDeleteDelegate OnObjectRemove;
@@ -68,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes
#region Fields
protected object m_presenceLock = new object();
protected OpenMetaverse.ReaderWriterLockSlim m_scenePresencesLock = new OpenMetaverse.ReaderWriterLockSlim();
protected Dictionary<UUID, ScenePresence> m_scenePresenceMap = new Dictionary<UUID, ScenePresence>();
protected List<ScenePresence> m_scenePresenceArray = new List<ScenePresence>();
@@ -124,13 +133,18 @@ namespace OpenSim.Region.Framework.Scenes
protected internal void Close()
{
lock (m_presenceLock)
m_scenePresencesLock.EnterWriteLock();
try
{
Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>();
List<ScenePresence> newlist = new List<ScenePresence>();
m_scenePresenceMap = newmap;
m_scenePresenceArray = newlist;
}
finally
{
m_scenePresencesLock.ExitWriteLock();
}
lock (SceneObjectGroupsByFullID)
SceneObjectGroupsByFullID.Clear();
@@ -259,6 +273,33 @@ namespace OpenSim.Region.Framework.Scenes
protected internal bool AddRestoredSceneObject(
SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates)
{
if (!m_parentScene.CombineRegions)
{
// KF: Check for out-of-region, move inside and make static.
Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
sceneObject.RootPart.GroupPosition.Y,
sceneObject.RootPart.GroupPosition.Z);
if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 ||
npos.X > Constants.RegionSize ||
npos.Y > Constants.RegionSize))
{
if (npos.X < 0.0) npos.X = 1.0f;
if (npos.Y < 0.0) npos.Y = 1.0f;
if (npos.Z < 0.0) npos.Z = 0.0f;
if (npos.X > Constants.RegionSize) npos.X = Constants.RegionSize - 1.0f;
if (npos.Y > Constants.RegionSize) npos.Y = Constants.RegionSize - 1.0f;
foreach (SceneObjectPart part in sceneObject.Parts)
{
part.GroupPosition = npos;
}
sceneObject.RootPart.Velocity = Vector3.Zero;
sceneObject.RootPart.AngularVelocity = Vector3.Zero;
sceneObject.RootPart.Acceleration = Vector3.Zero;
sceneObject.RootPart.Velocity = Vector3.Zero;
}
}
if (attachToBackup && (!alreadyPersisted))
{
sceneObject.ForceInventoryPersistence();
@@ -458,6 +499,30 @@ namespace OpenSim.Region.Framework.Scenes
m_updateList[obj.UUID] = obj;
}
public void FireAttachToBackup(SceneObjectGroup obj)
{
if (OnAttachToBackup != null)
{
OnAttachToBackup(obj);
}
}
public void FireDetachFromBackup(SceneObjectGroup obj)
{
if (OnDetachFromBackup != null)
{
OnDetachFromBackup(obj);
}
}
public void FireChangeBackup(SceneObjectGroup obj)
{
if (OnChangeBackup != null)
{
OnChangeBackup(obj);
}
}
/// <summary>
/// Process all pending updates
/// </summary>
@@ -592,7 +657,8 @@ namespace OpenSim.Region.Framework.Scenes
Entities[presence.UUID] = presence;
lock (m_presenceLock)
m_scenePresencesLock.EnterWriteLock();
try
{
Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
@@ -616,6 +682,10 @@ namespace OpenSim.Region.Framework.Scenes
m_scenePresenceMap = newmap;
m_scenePresenceArray = newlist;
}
finally
{
m_scenePresencesLock.ExitWriteLock();
}
}
/// <summary>
@@ -630,7 +700,8 @@ namespace OpenSim.Region.Framework.Scenes
agentID);
}
lock (m_presenceLock)
m_scenePresencesLock.EnterWriteLock();
try
{
Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
@@ -652,6 +723,10 @@ namespace OpenSim.Region.Framework.Scenes
m_log.WarnFormat("[SCENE]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
}
}
finally
{
m_scenePresencesLock.ExitWriteLock();
}
}
protected internal void SwapRootChildAgent(bool direction_RC_CR_T_F)
@@ -775,6 +850,11 @@ namespace OpenSim.Region.Framework.Scenes
return m_scenePresenceArray;
}
public int GetNumberOfScenePresences()
{
return m_scenePresenceArray.Count;
}
/// <summary>
/// Request a scene presence by UUID. Fast, indexed lookup.
/// </summary>
@@ -1068,9 +1148,11 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="action"></param>
protected internal void ForEachSOG(Action<SceneObjectGroup> action)
{
List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values);
foreach (SceneObjectGroup obj in objlist)
EntityBase[] objlist = Entities.GetAllByType<SceneObjectGroup>();
foreach (EntityBase ent in objlist)
{
SceneObjectGroup obj = (SceneObjectGroup)ent;
try
{
action(obj);
@@ -1281,8 +1363,13 @@ namespace OpenSim.Region.Framework.Scenes
{
if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
{
if (m_parentScene.AttachmentsModule != null)
m_parentScene.AttachmentsModule.UpdateAttachmentPosition(group, pos);
// Set the new attachment point data in the object
byte attachmentPoint = group.GetAttachmentPoint();
group.UpdateGroupPosition(pos);
group.RootPart.IsAttachment = false;
group.AbsolutePosition = group.RootPart.AttachedPos;
group.SetAttachmentPoint(attachmentPoint);
group.HasGroupChanged = true;
}
else
{
@@ -1526,10 +1613,13 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="childPrims"></param>
protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children)
{
SceneObjectGroup parentGroup = root.ParentGroup;
if (parentGroup == null) return;
Monitor.Enter(m_updateLock);
try
{
SceneObjectGroup parentGroup = root.ParentGroup;
parentGroup.areUpdatesSuspended = true;
List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>();
if (parentGroup != null)
@@ -1541,11 +1631,6 @@ namespace OpenSim.Region.Framework.Scenes
if (child != null)
{
// Make sure no child prim is set for sale
// So that, on delink, no prims are unwittingly
// left for sale and sold off
child.RootPart.ObjectSaleType = 0;
child.RootPart.SalePrice = 10;
childGroups.Add(child);
}
}
@@ -1568,12 +1653,13 @@ namespace OpenSim.Region.Framework.Scenes
// occur on link to invoke this elsewhere (such as object selection)
parentGroup.RootPart.CreateSelected = true;
parentGroup.TriggerScriptChangedEvent(Changed.LINK);
parentGroup.HasGroupChanged = true;
parentGroup.ScheduleGroupForFullUpdate();
}
finally
{
parentGroup.areUpdatesSuspended = false;
parentGroup.HasGroupChanged = true;
parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true);
parentGroup.ScheduleGroupForFullUpdate();
Monitor.Exit(m_updateLock);
}
}
@@ -1605,21 +1691,24 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectGroup group = part.ParentGroup;
if (!affectedGroups.Contains(group))
{
group.areUpdatesSuspended = true;
affectedGroups.Add(group);
}
}
}
}
foreach (SceneObjectPart child in childParts)
if (childParts.Count > 0)
{
// Unlink all child parts from their groups
//
child.ParentGroup.DelinkFromGroup(child, true);
// These are not in affected groups and will not be
// handled further. Do the honors here.
child.ParentGroup.HasGroupChanged = true;
child.ParentGroup.ScheduleGroupForFullUpdate();
foreach (SceneObjectPart child in childParts)
{
// Unlink all child parts from their groups
//
child.ParentGroup.DelinkFromGroup(child, true);
child.ParentGroup.HasGroupChanged = true;
child.ParentGroup.ScheduleGroupForFullUpdate();
}
}
foreach (SceneObjectPart root in rootParts)
@@ -1629,65 +1718,83 @@ namespace OpenSim.Region.Framework.Scenes
// However, editing linked parts and unlinking may be different
//
SceneObjectGroup group = root.ParentGroup;
group.areUpdatesSuspended = true;
List<SceneObjectPart> newSet = new List<SceneObjectPart>(group.Parts);
int numChildren = newSet.Count;
if (numChildren == 1)
break;
// If there are prims left in a link set, but the root is
// slated for unlink, we need to do this
// Unlink the remaining set
//
if (numChildren != 1)
bool sendEventsToRemainder = true;
if (numChildren > 1)
sendEventsToRemainder = false;
foreach (SceneObjectPart p in newSet)
{
// Unlink the remaining set
//
bool sendEventsToRemainder = true;
if (numChildren > 1)
sendEventsToRemainder = false;
foreach (SceneObjectPart p in newSet)
if (p != group.RootPart)
{
if (p != group.RootPart)
group.DelinkFromGroup(p, sendEventsToRemainder);
}
// If there is more than one prim remaining, we
// need to re-link
//
if (numChildren > 2)
{
// Remove old root
//
if (newSet.Contains(root))
newSet.Remove(root);
// Preserve link ordering
//
newSet.Sort(delegate (SceneObjectPart a, SceneObjectPart b)
group.DelinkFromGroup(p, sendEventsToRemainder);
if (numChildren > 2)
{
return a.LinkNum.CompareTo(b.LinkNum);
});
// Determine new root
//
SceneObjectPart newRoot = newSet[0];
newSet.RemoveAt(0);
foreach (SceneObjectPart newChild in newSet)
newChild.UpdateFlag = 0;
LinkObjects(newRoot, newSet);
if (!affectedGroups.Contains(newRoot.ParentGroup))
affectedGroups.Add(newRoot.ParentGroup);
p.ParentGroup.areUpdatesSuspended = true;
}
else
{
p.ParentGroup.HasGroupChanged = true;
p.ParentGroup.ScheduleGroupForFullUpdate();
}
}
}
// If there is more than one prim remaining, we
// need to re-link
//
if (numChildren > 2)
{
// Remove old root
//
if (newSet.Contains(root))
newSet.Remove(root);
// Preserve link ordering
//
newSet.Sort(delegate (SceneObjectPart a, SceneObjectPart b)
{
return a.LinkNum.CompareTo(b.LinkNum);
});
// Determine new root
//
SceneObjectPart newRoot = newSet[0];
newSet.RemoveAt(0);
foreach (SceneObjectPart newChild in newSet)
newChild.UpdateFlag = 0;
newRoot.ParentGroup.areUpdatesSuspended = true;
LinkObjects(newRoot, newSet);
if (!affectedGroups.Contains(newRoot.ParentGroup))
affectedGroups.Add(newRoot.ParentGroup);
}
}
// Finally, trigger events in the roots
//
foreach (SceneObjectGroup g in affectedGroups)
{
// Child prims that have been unlinked and deleted will
// return unless the root is deleted. This will remove them
// from the database. They will be rewritten immediately,
// minus the rows for the unlinked child prims.
m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID);
g.TriggerScriptChangedEvent(Changed.LINK);
g.HasGroupChanged = true; // Persist
g.areUpdatesSuspended = false;
g.ScheduleGroupForFullUpdate();
}
}
@@ -1802,9 +1909,6 @@ namespace OpenSim.Region.Framework.Scenes
child.ApplyNextOwnerPermissions();
}
}
copy.RootPart.ObjectSaleType = 0;
copy.RootPart.SalePrice = 10;
}
Entities.Add(copy);

View File

@@ -69,10 +69,6 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Stop the scripts contained in all the prims in this group
/// </summary>
/// <param name="sceneObjectBeingDeleted">
/// Should be true if these scripts are being removed because the scene
/// object is being deleted. This will prevent spurious updates to the client.
/// </param>
public void RemoveScriptInstances(bool sceneObjectBeingDeleted)
{
SceneObjectPart[] parts = m_parts.GetArray();
@@ -376,6 +372,9 @@ namespace OpenSim.Region.Framework.Scenes
public void ResumeScripts()
{
if (m_scene.RegionInfo.RegionSettings.DisableScripts)
return;
SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++)
parts[i].Inventory.ResumeScripts();

File diff suppressed because it is too large Load Diff

View File

@@ -61,7 +61,8 @@ namespace OpenSim.Region.Framework.Scenes
TELEPORT = 512,
REGION_RESTART = 1024,
MEDIA = 2048,
ANIMATION = 16384
ANIMATION = 16384,
POSITION = 32768
}
// I don't really know where to put this except here.
@@ -145,10 +146,10 @@ namespace OpenSim.Region.Framework.Scenes
public Vector3 StatusSandboxPos;
// TODO: This needs to be persisted in next XML version update!
public readonly int[] PayPrice = {-2,-2,-2,-2,-2};
[XmlIgnore]
public int[] PayPrice = {-2,-2,-2,-2,-2};
[XmlIgnore]
public PhysicsActor PhysActor
{
get { return m_physActor; }
@@ -190,7 +191,15 @@ namespace OpenSim.Region.Framework.Scenes
public UUID FromFolderID;
// The following two are to hold the attachment data
// while an object is inworld
[XmlIgnore]
public byte AttachPoint = 0;
[XmlIgnore]
public Vector3 AttachOffset = Vector3.Zero;
[XmlIgnore]
public int STATUS_ROTATE_X;
@@ -285,6 +294,7 @@ namespace OpenSim.Region.Framework.Scenes
private Quaternion m_sitTargetOrientation = Quaternion.Identity;
private Vector3 m_sitTargetPosition;
private string m_sitAnimation = "SIT";
private bool m_occupied; // KF if any av is sitting on this prim
private string m_text = String.Empty;
private string m_touchName = String.Empty;
private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5);
@@ -374,7 +384,7 @@ namespace OpenSim.Region.Framework.Scenes
UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
Quaternion rotationOffset, Vector3 offsetPosition)
{
m_name = "Primitive";
m_name = "Object";
Rezzed = DateTime.UtcNow;
_creationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
@@ -430,7 +440,7 @@ namespace OpenSim.Region.Framework.Scenes
private uint _ownerMask = (uint)PermissionMask.All;
private uint _groupMask = (uint)PermissionMask.None;
private uint _everyoneMask = (uint)PermissionMask.None;
private uint _nextOwnerMask = (uint)PermissionMask.All;
private uint _nextOwnerMask = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer);
private PrimFlags _flags = PrimFlags.None;
private DateTime m_expires;
private DateTime m_rezzed;
@@ -529,12 +539,16 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <value>
/// Access should be via Inventory directly - this property temporarily remains for xml serialization purposes
/// Get the inventory list
/// </value>
public TaskInventoryDictionary TaskInventory
{
get { return m_inventory.Items; }
set { m_inventory.Items = value; }
get {
return m_inventory.Items;
}
set {
m_inventory.Items = value;
}
}
/// <summary>
@@ -674,14 +688,12 @@ namespace OpenSim.Region.Framework.Scenes
set { m_LoopSoundSlavePrims = value; }
}
public Byte[] TextureAnimation
{
get { return m_TextureAnimation; }
set { m_TextureAnimation = value; }
}
public Byte[] ParticleSystem
{
get { return m_particleSystem; }
@@ -718,9 +730,11 @@ namespace OpenSim.Region.Framework.Scenes
{
// If this is a linkset, we don't want the physics engine mucking up our group position here.
PhysicsActor actor = PhysActor;
if (actor != null && _parentID == 0)
if (_parentID == 0)
{
m_groupPosition = actor.Position;
if (actor != null)
m_groupPosition = actor.Position;
return m_groupPosition;
}
if (IsAttachment)
@@ -730,12 +744,14 @@ namespace OpenSim.Region.Framework.Scenes
return sp.AbsolutePosition;
}
// use root prim's group position. Physics may have updated it
if (ParentGroup.RootPart != this)
m_groupPosition = ParentGroup.RootPart.GroupPosition;
return m_groupPosition;
}
set
{
m_groupPosition = value;
PhysicsActor actor = PhysActor;
if (actor != null)
{
@@ -755,25 +771,13 @@ namespace OpenSim.Region.Framework.Scenes
// Tell the physics engines that this prim changed.
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
}
catch (Exception e)
{
m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
}
}
// TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too
if (m_sitTargetAvatar != UUID.Zero)
{
if (m_parentGroup != null) // TODO can there be a SOP without a SOG?
{
ScenePresence avatar;
if (m_parentGroup.Scene.TryGetScenePresence(m_sitTargetAvatar, out avatar))
{
avatar.ParentPosition = GetWorldPosition();
}
}
}
}
}
@@ -782,7 +786,8 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_offsetPosition; }
set
{
StoreUndoState();
Vector3 oldpos = m_offsetPosition;
StoreUndoState(UndoType.STATE_PRIM_POSITION);
m_offsetPosition = value;
if (ParentGroup != null && !ParentGroup.IsDeleted)
@@ -796,7 +801,22 @@ namespace OpenSim.Region.Framework.Scenes
// Tell the physics engines that this prim changed.
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
}
if (!m_parentGroup.m_dupeInProgress)
{
List<ScenePresence> avs = ParentGroup.GetLinkedAvatars();
foreach (ScenePresence av in avs)
{
if (av.LinkedPrim == m_uuid)
{
Vector3 offset = (m_offsetPosition - oldpos);
av.OffsetPosition += offset;
av.SendAvatarDataToAllAgents();
}
}
}
}
TriggerScriptChangedEvent(Changed.POSITION);
}
}
@@ -838,7 +858,7 @@ namespace OpenSim.Region.Framework.Scenes
set
{
StoreUndoState();
StoreUndoState(UndoType.STATE_PRIM_ROTATION);
m_rotationOffset = value;
PhysicsActor actor = PhysActor;
@@ -922,7 +942,16 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary></summary>
public Vector3 Acceleration
{
get { return m_acceleration; }
get
{
PhysicsActor actor = PhysActor;
if (actor != null)
{
m_acceleration = actor.Acceleration;
}
return m_acceleration;
}
set { m_acceleration = value; }
}
@@ -1013,7 +1042,7 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_shape.Scale; }
set
{
StoreUndoState();
StoreUndoState(UndoType.STATE_PRIM_SCALE);
if (m_shape != null)
{
m_shape.Scale = value;
@@ -1079,11 +1108,10 @@ namespace OpenSim.Region.Framework.Scenes
public Vector3 AbsolutePosition
{
get {
if (IsAttachment)
return GroupPosition;
return m_offsetPosition + m_groupPosition; }
get
{
return GroupPosition + (m_offsetPosition * ParentGroup.RootPart.RotationOffset);
}
}
public SceneObjectGroup ParentGroup
@@ -1242,6 +1270,13 @@ namespace OpenSim.Region.Framework.Scenes
_flags = value;
}
}
[XmlIgnore]
public bool IsOccupied // KF If an av is sittingon this prim
{
get { return m_occupied; }
set { m_occupied = value; }
}
public UUID SitTargetAvatar
@@ -1317,14 +1352,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
/// <summary>
/// Clear all pending updates of parts to clients
/// </summary>
private void ClearUpdateSchedule()
{
m_updateFlag = 0;
}
private void SendObjectPropertiesToClient(UUID AgentID)
{
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
@@ -1575,14 +1602,22 @@ namespace OpenSim.Region.Framework.Scenes
// or flexible
if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible))
{
PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
string.Format("{0}/{1}", Name, UUID),
Shape,
AbsolutePosition,
Scale,
RotationOffset,
RigidBody);
try
{
PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
string.Format("{0}/{1}", Name, UUID),
Shape,
AbsolutePosition,
Scale,
RotationOffset,
RigidBody);
PhysActor.SetMaterial(Material);
}
catch
{
m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom.", m_uuid);
PhysActor = null;
}
// Basic Physics returns null.. joy joy joy.
if (PhysActor != null)
{
@@ -1610,7 +1645,7 @@ namespace OpenSim.Region.Framework.Scenes
{
m_redo.Clear();
}
StoreUndoState();
StoreUndoState(UndoType.STATE_ALL);
}
public byte ConvertScriptUintToByte(uint indata)
@@ -1679,6 +1714,9 @@ namespace OpenSim.Region.Framework.Scenes
// Move afterwards ResetIDs as it clears the localID
dupe.LocalId = localID;
if(dupe.PhysActor != null)
dupe.PhysActor.LocalID = localID;
// This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
dupe._lastOwnerID = OwnerID;
@@ -1722,7 +1760,7 @@ namespace OpenSim.Region.Framework.Scenes
PrimitiveBaseShape shape = PrimitiveBaseShape.Create();
part.Shape = shape;
part.Name = "Primitive";
part.Name = "Object";
part._ownerID = UUID.Random();
return part;
@@ -2082,12 +2120,17 @@ namespace OpenSim.Region.Framework.Scenes
public Vector3 GetWorldPosition()
{
Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
Vector3 axPos = OffsetPosition;
axPos *= parentRot;
Vector3 translationOffsetPosition = axPos;
return GroupPosition + translationOffsetPosition;
if(_parentID == 0)
{
return GroupPosition;
}
else
{
return ParentGroup.AbsolutePosition + translationOffsetPosition; //KF: Fix child prim position
}
}
/// <summary>
@@ -2098,7 +2141,7 @@ namespace OpenSim.Region.Framework.Scenes
{
Quaternion newRot;
if (this.LinkNum == 0)
if (this.LinkNum < 2) //KF Single or root prim
{
newRot = RotationOffset;
}
@@ -2744,17 +2787,18 @@ namespace OpenSim.Region.Framework.Scenes
//Trys to fetch sound id from prim's inventory.
//Prim's inventory doesn't support non script items yet
lock (TaskInventory)
TaskInventory.LockItemsForRead(true);
foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory)
{
foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory)
if (item.Value.Name == sound)
{
if (item.Value.Name == sound)
{
soundID = item.Value.ItemID;
break;
}
soundID = item.Value.ItemID;
break;
}
}
TaskInventory.LockItemsForRead(false);
}
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
@@ -2814,7 +2858,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="scale"></param>
public void Resize(Vector3 scale)
{
StoreUndoState();
StoreUndoState(UndoType.STATE_PRIM_SCALE);
m_shape.Scale = scale;
ParentGroup.HasGroupChanged = true;
@@ -2823,38 +2867,7 @@ namespace OpenSim.Region.Framework.Scenes
public void RotLookAt(Quaternion target, float strength, float damping)
{
rotLookAt(target, strength, damping);
}
public void rotLookAt(Quaternion target, float strength, float damping)
{
if (IsAttachment)
{
/*
ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
if (avatar != null)
{
Rotate the Av?
} */
}
else
{
APIDDamp = damping;
APIDStrength = strength;
APIDTarget = target;
}
}
public void startLookAt(Quaternion rot, float damp, float strength)
{
APIDDamp = damp;
APIDStrength = strength;
APIDTarget = rot;
}
public void stopLookAt()
{
APIDTarget = Quaternion.Identity;
m_parentGroup.rotLookAt(target, strength, damping); // This calls method in SceneObjectGroup.
}
/// <summary>
@@ -2866,7 +2879,10 @@ namespace OpenSim.Region.Framework.Scenes
if (m_parentGroup != null)
{
m_parentGroup.QueueForUpdateCheck();
if (!m_parentGroup.areUpdatesSuspended)
{
m_parentGroup.QueueForUpdateCheck();
}
}
int timeNow = Util.UnixTimeSinceEpoch();
@@ -3083,8 +3099,8 @@ namespace OpenSim.Region.Framework.Scenes
{
const float ROTATION_TOLERANCE = 0.01f;
const float VELOCITY_TOLERANCE = 0.001f;
const float POSITION_TOLERANCE = 0.05f;
const int TIME_MS_TOLERANCE = 3000;
const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary
const int TIME_MS_TOLERANCE = 200; //llSetPos has a 200ms delay. This should NOT be 3 seconds.
if (m_updateFlag == 1)
{
@@ -3098,7 +3114,7 @@ namespace OpenSim.Region.Framework.Scenes
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
{
AddTerseUpdateToAllAvatars();
ClearUpdateSchedule();
// This causes the Scene to 'poll' physical objects every couple of frames
// bad, so it's been replaced by an event driven method.
@@ -3116,16 +3132,18 @@ namespace OpenSim.Region.Framework.Scenes
m_lastAngularVelocity = AngularVelocity;
m_lastTerseSent = Environment.TickCount;
}
//Moved this outside of the if clause so updates don't get blocked.. *sigh*
m_updateFlag = 0; //Why were we calling a function to do this? Inefficient! *screams*
}
else
{
if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes
{
AddFullUpdateToAllAvatars();
ClearUpdateSchedule();
m_updateFlag = 0; //Same here
}
}
ClearUpdateSchedule();
m_updateFlag = 0;
}
/// <summary>
@@ -3153,17 +3171,16 @@ namespace OpenSim.Region.Framework.Scenes
if (!UUID.TryParse(sound, out soundID))
{
// search sound file from inventory
lock (TaskInventory)
TaskInventory.LockItemsForRead(true);
foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory)
{
foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory)
if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound)
{
if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound)
{
soundID = item.Value.ItemID;
break;
}
soundID = item.Value.ItemID;
break;
}
}
TaskInventory.LockItemsForRead(false);
}
if (soundID == UUID.Zero)
@@ -3593,7 +3610,7 @@ namespace OpenSim.Region.Framework.Scenes
public void StopLookAt()
{
m_parentGroup.stopLookAt();
m_parentGroup.stopLookAt(); // This calls method in SceneObjectGroup.
m_parentGroup.ScheduleGroupForTerseUpdate();
}
@@ -3620,10 +3637,9 @@ namespace OpenSim.Region.Framework.Scenes
m_parentGroup.ScheduleGroupForTerseUpdate();
//m_parentGroup.ScheduleGroupForFullUpdate();
}
public void StoreUndoState()
public void StoreUndoState(UndoType type)
{
if (!Undoing)
if (!Undoing && (m_parentGroup == null || m_parentGroup.RootPart == null || !m_parentGroup.RootPart.Undoing))
{
if (!IgnoreUndoUpdate)
{
@@ -3634,17 +3650,25 @@ namespace OpenSim.Region.Framework.Scenes
if (m_undo.Count > 0)
{
UndoState last = m_undo.Peek();
if (last != null)
{
if (last.Compare(this))
return;
}
}
if (m_parentGroup.GetSceneMaxUndo() > 0)
{
UndoState nUndo = new UndoState(this);
UndoState lastUndo = m_undo.Peek();
UndoState nUndo = new UndoState(this, type);
if (lastUndo != null)
{
TimeSpan ts = DateTime.Now.Subtract(lastUndo.LastUpdated);
if (ts.TotalMilliseconds < 500)
{
//Delete the last entry since it was less than 500 milliseconds ago
nUndo.Merge(lastUndo);
m_undo.Pop();
}
}
m_undo.Push(nUndo);
}
@@ -4121,11 +4145,13 @@ namespace OpenSim.Region.Framework.Scenes
if (m_undo.Count > 0)
{
UndoState nUndo = null;
UndoState goback = m_undo.Pop();
if (m_parentGroup.GetSceneMaxUndo() > 0)
{
nUndo = new UndoState(this);
nUndo = new UndoState(this, goback.Type);
}
UndoState goback = m_undo.Pop();
if (goback != null)
{
goback.PlaybackState(this);
@@ -4140,13 +4166,13 @@ namespace OpenSim.Region.Framework.Scenes
{
lock (m_redo)
{
UndoState gofwd = m_redo.Pop();
if (m_parentGroup.GetSceneMaxUndo() > 0)
{
UndoState nUndo = new UndoState(this);
UndoState nUndo = new UndoState(this, gofwd.Type);
m_undo.Push(nUndo);
}
UndoState gofwd = m_redo.Pop();
if (gofwd != null)
gofwd.PlayfwdState(this);
}
@@ -4410,6 +4436,7 @@ namespace OpenSim.Region.Framework.Scenes
Scale,
RotationOffset,
UsePhysics);
PhysActor.SetMaterial(Material);
pa = PhysActor;
if (pa != null)
@@ -4595,8 +4622,9 @@ namespace OpenSim.Region.Framework.Scenes
{
m_shape.TextureEntry = textureEntry;
TriggerScriptChangedEvent(Changed.TEXTURE);
m_updateFlag = 1;
ParentGroup.HasGroupChanged = true;
//This is madness..
//ParentGroup.ScheduleGroupForFullUpdate();
//This is sparta
@@ -4829,5 +4857,17 @@ namespace OpenSim.Region.Framework.Scenes
Color color = Color;
return new Color4(color.R, color.G, color.B, (byte)(0xFF - color.A));
}
public void ResetOwnerChangeFlag()
{
List<UUID> inv = Inventory.GetInventoryList();
foreach (UUID itemID in inv)
{
TaskInventoryItem item = Inventory.GetInventoryItem(itemID);
item.OwnerChanged = false;
Inventory.UpdateInventoryItem(item, false, false);
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More