fix: Fixes wrong sector shift for tilematrix iteration (#1623)

This commit is contained in:
Stefano Merotta 2023-12-02 01:09:26 +01:00 committed by GitHub
parent 130a5674bf
commit fec78040bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -20,7 +20,7 @@ namespace Server;
public partial class Map
{
public ref struct StaticTileEnumerable
public readonly ref struct StaticTileEnumerable
{
public static StaticTileEnumerable Empty
{
@ -69,7 +69,7 @@ public partial class Map
if (includeStatics)
{
var tiles = map.Tiles.GetStaticBlock(p.X >> SectorShift, p.Y >> SectorShift);
var tiles = map.Tiles.GetStaticBlock(p.X >> TileMatrix.SectorShift, p.Y >> TileMatrix.SectorShift);
_tiles = tiles[p.X & 0x7][p.Y & 0x7];
_index = -1;
}