mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-11 09:59:42 +00:00
(svn r12050) -Fix: random_func broke for desync debug.
This commit is contained in:
parent
0ca3977af8
commit
20e9abed47
@ -131,13 +131,16 @@ void SetRandomSeed(uint32 seed)
|
|||||||
|
|
||||||
#ifdef RANDOM_DEBUG
|
#ifdef RANDOM_DEBUG
|
||||||
#include "../network/network_data.h"
|
#include "../network/network_data.h"
|
||||||
|
#include "../variables.h" /* _frame_counter */
|
||||||
|
#include "../player_func.h"
|
||||||
|
|
||||||
uint32 DoRandom(int line, const char *file)
|
uint32 DoRandom(int line, const char *file)
|
||||||
{
|
{
|
||||||
if (_networking && (DEREF_CLIENT(0)->status != STATUS_INACTIVE || !_network_server)) {
|
if (_networking && (DEREF_CLIENT(0)->status != STATUS_INACTIVE || !_network_server)) {
|
||||||
printf("Random [%d/%d] %s:%d\n",_frame_counter, (byte)_current_player, file, line);
|
printf("Random [%d/%d] %s:%d\n",_frame_counter, (byte)_current_player, file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _random->Next()
|
return _random.Next();
|
||||||
}
|
}
|
||||||
#endif /* RANDOM_DEBUG */
|
#endif /* RANDOM_DEBUG */
|
||||||
#endif /* MERSENNE_TWISTER */
|
#endif /* MERSENNE_TWISTER */
|
||||||
|
Loading…
Reference in New Issue
Block a user