diff options
author | rubidium <rubidium@openttd.org> | 2008-01-29 00:27:25 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-01-29 00:27:25 +0000 |
commit | 3b2145aafe29d6abd8aeef3dccdb5cf587f111d2 (patch) | |
tree | a27a03588a37fa3492201013f224c9fdf751ecc3 /src/network | |
parent | fde33b554790379af624e3c4c548535ca4097546 (diff) | |
download | openttd-3b2145aafe29d6abd8aeef3dccdb5cf587f111d2.tar.xz |
(svn r12004) -Codechange: refactor the random functions to reduce code duplication.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index 1cd128181..b8a53feb5 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -1235,9 +1235,9 @@ static bool NetworkDoClientLoop() if (_sync_frame != 0) { if (_sync_frame == _frame_counter) { #ifdef NETWORK_SEND_DOUBLE_SEED - if (_sync_seed_1 != _random_seeds[0][0] || _sync_seed_2 != _random_seeds[0][1]) { + if (_sync_seed_1 != _random.state[0] || _sync_seed_2 != _random.state[1]) { #else - if (_sync_seed_1 != _random_seeds[0][0]) { + if (_sync_seed_1 != _random.state[0]) { #endif NetworkError(STR_NETWORK_ERR_DESYNC); DebugDumpCommands("ddc:serr:%d;%d\n", _date, _date_fract); @@ -1332,9 +1332,9 @@ void NetworkGameLoop() // Then we make the frame StateGameLoop(); - _sync_seed_1 = _random_seeds[0][0]; + _sync_seed_1 = _random.state[0]; #ifdef NETWORK_SEND_DOUBLE_SEED - _sync_seed_2 = _random_seeds[0][1]; + _sync_seed_2 = _random.state[1]; #endif NetworkServer_Tick(send_frame); |