forked from Ports/perfect_dark
Merge branch 'port' into port-debugger
This commit is contained in:
commit
5fea484089
4 files changed
+32
No files matched your search
@@ -100,6 +100,9 @@ struct cheat g_Cheats[] = {
|
||||
{ L_MPWEAPONS_114, WEAPON_DMC, 0, 0, CHEATFLAG_FIRINGRANGE }, // DMC
|
||||
{ L_MPWEAPONS_115, WEAPON_AR53, 0, 0, CHEATFLAG_FIRINGRANGE }, // AR53
|
||||
{ L_MPWEAPONS_116, WEAPON_RCP45, 0, 0, CHEATFLAG_FIRINGRANGE }, // RC-P45
|
||||
#ifndef PLATFORM_N64
|
||||
{ L_MPWEAPONS_215, 0, SOLOSTAGEINDEX_EXTRACTION, DIFF_A, CHEATFLAG_COMPLETION }, // Dual wield all guns
|
||||
#endif
|
||||
};
|
||||
|
||||
u32 cheatIsUnlocked(s32 cheat_id)
|
||||
@@ -1090,6 +1093,16 @@ struct menuitem g_CheatsGameplayMenuItems[] = {
|
||||
0,
|
||||
cheatCheckboxMenuHandler,
|
||||
},
|
||||
#ifndef PLATFORM_N64
|
||||
{
|
||||
MENUITEMTYPE_CHECKBOX,
|
||||
CHEAT_DUALWIELDALLGUNS,
|
||||
0,
|
||||
(uintptr_t)&cheatGetNameIfUnlocked,
|
||||
0,
|
||||
cheatCheckboxMenuHandler,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
MENUITEMTYPE_SEPARATOR,
|
||||
0,
|
||||
|
||||
@@ -291,6 +291,13 @@ bool weaponHasFlag(s32 itemid, u32 flag)
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
// always dual-wieldable if cheat is enabled
|
||||
if (cheatIsActive(CHEAT_DUALWIELDALLGUNS) && (flag == WEAPONFLAG_DUALWIELD)) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return (weapon->flags & flag) != 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -511,6 +511,17 @@ s32 invGiveWeaponsByProp(struct prop *prop)
|
||||
weaponnum = weapon->weaponnum;
|
||||
otherweaponnum;
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
// always allow picking up a second gun if dual wield cheat is on
|
||||
if (!g_Vars.normmplayerisrunning && cheatIsActive(CHEAT_DUALWIELDALLGUNS)) {
|
||||
if (invHasSingleWeaponExcAllGuns(weaponnum) && !invHasDoubleWeaponExcAllGuns(weaponnum, weaponnum)) {
|
||||
if (invGiveDoubleWeapon(weaponnum, weaponnum)) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cheatIsActive(CHEAT_PERFECTDARKNESS) && weaponnum == WEAPON_NIGHTVISION) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -449,6 +449,7 @@
|
||||
#define CHEAT_DMC 39
|
||||
#define CHEAT_AR53 40
|
||||
#define CHEAT_RCP45 41
|
||||
#define CHEAT_DUALWIELDALLGUNS 42
|
||||
|
||||
#define CHEATFLAG_TIMED 0
|
||||
#define CHEATFLAG_ALWAYSON 1
|
||||
|
||||
Reference in new issue
Block a user