]> git.pond.sub.org Git - empserver/commitdiff
edit: Fix reporting of no-op unit location change
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 14 Jan 2014 22:26:06 +0000 (23:26 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 Feb 2014 10:51:50 +0000 (11:51 +0100)
Report "unchanged" instead of "changed from X,Y to X,Y".  Screwed up
in v4.3.32.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/edit.c
tests/actofgod/journal.log

index 41a450e76562ed7f8349171313b792761ea4ef5e..17eaddc72e00709c9da93645d6675a3362d707a3 100644 (file)
@@ -31,7 +31,7 @@
  *     Chad Zabel, 1994
  *     Steve McClure, 1998-2000
  *     Ron Koenderink, 2003-2009
  *     Chad Zabel, 1994
  *     Steve McClure, 1998-2000
  *     Ron Koenderink, 2003-2009
- *     Markus Armbruster, 2003-2013
+ *     Markus Armbruster, 2003-2014
  */
 
 #include <config.h>
  */
 
 #include <config.h>
@@ -798,7 +798,7 @@ edit_unit(struct empobj *unit, char *key, char *p,
            return RET_FAIL;
        }
        divine_unit_change_quiet(unit, "Location",
            return RET_FAIL;
        }
        divine_unit_change_quiet(unit, "Location",
-                                unit->own && unit->own != player->cnum,
+                                newx != unit->x || newy != unit->y,
                                 "from %s to %s",
                                 xyas(unit->x, unit->y, player->cnum),
                                 xyas(newx, newy, player->cnum));
                                 "from %s to %s",
                                 xyas(unit->x, unit->y, player->cnum),
                                 xyas(newx, newy, player->cnum));
index ca9e92b71867841c60e307dc66ecd09ee2e3cc57..0d1664cc1233865c31daefe9fbb2b6e2b1a4ae6d 100644 (file)
     Play#0 output Play#0 6 0 640
     Play#0 input edit s 3 L 1,-1
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit s 3 L 1,-1
     Play#0 command edit
-    Play#0 output Play#0 1 Location of cs   cargo ship (#3) changed from 1,-1 to 1,-1
+    Play#0 output Play#0 1 Location of cs   cargo ship (#3) unchanged
     Play#0 output Play#0 6 0 640
     Play#0 input edit p 0 @ 0
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit p 0 @ 0
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit p 3 l 1,-1
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit p 3 l 1,-1
     Play#0 command edit
-    Play#0 output Play#0 1 Location of f1   Sopwith Camel #3 changed from 1,-1 to 1,-1
+    Play#0 output Play#0 1 Location of f1   Sopwith Camel #3 unchanged
     Play#0 output Play#0 6 0 640
     Play#0 input edit u 0 @ 0
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit u 0 @ 0
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit u 3 L 1,-1
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit u 3 L 1,-1
     Play#0 command edit
-    Play#0 output Play#0 1 Location of sup  supply #3 changed from 1,-1 to 1,-1
+    Play#0 output Play#0 1 Location of sup  supply #3 unchanged
     Play#0 output Play#0 6 0 640
     Play#0 input edit n 0 @ 0
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit n 0 @ 0
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit n 3 L 1,-1
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit n 3 L 1,-1
     Play#0 command edit
-    Play#0 output Play#0 1 Location of 10kt  fission warhead #3 changed from 1,-1 to 1,-1
+    Play#0 output Play#0 1 Location of 10kt  fission warhead #3 unchanged
     Play#0 output Play#0 6 0 640
     Play#0 input edit s 6 t lc O 1 t lc t hc g 8 t lc
     Play#0 command edit
     Play#0 output Play#0 6 0 640
     Play#0 input edit s 6 t lc O 1 t lc t hc g 8 t lc
     Play#0 command edit