]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commit
Fix OP_DIV_IF math.
authorRudolf Polzer <divVerent@gmail.com>
Fri, 3 Jan 2025 23:27:04 +0000 (18:27 -0500)
committerRudolf Polzer <divVerent@gmail.com>
Fri, 3 Jan 2025 23:40:44 +0000 (18:40 -0500)
commitbd0bccf314b4847234382e6308f38ce31fc780e4
tree30aac8a47915af08fef8dfe73145ccae9837a05b
parentdbebfea96dae5c8c75a2f8680768edc7851801c2
Fix OP_DIV_IF math.

Previously 5 / 1.25 returned 5 due to rounding the 1.25 to int and
performing an integer division.

Now 5 / 1.25 will return 4 due to converting the 5 to floating point and
performing a floating division.

Which is a lot more what one would expect, and also matches FTEQW.
prvm_execprogram.h