From 696ddec8a8084581ea7642b66f96533166acbaa6 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 29 Oct 2018 06:34:19 +0000 Subject: [PATCH] Fix a big fail in my implementation of CON_DIVR and CON_DIVRU. git-svn-id: https://svn.eduke32.com/eduke32@7137 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/gameexec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 361475ec3..db8318c92 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -5295,7 +5295,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop) continue; } - Gv_SetVarX(tw, tabledivide32((dividend - ksgn(dividend) * klabs(divisor / 2)), divisor)); + Gv_SetVarX(tw, tabledivide32((dividend + ksgn(dividend) * klabs(divisor / 2)), divisor)); continue; } @@ -5313,7 +5313,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop) continue; } - Gv_SetVarX(tw, tabledivide32((dividend - ksgn(dividend) * klabs(divisor) + 1), divisor)); + Gv_SetVarX(tw, tabledivide32((dividend + ksgn(dividend) * klabs(divisor) + 1), divisor)); continue; }