Skip to content

Commit

Permalink
Merge branch 'port' into port-net
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfdsfgs committed May 14, 2024
2 parents 57b1e37 + fef8985 commit abc6612
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/game/bondgun.c
Original file line number Diff line number Diff line change
Expand Up @@ -11785,6 +11785,7 @@ s32 bgunConsiderToggleGunFunction(s32 usedowntime, bool trigpressed, bool fromac
{
#ifndef PLATFORM_N64
const bool extcontrols = PLAYER_EXTCFG().extcontrols || g_Vars.currentplayer->isremote;
bool docontinue;
#endif
switch (bgunGetWeaponNum(HAND_RIGHT)) {
case WEAPON_SNIPERRIFLE:
Expand All @@ -11809,7 +11810,6 @@ s32 bgunConsiderToggleGunFunction(s32 usedowntime, bool trigpressed, bool fromac
}

#ifndef PLATFORM_N64
bool docontinue;
if (extcontrols) {
docontinue = (ABS(usedowntime) < 0);
} else {
Expand All @@ -11831,6 +11831,18 @@ s32 bgunConsiderToggleGunFunction(s32 usedowntime, bool trigpressed, bool fromac
g_Vars.currentplayer->hands[HAND_RIGHT].activatesecondary = true;
return (extcontrols ? USETIMER_STOP : USETIMER_REPEAT);
case WEAPON_RCP120:
#ifndef PLATFORM_N64
// very special alt-button handling for RCP-120's cloaking
if (!trigpressed && extcontrols && fromdedicatedbutton) {
if (g_Vars.currentplayer->devicesactive & DEVICE_CLOAKRCP120) {
g_Vars.currentplayer->devicesactive &= ~DEVICE_CLOAKRCP120;
} else {
g_Vars.currentplayer->devicesactive = (g_Vars.currentplayer->devicesactive & ~DEVICE_CLOAKRCP120) | DEVICE_CLOAKRCP120;
}
g_Vars.currentplayer->gunctrl.invertgunfunc = false;
return USETIMER_STOP;
}
#endif
case WEAPON_LAPTOPGUN:
case WEAPON_DRAGON:
case WEAPON_REMOTEMINE:
Expand Down

0 comments on commit abc6612

Please sign in to comment.