start stop: Don't operate on dead units when used by a deity

Screwed up when start, stop were extended to units in commit eb1512d,
v4.3.6.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2013-12-29 20:41:30 +01:00
parent 216470a8d5
commit 1325bc179b

View file

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