Merge pull request #121 from rafccq/port

Bug fix: double reload
This commit is contained in:
fgsfds authored and GitHub committed 2023-09-08 12:59:32 +02:00
commit 33e2f15f49
2 files changed
+4 -2

No files matched your search

+1
View File
@@ -1310,6 +1310,7 @@ s32 bgunTickIncIdle(struct handweaponinfo *info, s32 handnum, struct hand *hand,
hand->count = 0;
if (bgunSetState(handnum, HANDSTATE_RELOAD)) {
hand->modenext = HANDMODE_NONE;
return lvupdate;
}
}
+3 -2
View File
@@ -1291,13 +1291,14 @@ Gfx *lvRender(Gfx *gdl)
// Handle opening doors and reloading
if (g_Vars.currentplayer->bondactivateorreload & JO_ACTION_RELOAD) {
if (g_Vars.currentplayer->hands[HAND_RIGHT].state != HANDSTATE_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) {