forked from github/server
DEFAULT-Befehl funktioniert wieder nicht Wenn neue Befehle in old_orders stehen, werden lange Befehle in orders nicht mehr ausgegeben. Issue: 548
This commit is contained in:
parent
fa1b0a8efc
commit
448e9e7c09
|
@ -778,6 +778,7 @@ cr_output_unit(FILE * F, const region * r,
|
|||
#ifdef LASTORDER
|
||||
if (ord==u->lastorder) continue;
|
||||
#endif
|
||||
if (u->old_orders && is_repeated(ord)) continue; /* unit has defaults */
|
||||
if (is_persistent(ord)) {
|
||||
fwriteorder(F, ord, f->locale);
|
||||
fputc('\n', F);
|
||||
|
|
|
@ -247,7 +247,7 @@ get_food(region *r)
|
|||
int hungry = u->number;
|
||||
|
||||
while (donor!=NULL && hungry>0) {
|
||||
/* alwayy start with the first known uint that may have some blood */
|
||||
/* always start with the first known unit that may have some blood */
|
||||
static const struct potion_type * pt_blood;
|
||||
if (pt_blood==NULL) pt_blood = pt_find("peasantblood");
|
||||
while (donor!=NULL) {
|
||||
|
|
|
@ -1603,6 +1603,7 @@ order_template(FILE * F, faction * f)
|
|||
}
|
||||
#endif
|
||||
for (ord = u->orders; ord; ord = ord->next) {
|
||||
if (u->old_orders && is_repeated(ord)) continue; /* unit has defaults */
|
||||
if (is_persistent(ord)) {
|
||||
strcpy(buf, " ");
|
||||
write_order(ord, u->faction->locale, buf+2, sizeof(buf)-2);
|
||||
|
|
|
@ -442,6 +442,7 @@ bufunit(const faction * f, const unit * u, int indent, int mode)
|
|||
++printed;
|
||||
break;
|
||||
}
|
||||
if (printed) break; /* ein DEFAULT reicht */
|
||||
ord=ord->next;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1246,6 +1246,7 @@ writeunit(FILE * F, const unit * u)
|
|||
}
|
||||
#endif
|
||||
for (ord = u->orders; ord; ord=ord->next) {
|
||||
if (u->old_orders && is_repeated(ord)) continue; /* has new defaults */
|
||||
if (is_persistent(ord)) {
|
||||
fwriteorder(F, ord, u->faction->locale);
|
||||
fputc(' ', F);
|
||||
|
|
Loading…
Reference in New Issue