Remove the --no-srng switch and its implementation.

It should have been removed before 1.8.0
This commit is contained in:
Alexander van Gessel 2010-05-26 02:09:56 +01:00
parent e5dc12a010
commit ed2851aa12
3 changed files with 2 additions and 18 deletions

View File

@ -474,8 +474,6 @@ game_controller::game_controller(int argc, char** argv) :
}
}
#endif
} else if(val == "--no-srng") {
rand_rng::disable_server_rng();
} else if(val == "-datadir") {
if(arg_+1 != argc_) {
++arg_;
@ -1851,8 +1849,6 @@ static int process_command_args(int argc, char** argv) {
<< " --nocache disables caching of game data.\n"
<< " --nomusic runs the game without music.\n"
<< " --nosound runs the game without sounds and music.\n"
<< " --no-srng disable server-side RNG support (will cause OOS\n"
<< " errors unless every player uses it)\n"
<< " --path prints the path to the data directory and exits.\n"
<< " --preprocess, -p[=<define1>,<define2>,...] <file/folder> <target directory>\n"
<< " preprocesses a specified file/folder. The preprocessed\n"

View File

@ -59,7 +59,6 @@ namespace {
rand_rng::seed_t last_seed;
bool seed_valid = false;
boost::function<void (rand_rng::seed_t)> new_seed_callback;
bool srng_disabled = false;
}
@ -120,8 +119,8 @@ void invalidate_seed()
bool has_valid_seed()
{
//if the SRNG is disabled or we're in a SP game the seed is always valid
return srng_disabled || (network::nconnections() == 0) || seed_valid;
//if we're in a SP game the seed is always valid
return (network::nconnections() == 0) || seed_valid;
}
seed_t get_last_seed()
@ -141,11 +140,6 @@ void clear_new_seed_callback()
new_seed_callback = NULL;
}
void disable_server_rng()
{
srng_disabled = true;
}
rng::rng() : random_(NULL), random_child_(0), generator_()

View File

@ -94,12 +94,6 @@ void set_new_seed_callback(boost::function<void (seed_t)> f);
*/
void clear_new_seed_callback();
/**
* Disable server RNG support, will cause OOS if playing MP with a client with
* SRNG enabled. For debugging purposes, should be removed before 1.8.0
*/
void disable_server_rng();
} // ends rand_rng namespace
#endif