forked from Ports/perfect_dark
Bug fix: double reload, new approach
Reverted the previous changes, no longer necessary
This commit is contained in:
1 parent
ceac1be026
commit
84331c4d08
2 files changed
+3
-7
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-7
@@ -1291,16 +1291,11 @@ Gfx *lvRender(Gfx *gdl)
|
||||
|
||||
// Handle opening doors and reloading
|
||||
if (g_Vars.currentplayer->bondactivateorreload & JO_ACTION_RELOAD) {
|
||||
struct hand* hand = &g_Vars.currentplayer->hands[HAND_RIGHT];
|
||||
struct weaponfunc* func = weaponGetFunction(&hand->gset, hand->gset.weaponfunc);
|
||||
// ignore the player's request to reload here if the last bullet in the clip was just fired
|
||||
if (hand->state != HANDSTATE_RELOAD && !(hand->state == HANDSTATE_ATTACK && hand->loadedammo[func->ammoindex] == 0)) {
|
||||
if (g_Vars.currentplayer->hands[HAND_RIGHT].state != HANDSTATE_RELOAD) {
|
||||
bgunReloadIfPossible(HAND_RIGHT);
|
||||
}
|
||||
|
||||
hand = &g_Vars.currentplayer->hands[HAND_LEFT];
|
||||
func = weaponGetFunction(&hand->gset, hand->gset.weaponfunc);
|
||||
if (hand->state != HANDSTATE_RELOAD && !(hand->state == HANDSTATE_ATTACK && hand->loadedammo[func->ammoindex] == 0)) {
|
||||
if (g_Vars.currentplayer->hands[HAND_LEFT].state != HANDSTATE_RELOAD) {
|
||||
bgunReloadIfPossible(HAND_LEFT);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user