From 4225a414b3d8aa212bcbf78eb1b9d596aacfbdcb Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 28 Mar 2019 13:25:04 +0100 Subject: [PATCH] AddTrap almost bin exact --- Source/objects.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/objects.cpp b/Source/objects.cpp index e400561bb..157a5257d 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -1642,15 +1642,15 @@ void __fastcall AddFlameLvr(int i) void __fastcall AddTrap(int i) { - int mt; // eax + int mt; - mt = random(148, currlevel / 3 + 1); - if (!mt) - object[i]._oVar3 = 0; + mt = random(148, 1 + currlevel / 3); + if (mt == 0) + object[i]._oVar3 = 0; // arrow if (mt == 1) - object[i]._oVar3 = 1; + object[i]._oVar3 = 1; // firebolt if (mt == 2) - object[i]._oVar3 = 7; + object[i]._oVar3 = 7; // lightning object[i]._oVar4 = 0; }