1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 18:25:16 +01:00

Replace hardcoded occurrences of maximum map size (#10696)

This commit is contained in:
Michael Steenbeek
2020-02-13 20:27:13 +01:00
committed by GitHub
parent 4191d2b7f9
commit 6d97601d6f
5 changed files with 10 additions and 9 deletions

View File

@@ -626,7 +626,7 @@ void sprite_misc_update_all()
*/
void sprite_move(int16_t x, int16_t y, int16_t z, SpriteBase* sprite)
{
if (x < 0 || y < 0 || x > 0x1FFF || y > 0x1FFF)
if (!map_is_location_valid({ x, y }))
{
x = LOCATION_NULL;
}