Mapped reload to X_BUTTON.

Introduce `JO_ACTION*` constants to use `player.bondreloadoractivate` as a bit
field.

Deviation from vanilla Mouse Injector behavior: hard seperation between
reload and activate. `B` will not reload just as `ALT1` will not
activate.
This commit is contained in:
Catherine Reprobate committed 2023-08-18 14:09:45 -07:00
1 parent 12571746d7
commit 68c00af44e
4 files changed
+25 -3

No files matched your search

+9 -2
View File
@@ -1287,11 +1287,18 @@ Gfx *lvRender(Gfx *gdl)
}
// Handle opening doors and reloading
if (g_Vars.currentplayer->bondactivateorreload) {
if (currentPlayerInteract(false)) {
if (g_Vars.currentplayer->bondactivateorreload & JO_ACTION_RELOAD) {
if (g_Vars.currentplayer->hands[HAND_RIGHT].state != HANDSTATE_RELOAD){
bgunReloadIfPossible(HAND_RIGHT);
}
if (g_Vars.currentplayer->hands[HAND_LEFT].state != HANDSTATE_RELOAD) {
bgunReloadIfPossible(HAND_LEFT);
}
g_Vars.currentplayer->bondactivateorreload = (g_Vars.currentplayer->bondactivateorreload & ~JO_ACTION_RELOAD) | (g_Vars.currentplayer->bondactivateorreload & 0x0);
}
if (g_Vars.currentplayer->bondactivateorreload & JO_ACTION_ACTIVATE) {
currentPlayerInteract(false);
} else if (g_Vars.currentplayer->eyespy
&& g_Vars.currentplayer->eyespy->active
&& g_Vars.currentplayer->eyespy->opendoor) {