1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix: Light effects are drawn off-centre in some rotations

This commit is contained in:
WantDiscussion
2020-03-19 01:04:57 +11:00
committed by GitHub
parent e27a1a230a
commit d6c7aaf69c
3 changed files with 4 additions and 24 deletions

View File

@@ -137,6 +137,7 @@ The following people are not part of the development team, but have been contrib
* Denis Khabenkov (kodmord)
* Kevin Laframboise (klaframboise)
* Tushar Sariya (TusharSariya)
* (WantDiscussion)
## Toolchain
* (Balletie) - macOS

View File

@@ -37,6 +37,7 @@
- Fix: [#10898] Banner text has an offset in tile inspector window.
- Fix: [#10904] RCT1/LL-scenarios with red water won't open.
- Fix: [#10941] The Clear Scenery tool gives refunds for ghost elements.
- Fix: [#10963] Light effects are drawn off-centre in some rotations.
- Improved: [#682] The staff patrol area is now drawn on the water, instead of on the surface under water.
- Improved: [#10858] Added horizontal grid lines to finance charts.
- Improved: [#10884] Added y-axes and labels to park window charts.

View File

@@ -674,30 +674,8 @@ void lightfx_add_3d_light(uint32_t lightID, uint16_t lightIDqualifier, int16_t x
void lightfx_add_3d_light_magic_from_drawing_tile(
const CoordsXY& mapPosition, int16_t offsetX, int16_t offsetY, int16_t offsetZ, uint8_t lightType)
{
int16_t x = mapPosition.x + offsetX;
int16_t y = mapPosition.y + offsetY;
switch (get_current_rotation())
{
case 0:
x += 16;
y += 16;
break;
case 1:
x += 16;
y += 16;
break;
case 2:
x += 16;
y -= 16;
break;
case 3:
x += 16;
y -= 16;
break;
default:
return;
}
int16_t x = mapPosition.x + offsetX + 16;
int16_t y = mapPosition.y + offsetY + 16;
lightfx_add_3d_light((x << 16) | y, (offsetZ << 8) | LIGHTFX_LIGHT_QUALIFIER_MAP, x, y, offsetZ, lightType);
}