misc.c
changeset 1446 415d83e81629
parent 1375 f13d8247928c
child 1517 b77361b13ae4
--- a/misc.c	Sun Mar 06 21:20:34 2005 +0000
+++ b/misc.c	Sun Mar 06 22:28:35 2005 +0000
@@ -49,20 +49,20 @@
 	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);
-		return _random_seeds[0][1] = ROR(s, 3);
+		_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);
+		_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);
+		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);
-	return _random_seeds[0][1] = ROR(s, 3);
+	_random_seeds[0][0] = s + ROR(t ^ 0x1234567F, 7) + 1;
+	return _random_seeds[0][1] = ROR(s, 3) - 1;
 #endif
 }
 
@@ -82,8 +82,8 @@
 {
 	uint32 t = _random_seeds[1][1];
 	uint32 s = _random_seeds[1][0];
-	_random_seeds[1][0] = s + ROR(t ^ 0x1234567F, 7);
-	return _random_seeds[1][1] = ROR(s, 3);
+	_random_seeds[1][0] = s + ROR(t ^ 0x1234567F, 7) + 1;
+	return _random_seeds[1][1] = ROR(s, 3) - 1;
 }
 
 uint InteractiveRandomRange(uint max)