forked from github/server
- Fix Migrantenzählung
This commit is contained in:
parent
92701f9965
commit
176ffef3cb
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: eressea.c,v 1.7 2001/02/03 13:45:32 enno Exp $
|
* $Id: eressea.c,v 1.8 2001/02/05 07:23:17 corwin Exp $
|
||||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
@ -1033,7 +1033,7 @@ update_lighthouse(building * lh)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
count_migrants (faction * f)
|
count_migrants (const faction * f)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
region *r;
|
region *r;
|
||||||
|
@ -1054,7 +1054,7 @@ count_migrants (faction * f)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
count_all (faction * f)
|
count_all(const faction * f)
|
||||||
{
|
{
|
||||||
int n = 0;
|
int n = 0;
|
||||||
unit *u;
|
unit *u;
|
||||||
|
@ -1067,11 +1067,11 @@ count_all (faction * f)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
count_maxmigrants (faction * f)
|
count_maxmigrants(const faction * f)
|
||||||
{
|
{
|
||||||
int x = 0;
|
int x = 0;
|
||||||
if (f->race == RC_HUMAN) {
|
if (f->race == RC_HUMAN) {
|
||||||
int x = (int)(log10(count_all(f) / 50.0) * 20);
|
x = (int)(log10(count_all(f) / 50.0) * 20);
|
||||||
if (x < 0) x = 0;
|
if (x < 0) x = 0;
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
|
@ -1632,6 +1632,9 @@ createunitid(region * r1, faction * f, int number, race_t race, int id, const ch
|
||||||
f->no_units++;
|
f->no_units++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Monster sind grundsätzlich parteigetarnt */
|
||||||
|
if(f->no <= 0) fset(u, FL_PARTEITARNUNG);
|
||||||
|
|
||||||
return u;
|
return u;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* vi: set ts=2:
|
/* vi: set ts=2:
|
||||||
*
|
*
|
||||||
* $Id: eressea.h,v 1.10 2001/02/04 11:18:26 corwin Exp $
|
* $Id: eressea.h,v 1.11 2001/02/05 07:23:17 corwin Exp $
|
||||||
* Eressea PB(E)M host Copyright (C) 1998-2000
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
||||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||||
|
@ -997,10 +997,10 @@ char *shipname(const ship * sh);
|
||||||
|
|
||||||
struct building *largestbuilding(const struct region * r, boolean img);
|
struct building *largestbuilding(const struct region * r, boolean img);
|
||||||
|
|
||||||
int count_migrants(struct faction * f);
|
int count_migrants(const struct faction * f);
|
||||||
int count_all(struct faction * f);
|
int count_all(const struct faction * f);
|
||||||
int teure_talente(struct unit * u);
|
int teure_talente(struct unit * u);
|
||||||
int count_maxmigrants(struct faction * f);
|
int count_maxmigrants(const struct faction * f);
|
||||||
race_t findrace(const char *s);
|
race_t findrace(const char *s);
|
||||||
|
|
||||||
int effstealth(const struct unit * u);
|
int effstealth(const struct unit * u);
|
||||||
|
|
Loading…
Reference in New Issue