From 4f55a41d99660f6cec2da883515f9cc26d335a46 Mon Sep 17 00:00:00 2001 From: Catherine Reprobate Date: Fri, 21 Mar 2025 10:22:09 -0700 Subject: [PATCH] add NVGs and IRGs to CS - fixes n64-bug: NVGs and IR goggles should not be dual-wieldable --- src/game/invitems.c | 4 ++-- src/game/mplayer/mplayer.c | 28 +++++++++++++++------------- src/include/constants.h | 2 +- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/game/invitems.c b/src/game/invitems.c index 89c7b0ed4..7597195bf 100644 --- a/src/game/invitems.c +++ b/src/game/invitems.c @@ -5118,7 +5118,7 @@ struct weapon invitem_nightvision = { L_GUN_059, // name L_GUN_000, // manufacturer L_GUN_191, // description - WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000080 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_UNDROPPABLE, + WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000080 | WEAPONFLAG_UNDROPPABLE, }; struct weaponfunc invfunc_horizonscanner_primary = { @@ -5344,7 +5344,7 @@ struct weapon invitem_irscanner = { L_GUN_069, // name L_GUN_000, // manufacturer L_GUN_194, // description - WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_UNDROPPABLE, + WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_UNDROPPABLE, }; struct weaponfunc invfunc_disguise_primary = { diff --git a/src/game/mplayer/mplayer.c b/src/game/mplayer/mplayer.c index b329f51db..9d9c73b53 100644 --- a/src/game/mplayer/mplayer.c +++ b/src/game/mplayer/mplayer.c @@ -100,23 +100,25 @@ struct mpweapon g_MpWeapons[NUM_MPWEAPONS] = { #ifndef PLATFORM_N64 // fix X-Ray Scanner model /*0x22*/ { WEAPON_XRAYSCANNER, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_XRAYSCANNER, MODEL_XRAYSPECS, 256 }, + /*0x23*/ { WEAPON_NIGHTVISION, 0, 0, 0, 0, 1, 0, MODEL_CHRNIGHTSIGHT, 256 }, + /*0x24*/ { WEAPON_IRSCANNER, 0, 0, 0, 0, 1, 0, MODEL_MISC_IRSPECS, 256 }, #else /*0x22*/ { WEAPON_XRAYSCANNER, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_XRAYSCANNER, MODEL_CHRNIGHTSIGHT, 256 }, #endif - /*0x23*/ { WEAPON_CLOAKINGDEVICE, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_CLOAKINGDEVICE, MODEL_CHRCLOAKER, 256 }, - /*0x24*/ { WEAPON_COMBATBOOST, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_COMBATBOOST, MODEL_CHRSPEEDPILL, 256 }, + /*0x25*/ { WEAPON_CLOAKINGDEVICE, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_CLOAKINGDEVICE, MODEL_CHRCLOAKER, 256 }, + /*0x26*/ { WEAPON_COMBATBOOST, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_COMBATBOOST, MODEL_CHRSPEEDPILL, 256 }, #ifndef PLATFORM_N64 - /*0x25*/ { WEAPON_PP9I, AMMOTYPE_PISTOL, 80, 0, 0, 1, 0, MODEL_CHRWPPK, 256 }, - /*0x26*/ { WEAPON_CC13, AMMOTYPE_PISTOL, 80, 0, 0, 1, 0, MODEL_CHRTT33, 256 }, - /*0x27*/ { WEAPON_KL01313, AMMOTYPE_SMG, 100, 0, 0, 1, 0, MODEL_CHRSKORPION, 256 }, - /*0x28*/ { WEAPON_KF7SPECIAL, AMMOTYPE_RIFLE, 100, 0, 0, 1, 0, MODEL_CHRKALASH, 256 }, - /*0x29*/ { WEAPON_ZZT, AMMOTYPE_SMG, 100, 0, 0, 1, 0, MODEL_CHRUZI, 256 }, - /*0x2a*/ { WEAPON_DMC, AMMOTYPE_SMG, 100, 0, 0, 1, 0, MODEL_CHRMP5K, 256 }, - /*0x2b*/ { WEAPON_AR53, AMMOTYPE_RIFLE, 150, 0, 0, 1, 0, MODEL_CHRM16, 256 }, - /*0x2c*/ { WEAPON_RCP45, AMMOTYPE_SMG, 150, 0, 0, 1, 0, MODEL_CHRFNP90, 256 }, + /*0x27*/ { WEAPON_PP9I, AMMOTYPE_PISTOL, 80, 0, 0, 1, 0, MODEL_CHRWPPK, 256 }, + /*0x28*/ { WEAPON_CC13, AMMOTYPE_PISTOL, 80, 0, 0, 1, 0, MODEL_CHRTT33, 256 }, + /*0x29*/ { WEAPON_KL01313, AMMOTYPE_SMG, 100, 0, 0, 1, 0, MODEL_CHRSKORPION, 256 }, + /*0x2a*/ { WEAPON_KF7SPECIAL, AMMOTYPE_RIFLE, 100, 0, 0, 1, 0, MODEL_CHRKALASH, 256 }, + /*0x2b*/ { WEAPON_ZZT, AMMOTYPE_SMG, 100, 0, 0, 1, 0, MODEL_CHRUZI, 256 }, + /*0x2c*/ { WEAPON_DMC, AMMOTYPE_SMG, 100, 0, 0, 1, 0, MODEL_CHRMP5K, 256 }, + /*0x2d*/ { WEAPON_AR53, AMMOTYPE_RIFLE, 150, 0, 0, 1, 0, MODEL_CHRM16, 256 }, + /*0x2e*/ { WEAPON_RCP45, AMMOTYPE_SMG, 150, 0, 0, 1, 0, MODEL_CHRFNP90, 256 }, #endif - /*0x2d*/ { WEAPON_MPSHIELD, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_SHIELD, MODEL_CHRSHIELD, 256 }, - /*0x2e*/ { WEAPON_DISABLED }, // 0x25 on N64 + /*0x2f*/ { WEAPON_MPSHIELD, 0, 0, 0, 0, 1, MPFEATURE_WEAPON_SHIELD, MODEL_CHRSHIELD, 256 }, + /*0x30*/ { WEAPON_DISABLED }, // 0x25 on N64 }; #ifndef PLATFORM_N64 @@ -138,7 +140,7 @@ struct mpweapon g_MpWeapons[NUM_MPWEAPONS] = { .usereloads = false, \ } -struct extplayerconfig g_PlayerExtCfg[MAX_PLAYERS] = { +struct extplayerconfig g_PlayerExtCfg[MAX_PLAYERS] = { PLAYER_EXT_CFG_DEFAULT, PLAYER_EXT_CFG_DEFAULT, PLAYER_EXT_CFG_DEFAULT, diff --git a/src/include/constants.h b/src/include/constants.h index 110e88f5b..32452ddab 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -3016,7 +3016,7 @@ #define MPWEAPON_RCP45 0x2c #define MPWEAPON_SHIELD 0x2d #define MPWEAPON_DISABLED 0x2e -#define NUM_MPWEAPONS 0x2f +#define NUM_MPWEAPONS 0x31 #endif #define MUSICEVENTTYPE_PLAY 1