plan9fox/sys
cinap_lenrek dd4c85cf3a games/doom: fix array offsets for respawn angle (thanks qu7uux)
mthing->angle is a signed short, and if ANG45 * mthing->angle/45 < 0, the
result of the right shift is sign extended.
afaik, an being 16bit in the dos version of doom, you'd endup with a
negative array offset, which would just access values from adjacent arrays
(finetangent[] for finecosine[], and finecosine[] for finesine[]), and it
would result in a misplaced teleport fog in some circumstances (fog is not
in front of the player on respawn, hence "silent teleport"). so, this fix is
bug incompatible, but this only affects live multiplay.
to test:
% hget http://doomedsda.us/dm/ahfx7_2.zip | unzip -sv
extracting AHFX7_2.TXT
extracting AHFX7_2.LMP
% mv AHFX7_2.LMP ahfx7_2.lmp
% games/doom -playdemo ahfx7_2
[...]
doom 10553: suicide: sys: trap: fault read addr=0x400429e10 pc=0x205b45
2015-08-16 22:12:11 +02:00
..
doc /sys/doc: permissions for cleanps, mkdirlist, mkfilelist 2012-10-20 19:09:54 +02:00
games/lib fortunes: If you want to do the work, I will review the results. 2015-08-09 00:36:10 -04:00
include ape: implement altzone for tzset() 2015-08-04 02:01:41 +02:00
lib acid -k: fix intrcount() for amd64 2015-08-09 22:43:53 +02:00
man rio(4): document "delete" wctl message (thanks mischief) 2015-08-16 02:54:23 +02:00
src games/doom: fix array offsets for respawn angle (thanks qu7uux) 2015-08-16 22:12:11 +02:00