Mirror world tweaks.
This commit is contained in:
parent
0c631edd09
commit
230d28cef7
|
@ -147,7 +147,7 @@ static void load(cJSON *root)
|
|||
|
||||
if (game.plus & PLUS_MIRROR)
|
||||
{
|
||||
s->tx = MAP_PIXEL_WIDTH - s->tx;
|
||||
self->tx = MAP_PIXEL_WIDTH - self->tx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1156,8 +1156,9 @@ static void mirror(void)
|
|||
|
||||
case ET_LIFT:
|
||||
s = (Structure*)self;
|
||||
if (s->tx == s->x)
|
||||
if (s->startX == s->x)
|
||||
{
|
||||
s->startX -= self->w;
|
||||
s->tx -= self->w;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -188,6 +188,13 @@ static void loadEntities(cJSON *root)
|
|||
|
||||
self->load(node);
|
||||
|
||||
if (game.plus & PLUS_MIRROR)
|
||||
{
|
||||
self->x = MAP_PIXEL_WIDTH - self->x;
|
||||
|
||||
self->flags |= EF_MIRROR;
|
||||
}
|
||||
|
||||
self->init();
|
||||
|
||||
self->animate();
|
||||
|
@ -196,13 +203,6 @@ static void loadEntities(cJSON *root)
|
|||
{
|
||||
self->alive = ALIVE_DEAD;
|
||||
}
|
||||
|
||||
if (game.plus & PLUS_MIRROR)
|
||||
{
|
||||
self->x = MAP_PIXEL_WIDTH - self->x;
|
||||
|
||||
self->flags |= EF_MIRROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue