From 9554663af137518e17db7ef1c405ee13aa9486e7 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 16 Mar 2019 21:50:49 +0100 Subject: [PATCH] fixed wrong position of global animations in 'door_2' in level editor --- src/anim.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/anim.c b/src/anim.c index b79959df..824f86b5 100644 --- a/src/anim.c +++ b/src/anim.c @@ -854,10 +854,20 @@ static boolean SetGlobalAnimPart_Viewport(struct GlobalAnimPartControlInfo *part } else if (part->control_info.class == get_hash_from_key("door_2")) { - viewport_x = VX; - viewport_y = VY; - viewport_width = VXSIZE; - viewport_height = VYSIZE; + if (part->mode_nr == GAME_MODE_EDITOR) + { + viewport_x = EX; + viewport_y = EY; + viewport_width = EXSIZE; + viewport_height = EYSIZE; + } + else + { + viewport_x = VX; + viewport_y = VY; + viewport_width = VXSIZE; + viewport_height = VYSIZE; + } } else // default: "playfield" { -- 2.34.1