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(value >= 0);
|
||||
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;
|
||||
demand *demands;
|
||||
const struct item_type *herbtype;
|
||||
unsigned short horses;
|
||||
unsigned short herbs;
|
||||
unsigned short peasants;
|
||||
unsigned short morale;
|
||||
short newpeasants;
|
||||
int trees[3]; /* 0 -> seeds, 1 -> shoots, 2 -> trees */
|
||||
int horses;
|
||||
int money;
|
||||
struct region_owner *ownership;
|
||||
} land_region;
|
||||
|
|
Loading…
Reference in New Issue