From 1b7051768c65fe2886f1a562f5741a1e2d9acd11 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 29 Jan 2008 00:27:25 +0000 Subject: (svn r12004) -Codechange: refactor the random functions to reduce code duplication. --- src/network/network.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/network') 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); -- cgit v1.2.3-70-g09d2