From c7af9bd9554a20a435cffc5148af85a3e3b8ceeb Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 19 Jan 2014 16:41:50 +0100 Subject: [PATCH] edit: Keep missions centered on unit centered when teleporting Signed-off-by: Markus Armbruster --- src/lib/commands/edit.c | 3 +-- tests/actofgod/final.xdump | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/commands/edit.c b/src/lib/commands/edit.c index bc9c7e272..104284b5f 100644 --- a/src/lib/commands/edit.c +++ b/src/lib/commands/edit.c @@ -817,8 +817,7 @@ edit_unit(struct empobj *unit, char *key, char *p, xyas(unit->x, unit->y, unit->own), xyas(newx, newy, unit->own), cname(player->cnum)); - unit->x = newx; - unit->y = newy; + unit_teleport(unit, newx, newy); break; case 'E': arg = LIMIT_TO(arg, mineff, 100); diff --git a/tests/actofgod/final.xdump b/tests/actofgod/final.xdump index 0a42033ad..2ffc69dda 100644 --- a/tests/actofgod/final.xdump +++ b/tests/actofgod/final.xdump @@ -250,7 +250,7 @@ config plane uid owner xloc yloc type effic mobil off tech opx opy mission radius wing range harden ship land flags access theta 0 0 1 -1 0 0 2 0 100 0 0 none 0 "" 9 0 -1 -1 () 0 0.00000 1 98 1 -1 0 10 0 0 100 0 0 none 0 "" 9 0 -1 -1 () 0 0.00000 -2 2 3 -1 0 10 -127 0 50 1 -1 air\040defense 4 "" 0 0 -1 -1 (airburst) 0 0.00000 +2 2 3 -1 0 10 -127 0 50 3 -1 air\040defense 4 "" 0 0 -1 -1 (airburst) 0 0.00000 3 3 1 -1 0 10 -127 0 50 1 -1 air\040defense 4 "a" 0 0 3 -1 () 0 0.00000 4 3 3 -1 0 100 127 0 32767 0 0 none 0 "" 18 0 -1 4 () 0 0.00000 5 3 1 -1 0 100 127 0 32767 1 -1 air\040defense 4 "" 18 0 -1 -1 () 0 0.00000 -- 2.43.0