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
|
||||
|
||||
for (r = regions; r; r = r->next) {
|
||||
++r->age;
|
||||
live(r);
|
||||
/* check_split_dragons(); */
|
||||
|
||||
|
@ -926,7 +927,6 @@ demographics(void)
|
|||
peasants(r);
|
||||
plagues(r, false);
|
||||
|
||||
r->age++;
|
||||
horses(r);
|
||||
#if GROWING_TREES
|
||||
if(current_season != SEASON_WINTER) {
|
||||
|
|
|
@ -698,14 +698,6 @@ enum {
|
|||
RC_VAMPUNICORN,
|
||||
RC_PHOENIX,
|
||||
|
||||
RC_SPHINX,
|
||||
RC_LITTLESCARAB,
|
||||
RC_GREENSCARAB,
|
||||
RC_BLUESCARAB,
|
||||
RC_REDSCARAB,
|
||||
RC_UNDEADPHARAOH,
|
||||
RC_MUMMY,
|
||||
|
||||
MAXRACES,
|
||||
NORACE = (race_t) - 1
|
||||
};
|
||||
|
|
|
@ -146,9 +146,9 @@ addplayer(region *r, faction * f)
|
|||
fset(u, UFL_ISNEW);
|
||||
if (f->race == new_race[RC_DAEMON]) {
|
||||
race_t urc;
|
||||
do
|
||||
urc = (race_t)(rand() % MAXRACES);
|
||||
while (urc == RC_DAEMON || !playerrace(new_race[urc]));
|
||||
do {
|
||||
urc = (race_t)(rand() % MAXRACES);
|
||||
} while (urc == RC_DAEMON || !playerrace(new_race[urc]));
|
||||
u->irace = new_race[urc];
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ entrance_allowed(const struct unit * u, const struct region * r)
|
|||
int
|
||||
personcapacity(const unit *u)
|
||||
{
|
||||
#if RACE_CAPACITY
|
||||
#ifdef RACE_CAPACITY
|
||||
int cap = u->race->weight+u->race->capacity;
|
||||
#else
|
||||
int cap = u->race->weight+540;
|
||||
|
|
|
@ -512,8 +512,7 @@ race_compat(void)
|
|||
"shadowknight", "centaur", "skeleton", "skeletonlord", "zombie",
|
||||
"juju-zombie", "ghoul", "ghast", "museumghost", "gnome", "template",
|
||||
"clone", "shadowdragon", "shadowbat", "nightmare", "vampunicorn",
|
||||
"phoenix", "sphinx", "littlescarab", "greenscarab", "bluescarab",
|
||||
"redscarab", "undeadpharaoh", "mummy"
|
||||
"phoenix"
|
||||
};
|
||||
int i;
|
||||
|
||||
|
@ -943,7 +942,7 @@ parse_races(xmlDocPtr doc)
|
|||
rc->recruitcost = xml_ivalue(node, "recruitcost", 0);
|
||||
rc->maintenance = xml_ivalue(node, "maintenance", 0);
|
||||
rc->weight = xml_ivalue(node, "weight", 0);
|
||||
#if RACE_CAPACITY
|
||||
#ifdef RACE_CAPACITY
|
||||
rc->capacity = xml_ivalue(node, "capacity", 0);
|
||||
#endif
|
||||
rc->speed = (float)xml_fvalue(node, "speed", 1.0F);
|
||||
|
|
|
@ -749,11 +749,17 @@ fix_gates(void)
|
|||
static void
|
||||
frame_regions(void)
|
||||
{
|
||||
unsigned short page = turn;
|
||||
region * r = regions;
|
||||
for (r=regions;r;r=r->next) {
|
||||
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->terrain==T_FIREWALL) continue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue