summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorsignde <signde@openttd.org>2004-09-13 22:49:11 +0000
committersignde <signde@openttd.org>2004-09-13 22:49:11 +0000
commitbb2f8d8d1abf3ed4951eea13361d64127e4a6b8c (patch)
tree02ce8b5c8de35962f0c0bf28891aae99421d0ea7 /misc.c
parent9258f81405dd8080737d45fc72b365eac4154749 (diff)
downloadopenttd-bb2f8d8d1abf3ed4951eea13361d64127e4a6b8c.tar.xz
(svn r240) -Fix: desync on subsidy generation
-Fix: sometimes commands got executed to early on some clients -Feature: universal event packets for transmitting subsidys
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index dcaf494db..b353c5e27 100644
--- a/misc.c
+++ b/misc.c
@@ -44,6 +44,11 @@ uint32 InteractiveRandom()
return _random_seeds[1][1] = ROR(s, 3);
}
+uint InteractiveRandomRange(uint max)
+{
+ return (uint16)InteractiveRandom() * max >> 16;
+}
+
void InitPlayerRandoms()
{
int i;