Skip to content

Commit

Permalink
Bug fixes for LinkSet Data related to matching SL behavior (#68)
Browse files Browse the repository at this point in the history
* For YEngine when posting events for linkset_data, deliver the event to all scripts in all prims.  Similar to attach which is currently handled here.  Clean up some of the special case handling in LinksetData Write.   Writing a key with no value is translated to a delete. We weren't handling that case.  Also returned key value on a write, we were previously returning a null string.

* Bumped version.  Refactored LinksetData support from the SOP into a seperate LinkssetData class.  The SOP is one of those things thats already WAY to complex so hopefully this should make maintenance easier.  Added code to merge LinksetData stores in order to handle linking 2 SOGs that both have LinksetData.   Adjusted serialization handling so the database still stores just the KVPs and the wrapper class is constructed from that. Keeps it compatible with current saved data.

* Address some CodeQL comments.  Rework Merge to address an issue with shared entries. Still need to address shift-copy issues.

* Bump version.  Add code to LinksetData and LinksetEntry to do a deep copy.  We use that when doing a copy of prims because otherwise the dictionary ends being referenced from both prims on a shift copy, etc.  Also used on a merge to create new entries.  Fixed some of the accounting code which was incorrectly reporting usage and terminating a copy early on a merge.

* Address CodeQL issues, cleaner handling of possible null values.
  • Loading branch information
mdickson authored Dec 3, 2023
1 parent ad6defe commit be88cb8
Show file tree
Hide file tree
Showing 9 changed files with 582 additions and 395 deletions.
4 changes: 2 additions & 2 deletions OpenSim/Data/MySQL/MySQLSimulationData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1620,15 +1620,15 @@ private void FillPrimCommand(MySqlCommand cmd, SceneObjectPart prim, UUID sceneG
cmd.Parameters.AddWithValue("Restitution", prim.Restitution);
cmd.Parameters.AddWithValue("RotationAxisLocks", prim.RotationAxisLocks);

if (prim.Animations!= null)
if (prim.Animations != null)
cmd.Parameters.AddWithValue("sopanims", prim.SerializeAnimations());
else
cmd.Parameters.AddWithValue("sopanims", null);

cmd.Parameters.AddWithValue("sitactrange", prim.SitActiveRange);
cmd.Parameters.AddWithValue("pseudocrc", prim.PseudoCRC);

if (prim.HasLinksetData)
if (prim.LinksetData != null)
{
cmd.Parameters.AddWithValue("linksetdata", prim.SerializeLinksetData());
}
Expand Down
2 changes: 1 addition & 1 deletion OpenSim/Framework/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class VersionInfo
{
public const string VersionNumber = "0.9.2.2";
public const string AssemblyVersionNumber = "0.9.2.2";
public const string Release = "8720";
public const string Release = "8736";

public static string Version
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
<Compile Remove="Scenes\EventManager.cs" />
<Compile Remove="Scenes\GodController.cs" />
<Compile Remove="Scenes\KeyframeMotion.cs" />
<Compile Remove="Scenes\LinksetData.cs" />
<Compile Remove="Scenes\LinksetDataEntry.cs" />
<Compile Remove="Scenes\Prioritizer.cs" />
<Compile Remove="Scenes\PriorityQueue.cs" />
<Compile Remove="Scenes\RegionStatsHandler.cs" />
Expand Down
Loading

0 comments on commit be88cb8

Please sign in to comment.