From fcfccfe739f16b452f69e8062e8aa23eeabe75c5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Dec 2018 12:40:26 +0100 Subject: [PATCH] - fixed random number generation in SpawnFizzle. This should now produce the same value range as Hexen's original code. --- wadsrc/static/zscript/hexen/heresiarch.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/zscript/hexen/heresiarch.txt b/wadsrc/static/zscript/hexen/heresiarch.txt index 79ffc92f57..579661300f 100644 --- a/wadsrc/static/zscript/hexen/heresiarch.txt +++ b/wadsrc/static/zscript/hexen/heresiarch.txt @@ -246,8 +246,8 @@ class Heresiarch : Actor if (mo) { double rangle = Angle + random[Heresiarch](0, 4) * (4096 / 360.); - mo.Vel.X = random[Heresiarch](0, speed - 1) * cos(rangle); - mo.Vel.Y = random[Heresiarch](0, speed - 1) * sin(rangle); + mo.Vel.X = random[Heresiarch](0, int(speed) - 1) * cos(rangle); + mo.Vel.Y = random[Heresiarch](0, int(speed) - 1) * sin(rangle); mo.Vel.Z = 2; } }