The out-of-bounds check in MAI_Fallen checks whether the relative
offset coordinates (x, y) are out of bounds, rather than the
absoulte coordinate (xpos, ypos) which is used for array access
into dMonster.
MWVel velocity values are not rounded consistently (inconsistent use of
floor and ceil). The original formula is (for 16, 32 and 64 pixels of
movement, respectively):
vel16 = (16 << monsterWalkShift) / nframes
vel32 = (32 << monsterWalkShift) / nframes
vel64 = (64 << monsterWalkShift) / nframes
The BUGFIX comment contains updated monster walk velocity values for
the MWVel table, where the formala is calculated as above with consistent
rounding to nearest integer.
Also, correct minor typo in BUGFIX of M2MStartHit. The DevilX code
is correct in M2MStartHit (the Devilution comment used
`<=` rather than `<`).
Both were related to the special handling of golem monster numbers.
Having golems occupy the first 4 monster number slots feels like
such a lovely hack :P
The index used to access monster was incorrect for the fallen
one flee behaviour. The AI should make fallen ones flee from
the direction of the monster which got hit. Right now, it's
random as the wrong index is used.