summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorludde <ludde@openttd.org>2005-07-16 12:30:03 +0000
committerludde <ludde@openttd.org>2005-07-16 12:30:03 +0000
commitf12b3a0c1816dc5a8b95132b95025740f6c2b438 (patch)
tree2361c1137f7e4f78b97f2e2bbcc634b6b9a0fdd7 /misc.c
parent19cb5e054a385c382b196df9cfcb90f59f053cbb (diff)
downloadopenttd-f12b3a0c1816dc5a8b95132b95025740f6c2b438.tar.xz
(svn r2588) Codechange: Remove PLAYER_SEED_RANDOM
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/misc.c b/misc.c
index 0beffba71..193c7fa22 100644
--- a/misc.c
+++ b/misc.c
@@ -24,11 +24,6 @@ static inline uint32 ROR(uint32 x, int n)
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 @@ uint32 t;
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 @@ uint InteractiveRandomRange(uint max)
return (uint16)InteractiveRandom() * max >> 16;
}
-
-#ifdef PLAYER_SEED_RANDOM
-void InitPlayerRandoms(void)
-{
- int i;
- for (i=0; i<MAX_PLAYERS; i++) {
- _player_seeds[i][0]=InteractiveRandom();
- _player_seeds[i][1]=InteractiveRandom();
- }
-}
-#endif
-
void SetDate(uint date)
{
YearMonthDay ymd;