forked from github/server
Drawing borders around regions requires that oceans have an age, too. Fixed.
Also, removing some unnecessary race-enums
This commit is contained in:
parent
b87c87cea6
commit
6ec1bbe52e
6 changed files with 14 additions and 17 deletions
|
@ -887,6 +887,7 @@ demographics(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (r = regions; r; r = r->next) {
|
for (r = regions; r; r = r->next) {
|
||||||
|
++r->age;
|
||||||
live(r);
|
live(r);
|
||||||
/* check_split_dragons(); */
|
/* check_split_dragons(); */
|
||||||
|
|
||||||
|
@ -926,7 +927,6 @@ demographics(void)
|
||||||
peasants(r);
|
peasants(r);
|
||||||
plagues(r, false);
|
plagues(r, false);
|
||||||
|
|
||||||
r->age++;
|
|
||||||
horses(r);
|
horses(r);
|
||||||
#if GROWING_TREES
|
#if GROWING_TREES
|
||||||
if(current_season != SEASON_WINTER) {
|
if(current_season != SEASON_WINTER) {
|
||||||
|
|
|
@ -698,14 +698,6 @@ enum {
|
||||||
RC_VAMPUNICORN,
|
RC_VAMPUNICORN,
|
||||||
RC_PHOENIX,
|
RC_PHOENIX,
|
||||||
|
|
||||||
RC_SPHINX,
|
|
||||||
RC_LITTLESCARAB,
|
|
||||||
RC_GREENSCARAB,
|
|
||||||
RC_BLUESCARAB,
|
|
||||||
RC_REDSCARAB,
|
|
||||||
RC_UNDEADPHARAOH,
|
|
||||||
RC_MUMMY,
|
|
||||||
|
|
||||||
MAXRACES,
|
MAXRACES,
|
||||||
NORACE = (race_t) - 1
|
NORACE = (race_t) - 1
|
||||||
};
|
};
|
||||||
|
|
|
@ -146,9 +146,9 @@ addplayer(region *r, faction * f)
|
||||||
fset(u, UFL_ISNEW);
|
fset(u, UFL_ISNEW);
|
||||||
if (f->race == new_race[RC_DAEMON]) {
|
if (f->race == new_race[RC_DAEMON]) {
|
||||||
race_t urc;
|
race_t urc;
|
||||||
do
|
do {
|
||||||
urc = (race_t)(rand() % MAXRACES);
|
urc = (race_t)(rand() % MAXRACES);
|
||||||
while (urc == RC_DAEMON || !playerrace(new_race[urc]));
|
} while (urc == RC_DAEMON || !playerrace(new_race[urc]));
|
||||||
u->irace = new_race[urc];
|
u->irace = new_race[urc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ entrance_allowed(const struct unit * u, const struct region * r)
|
||||||
int
|
int
|
||||||
personcapacity(const unit *u)
|
personcapacity(const unit *u)
|
||||||
{
|
{
|
||||||
#if RACE_CAPACITY
|
#ifdef RACE_CAPACITY
|
||||||
int cap = u->race->weight+u->race->capacity;
|
int cap = u->race->weight+u->race->capacity;
|
||||||
#else
|
#else
|
||||||
int cap = u->race->weight+540;
|
int cap = u->race->weight+540;
|
||||||
|
|
|
@ -512,8 +512,7 @@ race_compat(void)
|
||||||
"shadowknight", "centaur", "skeleton", "skeletonlord", "zombie",
|
"shadowknight", "centaur", "skeleton", "skeletonlord", "zombie",
|
||||||
"juju-zombie", "ghoul", "ghast", "museumghost", "gnome", "template",
|
"juju-zombie", "ghoul", "ghast", "museumghost", "gnome", "template",
|
||||||
"clone", "shadowdragon", "shadowbat", "nightmare", "vampunicorn",
|
"clone", "shadowdragon", "shadowbat", "nightmare", "vampunicorn",
|
||||||
"phoenix", "sphinx", "littlescarab", "greenscarab", "bluescarab",
|
"phoenix"
|
||||||
"redscarab", "undeadpharaoh", "mummy"
|
|
||||||
};
|
};
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -943,7 +942,7 @@ parse_races(xmlDocPtr doc)
|
||||||
rc->recruitcost = xml_ivalue(node, "recruitcost", 0);
|
rc->recruitcost = xml_ivalue(node, "recruitcost", 0);
|
||||||
rc->maintenance = xml_ivalue(node, "maintenance", 0);
|
rc->maintenance = xml_ivalue(node, "maintenance", 0);
|
||||||
rc->weight = xml_ivalue(node, "weight", 0);
|
rc->weight = xml_ivalue(node, "weight", 0);
|
||||||
#if RACE_CAPACITY
|
#ifdef RACE_CAPACITY
|
||||||
rc->capacity = xml_ivalue(node, "capacity", 0);
|
rc->capacity = xml_ivalue(node, "capacity", 0);
|
||||||
#endif
|
#endif
|
||||||
rc->speed = (float)xml_fvalue(node, "speed", 1.0F);
|
rc->speed = (float)xml_fvalue(node, "speed", 1.0F);
|
||||||
|
|
|
@ -749,11 +749,17 @@ fix_gates(void)
|
||||||
static void
|
static void
|
||||||
frame_regions(void)
|
frame_regions(void)
|
||||||
{
|
{
|
||||||
|
unsigned short page = turn;
|
||||||
region * r = regions;
|
region * r = regions;
|
||||||
for (r=regions;r;r=r->next) {
|
for (r=regions;r;r=r->next) {
|
||||||
direction_t d;
|
direction_t d;
|
||||||
|
if (rterrain(r) == T_OCEAN && r->age+1<page) {
|
||||||
|
r->age = page;
|
||||||
|
} else if (r->age<page) {
|
||||||
|
page = r->age;
|
||||||
|
}
|
||||||
|
|
||||||
if (r->age<10) continue;
|
if (r->age<16) continue;
|
||||||
if (r->planep) continue;
|
if (r->planep) continue;
|
||||||
if (r->terrain==T_FIREWALL) continue;
|
if (r->terrain==T_FIREWALL) continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue