The game will now autodetect if it should run in shareware mode or full
retail based on the found mpq file. Additionally it can beforced in the
shareware mode with --spawn even if the retail data is found.
This simplifies a lot of the spagetty code and lets us better refactor,
also worth noteing is that we won't have to setup a secound set of build
tests.
The issue here is probably very unlikely to trigger anything in-game, as
the first 4 monster array elements are reserverd for golems. However,
after executing the body of the `if (mi != 0) { mi-- }` if-statement,
it is not possible to determine whether mi was 0 or 1 before executing
the body. This is relevant as the pack member check should only be
performed if mi was non-zero prior to executing the body of the
if-statement.
A fixed may look something as follows:
if (mi != 0) {
mi--;
// BUGFIX: should only run pack member check if mi was non-zero prior to executing the body of the above if-statemnet (fixed).
if (monster[mi].leaderflag == 1
&& monster[mi].leader == i
&& monster[mi]._mfutx == x
&& monster[mi]._mfuty == y) {
mcount++;
}
The dMonster array stores monster array index numbers + 1
(or the corresponding negative version -(index + 1)).
Prior to use, these must be decremented by 1.