summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
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;