From 51f0aacb9634259e020492ee34dfb47a61684482 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 11 Feb 2007 11:10:53 +0000 Subject: [PATCH] =?UTF-8?q?""http://eressea.upb.de/mantis/view.php=3Fid=3D?= =?UTF-8?q?1128=20"=C3=9Cbergabe=20an=20TEMP=20hat=20nicht=20geklappt"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keine GIB ausfuehren, wenn die Einheit 0 Personen hat. --- src/common/gamecode/economy.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index ca95ad4f0..c43ae4aeb 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -1067,8 +1067,9 @@ economics(region *r) for (u = r->units; u; u = u->next) { order * ord; boolean destroyed = false; - for (ord = u->orders; ord; ord = ord->next) { - switch (get_keyword(ord)) { + if (u->number>0) { + for (ord = u->orders; ord; ord = ord->next) { + switch (get_keyword(ord)) { case K_DESTROY: if (!destroyed) { if (destroy_cmd(u, ord)!=0) ord = NULL; @@ -1085,8 +1086,9 @@ economics(region *r) forget_cmd(u, ord); break; + } + if (u->orders==NULL) break; } - if (u->orders==NULL) break; } } /* RECRUIT orders */