]> git.pond.sub.org Git - empserver/commitdiff
start stop: Don't operate on dead units when used by a deity
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 29 Dec 2013 19:41:30 +0000 (20:41 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 2 Jan 2014 13:33:48 +0000 (14:33 +0100)
Screwed up when start, stop were extended to units in commit eb1512d,
v4.3.6.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/stop.c

index 30f99dd33a1088fbbbd9d8aca459814f49b14a58..c700e0d510fd13e98051a1484203e69ab1d9c0c3 100644 (file)
@@ -29,7 +29,7 @@
  *  Known contributors to this file:
  *     Thomas Ruschak, 1992
  *     Steve McClure, 1998
- *     Markus Armbruster, 2006-2010
+ *     Markus Armbruster, 2006-2013
  */
 
 #include <config.h>
@@ -160,7 +160,7 @@ start_stop_unit(int type, char *arg, int off)
     prdate();
     nunit = 0;
     while (nxtitem(&nstr, &unit)) {
-       if (!player->owner)
+       if (!player->owner || !unit.gen.own)
            continue;
        if (!unit.gen.off == !off)
            continue;