From d99090ac678b675cc36701cb36e8b5b2814a8a07 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 31 Mar 2017 21:29:37 +0200 Subject: [PATCH] remove additional unused macro constants --- src/economy.c | 2 -- src/kernel/save.c | 2 -- src/laws.c | 27 --------------------------- src/settings.h | 3 --- 4 files changed, 34 deletions(-) diff --git a/src/economy.c b/src/economy.c index 83e4bf9d0..8a313a074 100644 --- a/src/economy.c +++ b/src/economy.c @@ -468,7 +468,6 @@ static void recruit(unit * u, struct order *ord, request ** recruitorders) assert(rc); u_setrace(u, rc); -#if GUARD_DISABLES_RECRUIT /* this is a very special case because the recruiting unit may be empty * at this point and we have to look at the creating unit instead. This * is done in cansee, which is called indirectly by is_guarded(). */ @@ -476,7 +475,6 @@ static void recruit(unit * u, struct order *ord, request ** recruitorders) cmistake(u, ord, 70, MSG_EVENT); return; } -#endif if (rc == get_race(RC_INSECT)) { gamedate date; diff --git a/src/kernel/save.c b/src/kernel/save.c index 105ad7324..cd944f345 100644 --- a/src/kernel/save.c +++ b/src/kernel/save.c @@ -1121,9 +1121,7 @@ static ally **addally(const faction * f, ally ** sfp, int aid, int state) ally *sf; state &= ~HELP_OBSERVE; -#ifndef REGIONOWNERS state &= ~HELP_TRAVEL; -#endif state &= HelpMask(); if (state == 0) diff --git a/src/laws.c b/src/laws.c index 9b3e9946a..adf8b9f11 100644 --- a/src/laws.c +++ b/src/laws.c @@ -284,31 +284,6 @@ static double peasant_growth_factor(void) return config_get_flt("rules.peasants.growth.factor", 0.0001F * PEASANTGROWTH); } -#ifdef SLOWLUCK -int peasant_luck_effect(int peasants, int luck, int maxp, double variance) { - int n, births = 0; - double factor = peasant_growth_factor(); - for (n = peasants; n && luck; --n) { - int chances = 0; - - if (luck > 0) { - --luck; - chances += PEASANTLUCK; - } - - while (chances--) { - if (rng_double() < factor) { - /* Only raise with 75% chance if peasants have - * reached 90% of maxpopulation */ - if (peasants / (float)maxp < 0.9 || chance(PEASANTFORCE)) { - ++births; - } - } - } - } - return births; -} -#else static double peasant_luck_factor(void) { return config_get_flt("rules.peasants.peasantluck.factor", PEASANTLUCK); @@ -331,8 +306,6 @@ int peasant_luck_effect(int peasants, int luck, int maxp, double variance) return births; } -#endif - static void peasants(region * r, int rule) { int peasants = rpeasants(r); diff --git a/src/settings.h b/src/settings.h index 86d5a5571..72e179738 100644 --- a/src/settings.h +++ b/src/settings.h @@ -12,7 +12,6 @@ #define ENTERTAINFRACTION 20 #define TEACHDIFFERENCE 2 -#define GUARD_DISABLES_RECRUIT 1 #define RESOURCE_QUANTITY 0.5 #define RECRUITFRACTION 40 /* 100/RECRUITFRACTION% */ #define COMBAT_TURNS 5 @@ -31,8 +30,6 @@ */ #define MUSEUM_MODULE 1 -#undef REGIONOWNERS /* (WIP) region-owner uses HELP_TRAVEL to control entry to region */ - /* experimental gameplay features (that don't affect the savefile) */ /* TODO: move these settings to settings.h or into configuration files */ #define GOBLINKILL /* Goblin-Spezialklau kann toedlich enden */