EVENT_ANALYZESPRITES drawnsprites is not working correctly
How to repro: write "test.m32" in duke dir with the following contents and create a map with one or more wall/floor aligned sprites (voxels work too)
gamevar rotang 0 0
gamevar i 0 0
onevent EVENT_ANALYZESPRITES
add rotang 4
ifg rotang 2047 set rotang 0
for i drawnsprites
{
addlogvar i
set tsprite[i].ang rotang
}
endevent
Sector A with 1 sprite will show an i
value of 0
Sector B with 4 sprites will show an i
value of 0, 1, 2
Iterator verified to work by placing an addlogvar
before endevent
What should happen: Sprites on screen should assume angle from rotang (visually, in tsprite)
What happens:
Nothing -- It seems that iterator i
doesn't work inside set tsprite[i].ang rotang
despite appearing correctly on previous line
When set tsprite[i].ang rotang
is replaced with a static number, such as 0
or 1
- the sprite(s) in question will rotate.