Merge branch 'develop' of github.com:ennorehling/eressea into develop

This commit is contained in:
Enno Rehling 2017-05-06 13:52:46 +02:00
commit 3b5bd6779a
4 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,4 @@
require 'tests.e2.spells'
require 'tests.e2.buildings'
require 'tests.e2.production'
require 'tests.e2.adamantium'
@ -7,7 +8,6 @@ require 'tests.e2.e2features'
require 'tests.e2.movement'
require 'tests.e2.destroy'
require 'tests.e2.guard'
require 'tests.e2.spells'
require 'tests.e2.stealth'
require 'tests.e2.items'
require 'tests.items'

View File

@ -8,6 +8,7 @@ function setup()
eressea.settings.set("nmr.timeout", "0")
eressea.settings.set("NewbieImmunity", "0")
eressea.settings.set("rules.food.flags", "4")
eressea.settings.set("rules.peasants.growth.factor", "0")
end
function test_shapeshift()
@ -44,7 +45,7 @@ function test_raindance()
u:clear_orders()
u:add_order("ZAUBERE STUFE 1 Regentanz")
assert_equal(0, r:get_resource("money"))
process_orders()
assert_equal(200, r:get_resource("money"))
assert_equal(0, u:get_item("money"))

View File

@ -48,4 +48,10 @@ char * strdup(const char *s);
int mkdir(const char *pathname, int mode);
#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

View File

@ -28,8 +28,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <float.h>
#include <ctype.h>
#define PI_L 3.1415926535897932384626433832795L
int lovar(double xpct_x2)
{
int n = (int)(xpct_x2 * 500) + 1;
@ -51,10 +49,10 @@ double normalvariate(double mu, double sigma)
if (phase == 0) {
U = (rng_int() + 1.) / (RNG_RAND_MAX + 2.);
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 {
Z = sqrt(-2 * log(U)) * cos(2 * PI_L * V);
Z = sqrt(-2 * log(U)) * cos(2 * PI_D * V);
}
phase = 1 - phase;