Fix regions being shifted by one during rotation
This fixes exaggerated tile counts in progress updates, reduces the calls to rendernode (for a small performance increase), and shifts the problem of unclickable signs in UR orientation further away.
This commit is contained in:
16
world.py
16
world.py
@@ -318,16 +318,16 @@ class World(object):
|
||||
x = int(p[1])
|
||||
y = int(p[2])
|
||||
if self.north_direction == 'upper-right':
|
||||
x = -x
|
||||
y = -y
|
||||
x = -x-1
|
||||
y = -y-1
|
||||
elif self.north_direction == 'upper-left':
|
||||
temp = x
|
||||
x = -y
|
||||
x = -y-1
|
||||
y = temp
|
||||
elif self.north_direction == 'lower-right':
|
||||
temp = x
|
||||
x = y
|
||||
y = -temp
|
||||
y = -temp-1
|
||||
yield (x, y, join(self.worlddir, 'region', f))
|
||||
else:
|
||||
logging.warning("Ignore path '%s' in regionlist", f)
|
||||
@@ -339,16 +339,16 @@ class World(object):
|
||||
x = int(p[1])
|
||||
y = int(p[2])
|
||||
if self.north_direction == 'upper-right':
|
||||
x = -x
|
||||
y = -y
|
||||
x = -x-1
|
||||
y = -y-1
|
||||
elif self.north_direction == 'upper-left':
|
||||
temp = x
|
||||
x = -y
|
||||
x = -y-1
|
||||
y = temp
|
||||
elif self.north_direction == 'lower-right':
|
||||
temp = x
|
||||
x = y
|
||||
y = -temp
|
||||
y = -temp-1
|
||||
yield (x, y, join(dirpath, f))
|
||||
|
||||
def get_save_dir():
|
||||
|
||||
Reference in New Issue
Block a user