(svn r23854) -Codechange: make it easier to put random debug stuff into the random log

This commit is contained in:
rubidium
2012-01-26 17:24:56 +00:00
parent 8123f2929f
commit 59edf288de
4 changed files with 25 additions and 25 deletions

View File

@@ -69,11 +69,7 @@ void SetRandomSeed(uint32 seed)
uint32 DoRandom(int line, const char *file)
{
if (_networking && (!_network_server || (NetworkClientSocket::IsValidID(0) && NetworkClientSocket::Get(0)->status != NetworkClientSocket::STATUS_INACTIVE))) {
static FILE *f = FioFOpenFile("random-out.log", "wb", AUTOSAVE_DIR);
if (f != NULL) {
fprintf(f, "%08x; %02x; %04x; %02x; %s:%d\n", _date, _date_fract, _frame_counter, (byte)_current_company, file, line);
fflush(f);
}
DEBUG(random, 0, "%08x; %02x; %04x; %02x; %s:%d", _date, _date_fract, _frame_counter, (byte)_current_company, file, line);
}
return _random.Next();