This commit is contained in:
Night Owl 2017-07-19 03:22:08 +05:00
parent 426a0e7ab3
commit 51c682c15e
3 changed files with 9 additions and 1 deletions

View File

@ -25,11 +25,12 @@ cvar_t timeleft = { "mp_timeleft","0" , FCVAR_SERVER | FCVAR_UNLOGGED }; // "
// multiplayer server rules // multiplayer server rules
cvar_t teamplay = { "mp_teamplay","0", FCVAR_SERVER }; 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 timelimit = { "mp_timelimit","0", FCVAR_SERVER };
cvar_t friendlyfire = { "mp_friendlyfire","0", FCVAR_SERVER }; cvar_t friendlyfire = { "mp_friendlyfire","0", FCVAR_SERVER };
cvar_t falldamage = { "mp_falldamage","0", FCVAR_SERVER }; cvar_t falldamage = { "mp_falldamage","0", FCVAR_SERVER };
cvar_t weaponstay = { "mp_weaponstay","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 forcerespawn = { "mp_forcerespawn","1", FCVAR_SERVER };
cvar_t flashlight = { "mp_flashlight","0", FCVAR_SERVER }; cvar_t flashlight = { "mp_flashlight","0", FCVAR_SERVER };
cvar_t aimcrosshair = { "mp_autocrosshair","1", FCVAR_SERVER }; cvar_t aimcrosshair = { "mp_autocrosshair","1", FCVAR_SERVER };
@ -467,6 +468,7 @@ void GameDLLInit( void )
CVAR_REGISTER( &friendlyfire ); CVAR_REGISTER( &friendlyfire );
CVAR_REGISTER( &falldamage ); CVAR_REGISTER( &falldamage );
CVAR_REGISTER( &weaponstay ); CVAR_REGISTER( &weaponstay );
CVAR_REGISTER( &selfgauss );
CVAR_REGISTER( &forcerespawn ); CVAR_REGISTER( &forcerespawn );
CVAR_REGISTER( &flashlight ); CVAR_REGISTER( &flashlight );
CVAR_REGISTER( &aimcrosshair ); CVAR_REGISTER( &aimcrosshair );

View File

@ -27,6 +27,7 @@ extern cvar_t timelimit;
extern cvar_t friendlyfire; extern cvar_t friendlyfire;
extern cvar_t falldamage; extern cvar_t falldamage;
extern cvar_t weaponstay; extern cvar_t weaponstay;
extern cvar_t selfgauss;
extern cvar_t forcerespawn; extern cvar_t forcerespawn;
extern cvar_t flashlight; extern cvar_t flashlight;
extern cvar_t aimcrosshair; extern cvar_t aimcrosshair;

View File

@ -24,6 +24,7 @@
#include "soundent.h" #include "soundent.h"
#include "shake.h" #include "shake.h"
#include "gamerules.h" #include "gamerules.h"
#include "game.h"
#define GAUSS_PRIMARY_CHARGE_VOLUME 256// how loud gauss is while charging #define GAUSS_PRIMARY_CHARGE_VOLUME 256// how loud gauss is while charging
#define GAUSS_PRIMARY_FIRE_VOLUME 450// how loud gauss is when discharged #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; vecSrc = beam_tr.vecEndPos + vecDir;
} }
else if( !selfgauss.value )
{
flDamage = 0;
}
} }
else else
{ {