forked from github/server
Merge branch 'develop' of github.com:ennorehling/eressea into develop
This commit is contained in:
commit
3b5bd6779a
4 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
require 'tests.e2.spells'
|
||||||
require 'tests.e2.buildings'
|
require 'tests.e2.buildings'
|
||||||
require 'tests.e2.production'
|
require 'tests.e2.production'
|
||||||
require 'tests.e2.adamantium'
|
require 'tests.e2.adamantium'
|
||||||
|
@ -7,7 +8,6 @@ require 'tests.e2.e2features'
|
||||||
require 'tests.e2.movement'
|
require 'tests.e2.movement'
|
||||||
require 'tests.e2.destroy'
|
require 'tests.e2.destroy'
|
||||||
require 'tests.e2.guard'
|
require 'tests.e2.guard'
|
||||||
require 'tests.e2.spells'
|
|
||||||
require 'tests.e2.stealth'
|
require 'tests.e2.stealth'
|
||||||
require 'tests.e2.items'
|
require 'tests.e2.items'
|
||||||
require 'tests.items'
|
require 'tests.items'
|
||||||
|
|
|
@ -8,6 +8,7 @@ function setup()
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("NewbieImmunity", "0")
|
eressea.settings.set("NewbieImmunity", "0")
|
||||||
eressea.settings.set("rules.food.flags", "4")
|
eressea.settings.set("rules.food.flags", "4")
|
||||||
|
eressea.settings.set("rules.peasants.growth.factor", "0")
|
||||||
end
|
end
|
||||||
|
|
||||||
function test_shapeshift()
|
function test_shapeshift()
|
||||||
|
|
|
@ -48,4 +48,10 @@ char * strdup(const char *s);
|
||||||
int mkdir(const char *pathname, int mode);
|
int mkdir(const char *pathname, int mode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* do not use M_PI, use one of these instead: */
|
||||||
|
#define PI_F 3.1415926535897932384626433832795F
|
||||||
|
#define PI_D 3.1415926535897932384626433832795
|
||||||
|
#define PI_L 3.1415926535897932384626433832795L
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -28,8 +28,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#define PI_L 3.1415926535897932384626433832795L
|
|
||||||
|
|
||||||
int lovar(double xpct_x2)
|
int lovar(double xpct_x2)
|
||||||
{
|
{
|
||||||
int n = (int)(xpct_x2 * 500) + 1;
|
int n = (int)(xpct_x2 * 500) + 1;
|
||||||
|
@ -51,10 +49,10 @@ double normalvariate(double mu, double sigma)
|
||||||
if (phase == 0) {
|
if (phase == 0) {
|
||||||
U = (rng_int() + 1.) / (RNG_RAND_MAX + 2.);
|
U = (rng_int() + 1.) / (RNG_RAND_MAX + 2.);
|
||||||
V = rng_int() / (RNG_RAND_MAX + 1.);
|
V = rng_int() / (RNG_RAND_MAX + 1.);
|
||||||
Z = sqrt(-2 * log(U)) * sin(2 * PI_L * V);
|
Z = sqrt(-2 * log(U)) * sin(2 * PI_D * V);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Z = sqrt(-2 * log(U)) * cos(2 * PI_L * V);
|
Z = sqrt(-2 * log(U)) * cos(2 * PI_D * V);
|
||||||
}
|
}
|
||||||
phase = 1 - phase;
|
phase = 1 - phase;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue