Skip to content

Commit 5ba9c48

Browse files
MacSplodySharlikran
authored andcommitted
Fix Exterior Cell Grup Indices Order
1 parent c5c2a5f commit 5ba9c48

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Mopy/bash/record_groups.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,18 +475,19 @@ def getNumRecords(self,includeGroups=True):
475475
def getBsb(self):
476476
"""Returns tesfile block and sub-block indices for cells in this group.
477477
For interior cell, bsb is (blockNum,subBlockNum). For exterior cell,
478-
bsb is ((blockY,blockX),(subblockY,subblockX))."""
478+
bsb is ((blockX,blockY),(subblockX,subblockY))."""
479479
cell = self.cell
480480
#--Interior cell
481481
if cell.flags.isInterior:
482482
baseFid = cell.fid & 0x00FFFFFF
483483
return baseFid%10, baseFid%100//10
484484
#--Exterior cell
485+
# Grup Coord are reversed for Exteriors
485486
else:
486-
x,y = cell.posY,cell.posX
487+
x,y = cell.posX,cell.posY
487488
if x is None: x = 0
488489
if y is None: y = 0
489-
return (x//32, y//32), (x//8, y//8)
490+
return (y//32, x//32), (y//8, x//8)
490491

491492
def dump(self,out):
492493
"""Dumps group header and then records."""

0 commit comments

Comments
 (0)