the aimfix was working only on half of the attack, since the supershotgun shoots 2 times (half bullets left, half bullets right)
to carefully test it i tried to comment out 1 of the 2 shots while also keep yaw change to 0
in 1 case the bullets hit around the crossair, in the other case the bullets were not centered around the crossair.
i added the same fix to the shot that did not have it, and it worked.
i tested it out with yaw-5 and yaw+5 with both shots shooting at the same time and the bullets appeared to gather into 2 distinct clusters one left side of crossair, one right side of crossair like 2 eyes on the wall
This ensures that we call ARM64 `aarch64` on all platform, which aren't
MacOS or Windows. And it fixes the bug, that `arm64` was normalized to
`arm`, making incompatible savegames between 32 bit and 64 bit ARM
loadable. Leading to crashes.
src/g_items.c:2869:6: warning: variable ‘index’ set but not used [-Wunused-but-set-variable]
src/g_phys.c:535:10: warning: variable ‘mins’ set but not used [-Wunused-but-set-variable]
src/g_phys.c:535:16: warning: variable ‘maxs’ set but not used [-Wunused-but-set-variable]
src/g_spawn.c:575:6: warning: variable ‘oldmaxent’ set but not used [-Wunused-but-set-variable]
src/g_target.c:537:6: warning: variable ‘effect’ set but not used [-Wunused-but-set-variable]
src/monster/boss2/boss2.c:564:11: warning: variable ‘enemy_infront’ set but not used [-Wunused-but-set-variable]
src/monster/boss3/boss31.c:601:8: warning: variable ‘range’ set but not used [-Wunused-but-set-variable]
src/monster/boss3/boss31.c:650:11: warning: variable ‘enemy_infront’ set but not used [-Wunused-but-set-variable]
src/monster/boss3/boss32.c:678:8: warning: variable ‘range’ set but not used [-Wunused-but-set-variable]
src/monster/boss3/boss32.c:811:11: warning: variable ‘enemy_infront’ set but not used [-Wunused-but-set-variable]
src/monster/boss/boss.c:797:8: warning: variable ‘length’ set but not used [-Wunused-but-set-variable]
src/player/hud.c:167:7: warning: variable ‘picnum’ set but not used [-Wunused-but-set-variable]
.. and use YQ2ARCH and YQ2OSTYPE instead of just ARCH and OSTYPE
for the defines, so it's consistent with the engine and xatrix+rogue.
$PROCESSOR_ARCHITECTURE seems to contain the architecture of the host,
but we need the architecture the current MinGW shell is targeting.
$MINGW_CHOST seems to be just that, and on my system it's either
i686-w64-mingw32 (mingw32.exe) or x86_64-w64-mingw32 (mingw64.exe)
(No idea what it looks like for Windows on ARM...)
As fixing this would otherwise break existing savegames, I bumped the
SAVEGAMEVER to "YQ2-4" and added a quirk for older savegameversions:
On Windows i386 savegames that contain "AMD64" instead of "i386" as
architecture are also accepted.
(For YQ2-1 this didn't seem necessary, apparently "i386" was hardcoded)
Fixed the following issues found by cppcheck:
```
[src\g_func.c:576] (warning) Either the condition 'if(other)' is redundant or there is possible null pointer dereference: other. [nullPointerRedundantCheck]
[src\g_func.c:1500] (warning) Either the condition 'if(other)' is redundant or there is possible null pointer dereference: other. [nullPointerRedundantCheck]
[src\g_func.c:1931] (warning) Either the condition 'if(other)' is redundant or there is possible null pointer dereference: other. [nullPointerRedundantCheck]
[src\g_func.c:2623] (warning) Either the condition 'if(other)' is redundant or there is possible null pointer dereference: other. [nullPointerRedundantCheck]
[src\g_misc.c:156] (warning) Identical condition '!self', second condition is always false [identicalConditionAfterEarlyExit]
[src\g_misc.c:337] (warning) Identical condition '!self', second condition is always false [identicalConditionAfterEarlyExit]
[src\g_phys.c:1109] (warning) Either the condition '!ent' is redundant or there is possible null pointer dereference: ent. [nullPointerRedundantCheck]
[src\g_spawn.c:372] (style) Defensive programming: The variable 'i' is used as an array index before it is checked that is within limits. This can mean that the array might be accessed out of bounds. Reorder conditions such as '(a[i] && i < 10)' to '(i < 10 && a[i])'. That way the array will not be accessed if the index is out of limits. [arrayIndexThenCheck]
[src\g_spawn.c:309] (warning) Identical condition '!ent', second condition is always false [identicalConditionAfterEarlyExit]
[src\g_utils.c:30] (warning) Identical condition '!from', second condition is always false [identicalConditionAfterEarlyExit]
[src\g_utils.c:69] (warning) Identical condition '!from', second condition is always false [identicalConditionAfterEarlyExit]
[src\monster\boss\boss.c:420] (warning) Either the condition '!self' is redundant or there is possible null pointer dereference: self. [nullPointerRedundantCheck]
[src\monster\boss\boss.c:749] (warning) Either the condition '!self' is redundant or there is possible null pointer dereference: self. [nullPointerRedundantCheck]
[src\monster\boss\boss.c:1032] (warning) Either the condition '!ent' is redundant or there is possible null pointer dereference: ent. [nullPointerRedundantCheck]
[src\monster\misc\move.c:437] (style) Condition '!enemy' is always false [knownConditionTrueFalse]
[src\player\client.c:529] (style) Condition 'attacker' is always true [knownConditionTrueFalse]
[src\player\client.c:529] (style) Condition 'inflictor' is always true [knownConditionTrueFalse]
[src\player\view.c:893] (warning) Either the condition '!ent' is redundant or there is possible null pointer dereference: ent. [nullPointerRedundantCheck]
[src\shared\shared.c:1160] (warning) Opposite inner 'if' condition leads to a dead code block (outer condition is '*s' and inner condition is '!*s'). [oppositeInnerCondition]
[src\shared\shared.c:1225] (warning) Opposite inner 'if' condition leads to a dead code block (outer condition is '*s' and inner condition is '!*s'). [oppositeInnerCondition]
[src\shared\shared.c:1303] (warning) Either the condition '!value' is redundant or there is possible null pointer dereference: value. [nullPointerRedundantCheck]
[src\zaero\acannon.c:431] (warning) Either the condition '!self' is redundant or there is possible null pointer dereference: self. [nullPointerRedundantCheck]
[src\zaero\ai.c:107] (warning) Either the condition '!self' is redundant or there is possible null pointer dereference: self. [nullPointerRedundantCheck]
```
Only these two are missing, I haven't figured out what should I do:
```
[src\monster\misc\move.c:650] (style) Condition 'rand()&(7==1)' is always false [knownConditionTrueFalse]
[src\zaero\mtest.c:506] (error) Resource leak: wCfgFile [resourceLeak]
```