svkaiser / Doom64EX

Doom64EX is a reverse-engineering project aimed to recreate Doom64 as close as possible with additional modding features.
http://doom64ex.wordpress.com/
GNU General Public License v2.0
239 stars 49 forks source link

Reversed condition in P_ScanSights #51

Closed haleyjd closed 7 years ago

haleyjd commented 7 years ago

The comparison at https://github.com/svkaiser/Doom64EX/blob/45c3dacc7c0ce4e64e50b251c8dc3a6f78334bea/src/engine/playloop/p_sight.c#L373 should be testing != 1 instead of == 1, which matches the GAS assembler in Jaguar Doom as well as a second look at the Doom 64 assembly:

li $s3, 1 ... lw $t7, mobj_t.tics($s0) nop bne $s3, $t7, loc_8001EB98

The side effect of this error is that monsters with chase states of 1 tic in duration may become docile after losing sight of a player that has not attacked them after waking up by seeing him, as their subsequent sight checks will be rejected. I am not sure if this fits any Doom 64 monsters (the cacodemon was affected in the Calico project).

pinkwah commented 7 years ago

Thanks, mate.