mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-23 15:52:41 +02:00
port: clean up whitespace
This commit is contained in:
1 parent
28d6c5b827
commit
d8a26fa221
3 files changed
+16
-14
No files matched your search
+1
-1
@@ -101,7 +101,7 @@ struct cheat g_Cheats[] = {
|
||||
{ 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 cheat
|
||||
{ L_MPWEAPONS_215, 0, SOLOSTAGEINDEX_EXTRACTION, DIFF_A, CHEATFLAG_COMPLETION }, // Dual wield all guns
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -286,16 +286,18 @@ void currentPlayerZoomIn(f32 fovpersec)
|
||||
bool weaponHasFlag(s32 itemid, u32 flag)
|
||||
{
|
||||
struct weapon *weapon = weaponFindById(itemid);
|
||||
#ifndef PLATFORM_N64 //always return, that weapon is dual-wieldable if player sets the cheat.
|
||||
if (cheatIsActive(CHEAT_DUALWIELDALLGUNS) && (flag == WEAPONFLAG_DUALWIELD))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!weapon) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -510,14 +510,14 @@ s32 invGiveWeaponsByProp(struct prop *prop)
|
||||
weapon = prop->weapon;
|
||||
weaponnum = weapon->weaponnum;
|
||||
otherweaponnum;
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
//This piece of code makes the cheat work in singleplayer.
|
||||
if (cheatIsActive(CHEAT_DUALWIELDALLGUNS) && !g_Vars.normmplayerisrunning)
|
||||
{
|
||||
if(invHasSingleWeaponExcAllGuns(weaponnum) && (invHasDoubleWeaponExcAllGuns(weapon->weaponnum, weapon->weaponnum)==0))
|
||||
{
|
||||
invGiveDoubleWeapon(weaponnum, weaponnum);
|
||||
numgiven = 2;
|
||||
// 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
|
||||
|
||||
Reference in new issue
Block a user