forked from github/server
let horses be short, too.
This commit is contained in:
parent
8106cf15a1
commit
c97e881dbf
|
@ -643,7 +643,11 @@ void rsethorses(const region * r, int value)
|
||||||
assert(r->land || value==0);
|
assert(r->land || value==0);
|
||||||
assert(value >= 0);
|
assert(value >= 0);
|
||||||
if (r->land) {
|
if (r->land) {
|
||||||
r->land->horses = value;
|
if (value > USHRT_MAX) {
|
||||||
|
log_warning("region %s cannot have %d horses.", regionname(r, NULL), value);
|
||||||
|
value = USHRT_MAX;
|
||||||
|
}
|
||||||
|
r->land->horses = (unsigned short)value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,12 +97,12 @@ extern "C" {
|
||||||
char *display;
|
char *display;
|
||||||
demand *demands;
|
demand *demands;
|
||||||
const struct item_type *herbtype;
|
const struct item_type *herbtype;
|
||||||
|
unsigned short horses;
|
||||||
unsigned short herbs;
|
unsigned short herbs;
|
||||||
unsigned short peasants;
|
unsigned short peasants;
|
||||||
unsigned short morale;
|
unsigned short morale;
|
||||||
short newpeasants;
|
short newpeasants;
|
||||||
int trees[3]; /* 0 -> seeds, 1 -> shoots, 2 -> trees */
|
int trees[3]; /* 0 -> seeds, 1 -> shoots, 2 -> trees */
|
||||||
int horses;
|
|
||||||
int money;
|
int money;
|
||||||
struct region_owner *ownership;
|
struct region_owner *ownership;
|
||||||
} land_region;
|
} land_region;
|
||||||
|
|
Loading…
Reference in New Issue