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
|
#ifdef LASTORDER
|
||||||
if (ord==u->lastorder) continue;
|
if (ord==u->lastorder) continue;
|
||||||
#endif
|
#endif
|
||||||
|
if (u->old_orders && is_repeated(ord)) continue; /* unit has defaults */
|
||||||
if (is_persistent(ord)) {
|
if (is_persistent(ord)) {
|
||||||
fwriteorder(F, ord, f->locale);
|
fwriteorder(F, ord, f->locale);
|
||||||
fputc('\n', F);
|
fputc('\n', F);
|
||||||
|
|
|
@ -247,7 +247,7 @@ get_food(region *r)
|
||||||
int hungry = u->number;
|
int hungry = u->number;
|
||||||
|
|
||||||
while (donor!=NULL && hungry>0) {
|
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;
|
static const struct potion_type * pt_blood;
|
||||||
if (pt_blood==NULL) pt_blood = pt_find("peasantblood");
|
if (pt_blood==NULL) pt_blood = pt_find("peasantblood");
|
||||||
while (donor!=NULL) {
|
while (donor!=NULL) {
|
||||||
|
|
|
@ -1603,6 +1603,7 @@ order_template(FILE * F, faction * f)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
for (ord = u->orders; ord; ord = ord->next) {
|
for (ord = u->orders; ord; ord = ord->next) {
|
||||||
|
if (u->old_orders && is_repeated(ord)) continue; /* unit has defaults */
|
||||||
if (is_persistent(ord)) {
|
if (is_persistent(ord)) {
|
||||||
strcpy(buf, " ");
|
strcpy(buf, " ");
|
||||||
write_order(ord, u->faction->locale, buf+2, sizeof(buf)-2);
|
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;
|
++printed;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (printed) break; /* ein DEFAULT reicht */
|
||||||
ord=ord->next;
|
ord=ord->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1246,6 +1246,7 @@ writeunit(FILE * F, const unit * u)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
for (ord = u->orders; ord; ord=ord->next) {
|
for (ord = u->orders; ord; ord=ord->next) {
|
||||||
|
if (u->old_orders && is_repeated(ord)) continue; /* has new defaults */
|
||||||
if (is_persistent(ord)) {
|
if (is_persistent(ord)) {
|
||||||
fwriteorder(F, ord, u->faction->locale);
|
fwriteorder(F, ord, u->faction->locale);
|
||||||
fputc(' ', F);
|
fputc(' ', F);
|
||||||
|
|
Loading…
Reference in New Issue