mirror of
https://github.com/ENSL/NS.git
synced 2025-01-22 01:01:17 +00:00
cl_weaponcfgs and onos charge stick update
This commit is contained in:
parent
30c66a434b
commit
22a171f4b5
3 changed files with 27 additions and 11 deletions
|
@ -694,16 +694,30 @@ void CHudAmmo::Think(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gHUD.GetCurrentWeaponID() != gWR.LastWeaponId)
|
if (gHUD.GetCurrentWeaponID() != gWR.lastWeaponId)
|
||||||
{
|
{
|
||||||
gWR.LastWeaponId = gHUD.GetCurrentWeaponID();
|
gWR.lastWeaponId = gHUD.GetCurrentWeaponID();
|
||||||
|
|
||||||
ClientCmd("exec weaponcfgs/default.cfg");
|
float wCfgCvar = CVAR_GET_FLOAT("cl_weaponcfgs");
|
||||||
|
|
||||||
WEAPON* currentWeapon = gWR.GetWeapon(gHUD.GetCurrentWeaponID());
|
if (wCfgCvar == 1)
|
||||||
char weapcfg[128];
|
{
|
||||||
sprintf(weapcfg, "exec weaponcfgs/%s.cfg", currentWeapon->szName);
|
ClientCmd("exec weaponcfgs/default.cfg");
|
||||||
ClientCmd(weapcfg);
|
|
||||||
|
WEAPON* currentWeapon = gWR.GetWeapon(gHUD.GetCurrentWeaponID());
|
||||||
|
char weapcfg[128];
|
||||||
|
sprintf(weapcfg, "exec weaponcfgs/%s.cfg", currentWeapon->szName);
|
||||||
|
ClientCmd(weapcfg);
|
||||||
|
}
|
||||||
|
//else if (wCfgCvar == 2.0f)
|
||||||
|
//{
|
||||||
|
// ClientCmd("exec weaponcfgs/nsdefaults/default.cfg");
|
||||||
|
|
||||||
|
// WEAPON* currentWeapon = gWR.GetWeapon(gHUD.GetCurrentWeaponID());
|
||||||
|
// char weapcfg[128];
|
||||||
|
// sprintf(weapcfg, "exec weaponcfgs/nsdefaults/%s.cfg", currentWeapon->szName);
|
||||||
|
// ClientCmd(weapcfg);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gHUD.GetIsAlien()) //check for hive death causing loss of current weapon
|
if(gHUD.GetIsAlien()) //check for hive death causing loss of current weapon
|
||||||
|
|
|
@ -76,7 +76,7 @@ private:
|
||||||
|
|
||||||
int riAmmo[MAX_AMMO_TYPES]; // current ammo counts
|
int riAmmo[MAX_AMMO_TYPES]; // current ammo counts
|
||||||
int iOldWeaponBits;
|
int iOldWeaponBits;
|
||||||
int LastWeaponId;
|
int lastWeaponId;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern WeaponsResource gWR;
|
extern WeaponsResource gWR;
|
||||||
|
|
|
@ -144,6 +144,7 @@ cvar_t *senslock;
|
||||||
cvar_t *hud_style;
|
cvar_t *hud_style;
|
||||||
cvar_t *cl_chatbeep;
|
cvar_t *cl_chatbeep;
|
||||||
cvar_t *cl_mutemenu;
|
cvar_t *cl_mutemenu;
|
||||||
|
cvar_t *cl_weaponcfgs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
@ -805,11 +806,11 @@ void IN_AttackUp(void)
|
||||||
{
|
{
|
||||||
KeyUp( &in_attack );
|
KeyUp( &in_attack );
|
||||||
in_cancel = 0;
|
in_cancel = 0;
|
||||||
|
|
||||||
// Attack2up only for onos so it can end +attack onos charges. Attack2up for all causes blink and leap to cancel if you release attack while blinking or leaping.
|
// Attack2up only for onos so it can end +attack onos charges. Attack2up for all causes blink and leap to cancel if you release attack while blinking or leaping.
|
||||||
if (gViewPort)
|
if (g_iUser3 == AVH_USER3_ALIEN_PLAYER5)
|
||||||
{
|
{
|
||||||
if (gHUD.GetHUDUser3() == AVH_USER3_ALIEN_PLAYER5)
|
IN_Attack2Up();
|
||||||
IN_Attack2Up();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1621,6 +1622,7 @@ void InitInput (void)
|
||||||
hud_style = gEngfuncs.pfnRegisterVariable ("hud_style", "1", FCVAR_ARCHIVE);
|
hud_style = gEngfuncs.pfnRegisterVariable ("hud_style", "1", FCVAR_ARCHIVE);
|
||||||
cl_chatbeep = gEngfuncs.pfnRegisterVariable ("cl_chatbeep", "1", FCVAR_ARCHIVE);
|
cl_chatbeep = gEngfuncs.pfnRegisterVariable ("cl_chatbeep", "1", FCVAR_ARCHIVE);
|
||||||
cl_mutemenu = gEngfuncs.pfnRegisterVariable ("cl_mutemenu", "3", FCVAR_ARCHIVE);
|
cl_mutemenu = gEngfuncs.pfnRegisterVariable ("cl_mutemenu", "3", FCVAR_ARCHIVE);
|
||||||
|
cl_weaponcfgs = gEngfuncs.pfnRegisterVariable ("cl_weaponcfgs", "1", FCVAR_ARCHIVE);
|
||||||
|
|
||||||
// Initialize third person camera controls.
|
// Initialize third person camera controls.
|
||||||
CAM_Init();
|
CAM_Init();
|
||||||
|
|
Loading…
Reference in a new issue