mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
New command line option for testing: testingsavefrequency
Saving is slowest part of VCMI and for testing purposes like benchmarking it's helpful to create saves less often. When --testingsavefrequency=N is specified client going to save only once in N days. Option only active if other testing options are specified too.
This commit is contained in:
@@ -178,7 +178,7 @@ void CPlayerInterface::yourTurn()
|
||||
}
|
||||
firstCall = 0;
|
||||
}
|
||||
else
|
||||
else if(settings["testing"].isNull() || cb->getDate() % static_cast<int>(settings["testing"]["savefrequency"].Float()) == 0)
|
||||
{
|
||||
LOCPLINT->cb->save("Saves/" + prefix + "Autosave_" + boost::lexical_cast<std::string>(autosaveCount++ + 1));
|
||||
autosaveCount %= 5;
|
||||
|
Reference in New Issue
Block a user