# HG changeset patch # User ludde # Date 1121517003 0 # Node ID 548ff600bb1123b499ac7da86b07ea3ae90e8eb8 # Parent a271195b2722bd8f32e4bbc58b06c294e2697264 (svn r2588) Codechange: Remove PLAYER_SEED_RANDOM diff -r a271195b2722 -r 548ff600bb11 functions.h --- a/functions.h Sat Jul 16 09:55:31 2005 +0000 +++ b/functions.h Sat Jul 16 12:30:03 2005 +0000 @@ -123,12 +123,6 @@ static inline TileIndex RandomTile(void) { return TILE_MASK(Random()); } -#ifdef PLAYER_SEED_RANDOM -void InitPlayerRandoms(void); -#endif - - - uint32 InteractiveRandom(void); /* Used for random sequences that are not the same on the other end of the multiplayer link */ uint InteractiveRandomRange(uint max); diff -r a271195b2722 -r 548ff600bb11 misc.c --- a/misc.c Sat Jul 16 09:55:31 2005 +0000 +++ b/misc.c Sat Jul 16 12:30:03 2005 +0000 @@ -24,11 +24,6 @@ return (x >> n) + (x << ((sizeof(x)*8)-n)); } -/* XXX - Player-seeds don't seem to be used anymore.. which is a good thing - so I just disabled them for now. If there are no problems, we can remove - it completely! -- TrueLight */ -#undef PLAYER_SEED_RANDOM - #ifndef MERSENNE_TWISTER #ifdef RANDOM_DEBUG @@ -47,25 +42,10 @@ printf("Random [%d/%d] %s:%d\n",_frame_counter, _current_player, file, line); #endif -#ifdef PLAYER_SEED_RANDOM - if (_current_player>=MAX_PLAYERS || !_networking) { - s = _random_seeds[0][0]; - t = _random_seeds[0][1]; - _random_seeds[0][0] = s + ROR(t ^ 0x1234567F, 7) + 1; - return _random_seeds[0][1] = ROR(s, 3) - 1; - } else { - uint32 s = _player_seeds[_current_player][0]; - uint32 t = _player_seeds[_current_player][1]; - _player_seeds[_current_player][0] = s + ROR(t ^ 0x1234567F, 7) + 1; - DEBUG(net, 1)("[NET-Seeds] Player seed called!"); - return _player_seeds[_current_player][1] = ROR(s, 3) - 1; - } -#else s = _random_seeds[0][0]; t = _random_seeds[0][1]; _random_seeds[0][0] = s + ROR(t ^ 0x1234567F, 7) + 1; return _random_seeds[0][1] = ROR(s, 3) - 1; -#endif } #endif // MERSENNE_TWISTER @@ -95,18 +75,6 @@ return (uint16)InteractiveRandom() * max >> 16; } - -#ifdef PLAYER_SEED_RANDOM -void InitPlayerRandoms(void) -{ - int i; - for (i=0; i