]> git.pond.sub.org Git - empserver/commitdiff
edit: Suppress bulletin on no-op unit location change
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 29 Dec 2013 19:30:14 +0000 (20:30 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 2 Jan 2014 13:33:48 +0000 (14:33 +0100)
Screwed up in commit a03d804f, v4.3.32.

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

index ee38a1543d94db615766a4443b270560d16e3bb6..09760530e3509706c786d03e118c6f764dc4ee05 100644 (file)
@@ -781,6 +781,8 @@ edit_unit(struct empobj *unit, char *key, char *p,
                                 "from %s to %s",
                                 xyas(unit->x, unit->y, player->cnum),
                                 xyas(newx, newy, player->cnum));
+       if (newx == unit->x && newy == unit->y)
+           break;
        if (unit->own && unit->own != player->cnum)
            wu(0, unit->own,
               "Location of %s changed from %s to %s by an act of %s!\n",
index a5e2caf7920d7176529a62315749bb75b085f18a..7bf93c67d0c17c38ef5fbc05adbcc571393c84c7 100644 (file)
     Play#0 output Play#0 1 cs   cargo ship (#5) given to you by an act of POGO!
     Play#0 output Play#0 1 cs   cargo ship (#3) taken from you by an act of POGO!
     Play#0 output Play#0 1 cs   cargo ship (#3) given to you by an act of POGO!
-    Play#0 output Play#0 1 Location of cs   cargo ship (#3) changed from 1,-1 to 1,-1 by an act of POGO!
     Play#0 output Play#0 1 f1   Sopwith Camel #0 taken from you by an act of POGO!
     Play#0 output Play#0 1 f1   Sopwith Camel #1 taken from you by an act of POGO!
     Play#0 output Play#0 1 f1   Sopwith Camel #2 taken from you by an act of POGO!
     Play#0 output Play#0 1 f1   Sopwith Camel #5 given to you by an act of POGO!
     Play#0 output Play#0 1 f1   Sopwith Camel #3 taken from you by an act of POGO!
     Play#0 output Play#0 1 f1   Sopwith Camel #3 given to you by an act of POGO!
-    Play#0 output Play#0 1 Location of f1   Sopwith Camel #3 changed from 1,-1 to 1,-1 by an act of POGO!
     Play#0 output Play#0 1 sup  supply #0 taken from you by an act of POGO!
     Play#0 output Play#0 1 sup  supply #1 taken from you by an act of POGO!
     Play#0 output Play#0 1 sup  supply #2 taken from you by an act of POGO!
     Play#0 output Play#0 1 sup  supply #5 given to you by an act of POGO!
     Play#0 output Play#0 1 sup  supply #3 taken from you by an act of POGO!
     Play#0 output Play#0 1 sup  supply #3 given to you by an act of POGO!
-    Play#0 output Play#0 1 Location of sup  supply #3 changed from 1,-1 to 1,-1 by an act of POGO!
     Play#0 output Play#0 1 Efficiency of cs   cargo ship (#4) changed from 20 to 100 by an act of POGO
     Play#0 output Play#0 1 Efficiency of cs   cargo ship (#5) changed from 20 to 100 by an act of POGO
     Play#0 output Play#0 1 Mobility of cs   cargo ship (#3) changed from 0 to -127 by an act of POGO