(update_wantmin, update_policy_check, demand_check, upda): Remove the
ability to switch off demand updates by setting update_wantmin to zero. Setting update_demandpolicy to UDDEM_DISABLE does the job. (update_policy_check): Fix lower bound for blitz_time.
This commit is contained in:
parent
198fad473e
commit
7457fef9e7
3 changed files with 6 additions and 16 deletions
|
@ -135,11 +135,7 @@ upda(void)
|
||||||
if (*update_demandtimes != 0)
|
if (*update_demandtimes != 0)
|
||||||
pr("Demand updates are allowed during: %s\n",
|
pr("Demand updates are allowed during: %s\n",
|
||||||
update_demandtimes);
|
update_demandtimes);
|
||||||
if (update_wantmin == 0) {
|
pr("Demand updates require %d country(s) to want one.\n", update_wantmin);
|
||||||
pr("Demand updates are disabled by a mininum of 0\n");
|
|
||||||
} else {
|
|
||||||
pr("Demand updates require %d country(s) to want one.\n", update_wantmin);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*game_days != 0)
|
if (*game_days != 0)
|
||||||
|
|
|
@ -59,12 +59,12 @@ update_policy_check(void)
|
||||||
update_demandpolicy = UDDEM_DEFAULT;
|
update_demandpolicy = UDDEM_DEFAULT;
|
||||||
if (update_demandpolicy > UDDEM_MAX)
|
if (update_demandpolicy > UDDEM_MAX)
|
||||||
update_demandpolicy = UDDEM_DEFAULT;
|
update_demandpolicy = UDDEM_DEFAULT;
|
||||||
if (update_wantmin < 0)
|
if (update_wantmin < 1)
|
||||||
update_wantmin = 0;
|
update_wantmin = 1;
|
||||||
if (update_wantmin > MAXNOC)
|
if (update_wantmin > MAXNOC)
|
||||||
update_wantmin = MAXNOC;
|
update_wantmin = MAXNOC;
|
||||||
if (blitz_time < 0)
|
if (blitz_time < 1)
|
||||||
blitz_time = 0;
|
blitz_time = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -153,11 +153,6 @@ demand_check(void)
|
||||||
|
|
||||||
time(&cur);
|
time(&cur);
|
||||||
|
|
||||||
if (0 == update_wantmin) {
|
|
||||||
logerror("no demand update allowed, wantmin = 0");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
demand_update_want(&want, &pop, 0);
|
demand_update_want(&want, &pop, 0);
|
||||||
if (want < update_wantmin) {
|
if (want < update_wantmin) {
|
||||||
logerror("no demand update, want = %d, min = %d",
|
logerror("no demand update, want = %d, min = %d",
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
* Ken Stevens, 1995
|
* Ken Stevens, 1995
|
||||||
* Steve McClure, 1996
|
* Steve McClure, 1996
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -57,7 +56,7 @@ char *update_times = ""; /* update times for policy UDP_TIMES */
|
||||||
int update_policy = UDP_DEFAULT; /* update policy for regular updates */
|
int update_policy = UDP_DEFAULT; /* update policy for regular updates */
|
||||||
int update_demandpolicy = UDDEM_DEFAULT; /* update policy for demand updates */
|
int update_demandpolicy = UDDEM_DEFAULT; /* update policy for demand updates */
|
||||||
int update_missed = 999; /* demand updates missed before veto */
|
int update_missed = 999; /* demand updates missed before veto */
|
||||||
int update_wantmin = 0; /* votes required for demand update */
|
int update_wantmin = 1; /* votes required for demand update */
|
||||||
int blitz_time = 10; /* number of minutes between blitz updates */
|
int blitz_time = 10; /* number of minutes between blitz updates */
|
||||||
char *update_demandtimes = ""; /* demand update time ranges */
|
char *update_demandtimes = ""; /* demand update time ranges */
|
||||||
char *game_days = ""; /* days game is running */
|
char *game_days = ""; /* days game is running */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue