Correctly adjust teleporter destination when mirroring.

This commit is contained in:
Steve 2018-05-16 08:06:37 +01:00
parent 24f677236a
commit 021a02f8e9
1 changed files with 5 additions and 0 deletions

View File

@ -140,6 +140,11 @@ static void load(cJSON *root)
s->active = cJSON_GetObjectItem(root, "active")->valueint; s->active = cJSON_GetObjectItem(root, "active")->valueint;
s->tx = cJSON_GetObjectItem(root, "tx")->valueint; s->tx = cJSON_GetObjectItem(root, "tx")->valueint;
s->ty = cJSON_GetObjectItem(root, "ty")->valueint; s->ty = cJSON_GetObjectItem(root, "ty")->valueint;
if (game.plus & PLUS_MIRROR)
{
s->tx = MAP_PIXEL_WIDTH - s->tx;
}
} }
static void save(cJSON *root) static void save(cJSON *root)