aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-07-09Do not allow a script to attach a prim if its being sat upon.Justin Clark-Casey (justincc)2-1/+40
This prevents a stack overflow where a get position on the avatar will refer to the attachment which will in turn refer back to the avatar. This required recording of all sitting avatars on a prim which is done separately from recording the sit target avatar. Recording HashSet is null if there are no sitting avatars in order to save memory.
2012-07-06minor: Remove some wrong comments in attachments regression testsJustin Clark-Casey (justincc)1-2/+0
2012-07-06Add assert to attachment regression tests to check that number of objects in ↵Justin Clark-Casey (justincc)1-0/+14
the scene graph
2012-07-06refactor: extract method UpdateUserInventoryWithAttachment() from ↵Justin Clark-Casey (justincc)1-29/+38
AttachObject() for better code comprehension
2012-07-05Add OSSL function osForceAttachToAvatarFromInventory()Justin Clark-Casey (justincc)1-1/+1
This works like osForceAttachToAvatar() but allows an object to be directly specified from the script object's inventory rather than forcing it to be rezzed in the scene first. Still only attaches objects to the owner of the script. This allows one to bypass the complicated co-ordination of first rezzing objects in the scene before attaching them. Threat level high.
2012-06-28Change AttachmentsModule.DetachSingleAttachmentToInv() to accept a SOG ↵Justin Clark-Casey (justincc)2-40/+45
directly instead of an item ID to then shuffle through attachments, saving CPU busywork. Almost all callers already had the sog to hand. Still checking that it's really an attachment, but now by inspecting SOG.AttachedAvatar
2012-06-28Rather than iterating through all SOGs in the scene looking for the one that ↵Justin Clark-Casey (justincc)1-24/+17
matches out fromItemID on detach, go through the agent's attachment sog list instead.
2012-06-28Remove code that tried to delete an attachment back to inventory if ↵Justin Clark-Casey (justincc)1-6/+1
RezSingleAttachmentFromInventoryInternal() returned null. null would only ever be returned if the item couldn't be located within inventory and this would happen immediately. In this case, derezzing wouldn't work anyway since there is no item to derez.
2012-06-27Fix issue in InventoryArchiveTestCase where it didn't call down to ↵Justin Clark-Casey (justincc)1-1/+2
OpenSimTestCase.SetUp()
2012-06-27refactor: Move ScenePresence <-> AgentData attachments copying code into ↵Justin Clark-Casey (justincc)1-0/+50
AttachmentsModule.
2012-06-27Automatically disable log4net before each regression test so that logging is ↵Justin Clark-Casey (justincc)2-4/+2
confined to a single test if it's turned on. This involves making test classes inherit from a common OpenSimTestCase. This will be applied to more classes as required.
2012-06-26refactor: Remove unnecessary AttachmentModuleTests.m_userId in favour of ↵Justin Clark-Casey (justincc)1-40/+26
local variables
2012-06-26refactor: Use local attachment module variables instead of global m_attMod.Justin Clark-Casey (justincc)1-11/+10
This also avoids confusion between tests where one sets up m_attMod and another accidentally uses it after failing to set one up itself.
2012-06-26refactor: make m_presence a local variable in all AttachmentsModuleTests ↵Justin Clark-Casey (justincc)1-26/+25
since it doesn't need to be global and some tests set up more than one sp
2012-06-26Add regression test to check that attachments in source region are deleting ↵Justin Clark-Casey (justincc)1-18/+115
when an agent teleports to a neighbouring region
2012-06-25minor: update currently commented out log message at top of ↵Justin Clark-Casey (justincc)1-1/+3
AvatarFactoryModule.SetAppearance() for future use
2012-06-25When attachments are being saved and deleted for a closing root agent, ↵Justin Clark-Casey (justincc)1-12/+21
delete first to avoid a hud race condition with update threads. If delete doesn't occur first then the update thread can outrace the IsAttachment = false necessary to save attachments and send hud artifacts to other viewers.
2012-06-25In AttachmentsModule.DetachSingleAttachmentToInvInternal(), remove ↵Justin Clark-Casey (justincc)1-1/+1
attachment before changing properties for correct inventory serialization. Serialization of attachments requires IsAttachment = false so that correct positions are serialized instead of avatar position. However, doing this when a hud is still attached allows race conditions with update threads, resulting in hud artifacts on other viewers. This change sets SOG.IsDeleted before serialization changes take place (IsDeleted itself is not a serialized property). LLClientView then screens out any deleted SOGs before sending updates to viewers.
2012-06-22Stop flicking IsAttachment false and then true in ↵Justin Clark-Casey (justincc)1-10/+0
AttachmentsModule.UpdateAttachmentPosition() in order to avoid a hud update race condition. Previously, setting IsAttachment to false then true was necessary to serialize the updated attachment object information. However, UpdateAttachmentPosition no longer does this update. Whilst IsAttachment is set to false there is a race condition where the update thread can wrongly send hud object updates to clients that do not own the hud, resulting in screen artifacts.
2012-06-22refactor AttachmentsModule tests to use a common method for standard ↵Justin Clark-Casey (justincc)1-70/+69
attachment item setup
2012-06-22Add regression test for updating attachment positionJustin Clark-Casey (justincc)1-0/+30
2012-06-14correct wrong incomplete comment from previous commit 3c3ea19 in ↵Justin Clark-Casey (justincc)1-1/+2
AttachmentsModule
2012-06-14Fix a bug where scene objects attached as HUDs through scripts would not ↵Justin Clark-Casey (justincc)1-0/+13
disappear for other avatars. We do this by sending a kill message for that object to all other avatars apart from the one that has the hud.
2012-06-04Remove the "Profile" config as it's covered by the replaceable interfaceMelanie1-8/+0
2012-05-29Add console command "teleport user" to allow teleport from the region consoleJustin Clark-Casey (justincc)1-0/+189
See "help teleport user" on the console for more details
2012-05-25Resolve some mono compiler warnings.Justin Clark-Casey (justincc)2-6/+9
2012-05-23Fetch the dialog module reference in AttachmentsModule in RegionLoaded() not ↵Justin Clark-Casey (justincc)1-1/+1
AddRegion() The reference is not guaranteed to be there when AddRegion() is called but will definitely be present at RegionLoaded() if it's going to be present at all.
2012-05-23Fix bug where an avatar that had an object they owned attached through ↵Justin Clark-Casey (justincc)2-137/+82
llAttachToAvatar() or osForceAttachToAvatar() would wrongly have next permissions come into play when they detached that object and rezzed it in scene. This is because the attachments module code was setting the 'object slam' bit by using PermissionMask.All Solution here is to route the attachment item creation call through the existing inventory code in BasicInventoryAccessModule rather than copy/pasted code in AttachmentsModule itself.
2012-05-14minor: add explanative comment to 'missing baked texture' logging commonly ↵Justin Clark-Casey (justincc)1-0/+10
seen on inter-simulator teleports where avatar baked textures are not available from the asset service.
2012-05-07refactor: Instead of performing a ScenePresence lookup twice over ↵Justin Clark-Casey (justincc)1-18/+2
LocateClientObject() and GetClientScene(), do the lookup just once in LocateClientObject()
2012-05-07Fix a bug in FriendsModule.StatusNotify() where all subsequent friends would ↵Justin Clark-Casey (justincc)1-2/+7
not be notified once a non-local friend was found.
2012-05-05Fire the scripting changed event with CHANGED_OWNER when an object that has ↵Justin Clark-Casey (justincc)1-9/+9
changed owners is rezzed. This needs to occur after the script is resumed rather than before, when the event is just dropped. Addresses http://opensimulator.org/mantis/view.php?id=5890 and http://opensimulator.org/mantis/view.php?id=5952
2012-05-04Mantis 60004 problems with damage and llSetDamage. In damage enabled areas ↵Talun1-3/+14
this patch - Deletes any objects that have damage set > 0 that deliver that damage to an avatar Stops Gods receiving damage, Stops volume detect objects causing damage Deletes NPCS when their helth reduces to zero Gradually "heals" damage to an avatar Resets health on going to a non damage area
2012-05-01refactor: Split most of EntityTransferModule.Teleport() into its same region ↵Justin Clark-Casey (justincc)1-4/+6
and different region teleport components. DoTeleport() now retrives IEventQueue itself rather than requiring it to be passed in.
2012-04-27Use DotNetZip to compress OARs and IARs.Oren Hurvitz1-1/+4
DotNetZip provides much better compression than standard .NET.
2012-04-27Add regression test for teleporting an agent between separated regions on ↵Justin Clark-Casey (justincc)6-13/+13
the same simulator. This involves a large amount of change in test scene setup code to allow test scenes to share shared modules SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static May split these out into separate classes in the future.
2012-04-25Comment out some debug ATTACHMENTS log messages for now.Justin Clark-Casey (justincc)1-15/+14
2012-04-25Comment out the noisier AVFACTORY log messages for now.Justin Clark-Casey (justincc)1-4/+6
Permanently comment out warnings about ScenePresence not being found - this is entirely expected if the avatar has alraedy logged out or left the scene.
2012-04-24Minor improvements to loggingOren Hurvitz2-6/+9
Eliminated an extra newline in the console if the log line doesn't contain a category (example of a category: "[ASSETS]").
2012-04-23Mantis 5977 Corrections to llRegionSayToTalun1-17/+35
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-04-20Stop teleports from dropping tall avatars through or embedding them in the ↵Justin Clark-Casey (justincc)1-1/+7
floor when lured by short avatars. This involves giving the ceiling of the Z-component in a lure rather than the floor. Ideally we would give the exact float compensating for relative avatar height but it looks like that isn't possible with the parcel id format used in lures
2012-04-13Added ability to exclude inventory items or folders when saving IAR files.Kevin Cozens2-84/+128
2012-04-11HGFriendsModule: Type casts to fix compile errorSnoopy Pfeffer1-1/+1
2012-04-11HGFriendsModule: Added optional user level based restriction to send ↵Snoopy Pfeffer1-4/+20
friendship invitations to foreign users.
2012-04-11HGFriendsModule: add the scaffolding for supporting permissions pertaining ↵Diva Canto2-2/+32
to HG friendships. Snoopy take it from here.
2012-04-07Store FromItemID for attachments once on SOG instead of on every SOP and ↵Justin Clark-Casey (justincc)2-12/+13
only ever using the root part entry. This eliminates some pointless memory use.
2012-03-30Make default "show friends" console command show friends fetched from the ↵Justin Clark-Casey (justincc)2-4/+3
friends service. There is no a --cache option which will show friends from the local cache if available.
2012-03-30refactor: Move "friends show cache" console command out into separate ↵Justin Clark-Casey (justincc)2-93/+19
FriendsCommandsModule. Expose required methods on IFriendsModule. Rename GetFriends() -> GetFriendsFromCache() for self-documentation
2012-03-30Add simple login test with online friends. Add IFriendsModule.GrantRights() ↵Justin Clark-Casey (justincc)2-50/+73
for granting rights via a module call. Rename IFriendsModule.GetFriendPerms() -> GetRightsGrantedByFriend() to be more self-documenting and consistent with friends module terminology. Add some method doc.
2012-03-29refactor: Stop passing both IClientAPI and agentID to friend event ↵Justin Clark-Casey (justincc)3-20/+52
listeners, these are redundant. Replace a few magic numbers with FriendRights enum already used elsewhere.