Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixing compile error on older SDK versions
Browse files Browse the repository at this point in the history
AdamFrisby committed Aug 16, 2024
1 parent 1ee537a commit 064ad1b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions LibreMetaverse/GridManager.cs
Original file line number Diff line number Diff line change
@@ -158,14 +158,15 @@ public abstract class MapItem
public uint GlobalY;

/// <summary>Get the Local X position of the item</summary>
public uint LocalX { get { return GlobalX % 256; } }
public uint LocalX { get { return GlobalX % Simulator.DefaultRegionSizeX; } }
/// <summary>Get the Local Y position of the item</summary>
public uint LocalY { get { return GlobalY % 256; } }
public uint LocalY { get { return GlobalY % Simulator.DefaultRegionSizeY; } }

/// <summary>Get the Handle of the region</summary>
public ulong RegionHandle
{
get { return Utils.UIntsToLong((uint)(GlobalX - (GlobalX % 256)), (uint)(GlobalY - (GlobalY % 256))); }
get { return Utils.UIntsToLong((uint)(GlobalX - (GlobalX % Simulator.DefaultRegionSizeX)),
(uint)(GlobalY - (GlobalY % Simulator.DefaultRegionSizeY))); }
}
}

@@ -606,7 +607,7 @@ public bool GetGridRegion(ulong handle, GridLayerType layer, out GridRegion regi
GridRegion foundRegion = default(GridRegion);
bool found = false;

void RegionCallback(object? sender, GridRegionEventArgs e)
void RegionCallback(object sender, GridRegionEventArgs e)
{ // See note in HandleCallback, above.
if (e.Region.RegionHandle == handle)
{
@@ -926,7 +927,7 @@ protected void CoarseLocationHandler(object sender, PacketReceivedEventArgs e)

if (m_CoarseLocationUpdate != null)
{
ThreadPool.QueueUserWorkItem((object o) =>
ThreadPool.QueueUserWorkItem(o =>
{ OnCoarseLocationUpdate(new CoarseLocationUpdateEventArgs(e.Simulator, newEntries, removedEntries)); });
}
}

0 comments on commit 064ad1b

Please sign in to comment.