diff --git a/dlls/game.cpp b/dlls/game.cpp index 284e5a9d..03ee0dca 100644 --- a/dlls/game.cpp +++ b/dlls/game.cpp @@ -31,6 +31,7 @@ cvar_t friendlyfire = { "mp_friendlyfire","0", FCVAR_SERVER }; cvar_t falldamage = { "mp_falldamage","0", FCVAR_SERVER }; cvar_t weaponstay = { "mp_weaponstay","0", FCVAR_SERVER }; cvar_t selfgauss = { "mp_selfgauss", "1", FCVAR_SERVER }; +cvar_t chargerfix = { "mp_chargerfix", "0", FCVAR_SERVER }; cvar_t satchelfix = { "mp_satchelfix", "0", FCVAR_SERVER }; cvar_t forcerespawn = { "mp_forcerespawn","1", FCVAR_SERVER }; cvar_t flashlight = { "mp_flashlight","0", FCVAR_SERVER }; @@ -471,6 +472,7 @@ void GameDLLInit( void ) CVAR_REGISTER( &falldamage ); CVAR_REGISTER( &weaponstay ); CVAR_REGISTER( &selfgauss ); + CVAR_REGISTER( &chargerfix ); CVAR_REGISTER( &satchelfix ); CVAR_REGISTER( &forcerespawn ); CVAR_REGISTER( &flashlight ); diff --git a/dlls/game.h b/dlls/game.h index 0dc5ba87..7eb665c6 100644 --- a/dlls/game.h +++ b/dlls/game.h @@ -28,6 +28,7 @@ extern cvar_t friendlyfire; extern cvar_t falldamage; extern cvar_t weaponstay; extern cvar_t selfgauss; +extern cvar_t chargerfix; extern cvar_t satchelfix; extern cvar_t forcerespawn; extern cvar_t flashlight; diff --git a/dlls/h_battery.cpp b/dlls/h_battery.cpp index 7b8182b3..e4c00467 100644 --- a/dlls/h_battery.cpp +++ b/dlls/h_battery.cpp @@ -26,6 +26,8 @@ #include "saverestore.h" #include "skill.h" #include "gamerules.h" +#include "weapons.h" +#include "game.h" class CRecharge : public CBaseToggle { @@ -116,7 +118,7 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use } // if the player doesn't have the suit, or there is no juice left, make the deny noise - if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( pActivator->pev->armorvalue == 100 ) ) + if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( chargerfix.value ) && ( pActivator->pev->armorvalue == MAX_NORMAL_BATTERY ) ) { if( m_flSoundTime <= gpGlobals->time ) { diff --git a/dlls/healthkit.cpp b/dlls/healthkit.cpp index cef99747..0f8c521e 100644 --- a/dlls/healthkit.cpp +++ b/dlls/healthkit.cpp @@ -22,6 +22,7 @@ #include "player.h" #include "items.h" #include "gamerules.h" +#include "game.h" extern int gmsgItemPickup; @@ -187,7 +188,7 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u } // if the player doesn't have the suit, or there is no juice left, make the deny noise - if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( pActivator->pev->health == 100 ) ) + if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( chargerfix.value ) && ( pActivator->pev->health >= pActivator->pev->max_health ) ) { if( m_flSoundTime <= gpGlobals->time ) {