@@ -577,9 +577,6 @@ export class OutboundPackets {
577
577
578
578
packet . openBitBuffer ( ) ;
579
579
580
- // @TODO build around the player!
581
- // House room offsets and junk no matter where they are within the instance
582
-
583
580
const mapWorldX = mapData . position . x ;
584
581
const mapWorldY = mapData . position . y ;
585
582
@@ -589,14 +586,8 @@ export class OutboundPackets {
589
586
const offsetX = playerChunk . position . x - ( topCornerMapChunk . position . x - 2 ) ;
590
587
const offsetY = playerChunk . position . y - ( topCornerMapChunk . position . y - 2 ) ;
591
588
592
- const centerChunkX = 6 ;
593
- const centerChunkY = 6 ;
594
-
595
- const centerOffsetX = offsetX - centerChunkX ;
596
- const centerOffsetY = offsetY - centerChunkY ;
597
-
598
- console . log ( topCornerMapChunk . position . x , topCornerMapChunk . position . y ) ;
599
- console . log ( playerChunk . position . x , playerChunk . position . y ) ;
589
+ const centerOffsetX = offsetX - 6 ; // 6 === center
590
+ const centerOffsetY = offsetY - 6 ; // 6 === center
600
591
601
592
for ( let level = 0 ; level < 4 ; level ++ ) {
602
593
for ( let x = 0 ; x < 13 ; x ++ ) {
@@ -615,6 +606,7 @@ export class OutboundPackets {
615
606
if ( mapTileOffsetY > 12 ) {
616
607
mapTileOffsetY = 12 ;
617
608
}
609
+
618
610
const tileData : number | null = mapData . tileData [ level ] [ mapTileOffsetX ] [ mapTileOffsetY ] ;
619
611
packet . putBits ( 1 , tileData === null && ! mapData . emptySpace ? 0 : 1 ) ;
620
612
0 commit comments