Ideya Capture with 0 angle causes a divide-by-zero crash
This crash occurs at the line amount = (amount * length)/origamount;
in st_stuff.c
. origamount
is initialized from the Ideya Capture's angle, hence the crash when it's 0. Previously, this would never be the case unless the map maker wanted to create a NiGHTS mare that didn't require the collection of any spheres. But in UDMF maps, the angle isn't what determines the amount of spheres required, so it shouldn't be using it to initialize origamount
.
Luckily, the workaround is trivial: simply set the angle to the same value. However, it's worth mentioning another side effect I noticed when the angle is different: I set it to require 1 sphere, but set the angle to 4 as an experiment. The map worked fine, but when I started, instead of saying "GET 1 CHIP!" it said "GET 1 MORE CHIP!"