mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Fix off-by-one error in center_2d_coordinates
This commit is contained in:
@@ -113,19 +113,19 @@ void center_2d_coordinates(int x, int y, int z, int* out_x, int* out_y, rct_view
|
||||
switch (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32)){
|
||||
case 0:
|
||||
x = y - x;
|
||||
y = y / 2 + start_x / 2 - z;
|
||||
y = (y + start_x) / 2 - z;
|
||||
break;
|
||||
case 1:
|
||||
x = -y - x;
|
||||
y = y / 2 - start_x / 2 - z;
|
||||
y = (y - start_x) / 2 - z;
|
||||
break;
|
||||
case 2:
|
||||
x = -y + x;
|
||||
y = -y / 2 - start_x / 2 - z;
|
||||
y = (-y - start_x) / 2 - z;
|
||||
break;
|
||||
case 3:
|
||||
x = y + x;
|
||||
y = -y / 2 + start_x / 2 - z;
|
||||
y = (-y + start_x) / 2 - z;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user