relax strict assertion (should be allowed to set ocean to 0 peasants)

This commit is contained in:
Enno Rehling 2016-01-24 14:45:46 +01:00
parent 023686fab2
commit a6b15813ed
1 changed files with 6 additions and 3 deletions

View File

@ -605,10 +605,11 @@ int rpeasants(const region * r)
void rsetpeasants(region * r, int value) void rsetpeasants(region * r, int value)
{ {
assert(r->land);
assert(value >= 0); assert(value >= 0);
if (r->land) {
r->land->peasants = value; r->land->peasants = value;
} }
}
int rmoney(const region * r) int rmoney(const region * r)
{ {
@ -617,10 +618,12 @@ int rmoney(const region * r)
void rsethorses(const region * r, int value) void rsethorses(const region * r, int value)
{ {
assert(r->land || value==0);
assert(value >= 0); assert(value >= 0);
if (r->land) if (r->land) {
r->land->horses = value; r->land->horses = value;
} }
}
int rhorses(const region * r) int rhorses(const region * r)
{ {