From b68b3c458921c74b012823a0de2c6e172d218f96 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 29 Dec 2013 20:30:14 +0100 Subject: [PATCH] edit: Suppress bulletin on no-op unit location change Screwed up in commit a03d804f, v4.3.32. Signed-off-by: Markus Armbruster --- src/lib/commands/edit.c | 2 ++ tests/actofgod/journal.log | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/commands/edit.c b/src/lib/commands/edit.c index ee38a154..09760530 100644 --- a/src/lib/commands/edit.c +++ b/src/lib/commands/edit.c @@ -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", diff --git a/tests/actofgod/journal.log b/tests/actofgod/journal.log index a5e2caf7..7bf93c67 100644 --- a/tests/actofgod/journal.log +++ b/tests/actofgod/journal.log @@ -1844,7 +1844,6 @@ 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! @@ -1853,7 +1852,6 @@ 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! @@ -1862,7 +1860,6 @@ 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