diff --git a/dlls/game.cpp b/dlls/game.cpp index 9b69cac9..b109f376 100644 --- a/dlls/game.cpp +++ b/dlls/game.cpp @@ -25,11 +25,12 @@ cvar_t timeleft = { "mp_timeleft","0" , FCVAR_SERVER | FCVAR_UNLOGGED }; // " // multiplayer server rules cvar_t teamplay = { "mp_teamplay","0", FCVAR_SERVER }; -cvar_t fraglimit = {"mp_fraglimit","0", FCVAR_SERVER }; +cvar_t fraglimit = { "mp_fraglimit","0", FCVAR_SERVER }; cvar_t timelimit = { "mp_timelimit","0", FCVAR_SERVER }; 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 forcerespawn = { "mp_forcerespawn","1", FCVAR_SERVER }; cvar_t flashlight = { "mp_flashlight","0", FCVAR_SERVER }; cvar_t aimcrosshair = { "mp_autocrosshair","1", FCVAR_SERVER }; @@ -467,6 +468,7 @@ void GameDLLInit( void ) CVAR_REGISTER( &friendlyfire ); CVAR_REGISTER( &falldamage ); CVAR_REGISTER( &weaponstay ); + CVAR_REGISTER( &selfgauss ); CVAR_REGISTER( &forcerespawn ); CVAR_REGISTER( &flashlight ); CVAR_REGISTER( &aimcrosshair ); diff --git a/dlls/game.h b/dlls/game.h index 925010f3..e29b2563 100644 --- a/dlls/game.h +++ b/dlls/game.h @@ -27,6 +27,7 @@ extern cvar_t timelimit; extern cvar_t friendlyfire; extern cvar_t falldamage; extern cvar_t weaponstay; +extern cvar_t selfgauss; extern cvar_t forcerespawn; extern cvar_t flashlight; extern cvar_t aimcrosshair; diff --git a/dlls/gauss.cpp b/dlls/gauss.cpp index d3e005c2..62af08e1 100644 --- a/dlls/gauss.cpp +++ b/dlls/gauss.cpp @@ -24,6 +24,7 @@ #include "soundent.h" #include "shake.h" #include "gamerules.h" +#include "game.h" #define GAUSS_PRIMARY_CHARGE_VOLUME 256// how loud gauss is while charging #define GAUSS_PRIMARY_FIRE_VOLUME 450// how loud gauss is when discharged @@ -512,6 +513,10 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage ) vecSrc = beam_tr.vecEndPos + vecDir; } + else if( !selfgauss.value ) + { + flDamage = 0; + } } else {