Browse Source

Add mp_allow_hook cvar to turn on/off hook on spawn.

dmc
Night Owl 7 years ago
parent
commit
e1fb9e4321
  1. 8
      dlls/3wave/threewave_gamerules.cpp
  2. 2
      dlls/game.cpp
  3. 1
      dlls/game.h

8
dlls/3wave/threewave_gamerules.cpp

@ -426,7 +426,11 @@ void CThreeWave::PlayerSpawn( CBasePlayer *pPlayer ) @@ -426,7 +426,11 @@ void CThreeWave::PlayerSpawn( CBasePlayer *pPlayer )
// Start with shotgun and axe
pPlayer->GiveNamedItem( "weapon_quakegun" );
pPlayer->m_iQuakeItems |= ( IT_SHOTGUN | IT_AXE | IT_EXTRA_WEAPON );
pPlayer->m_iQuakeItems |= ( IT_SHOTGUN | IT_AXE );
if( allowhook.value )
pPlayer->m_iQuakeItems |= IT_EXTRA_WEAPON;
pPlayer->m_iQuakeWeapon = pPlayer->W_BestWeapon();
pPlayer->W_SetCurrentAmmo();
@ -835,7 +839,7 @@ void CThreeWave::PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entvars @@ -835,7 +839,7 @@ void CThreeWave::PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entvars
if( pTeamMate )
{
if ( pTeamMate->m_bHasFlag )
if( pTeamMate->m_bHasFlag )
{
pTeamMate->pFlagCarrierKiller = pk;
pTeamMate->m_flFlagCarrierKillTime = gpGlobals->time + TEAM_CAPTURE_FRAG_CARRIER_ASSIST_TIMEOUT;

2
dlls/game.cpp

@ -45,6 +45,7 @@ cvar_t teamoverride = { "mp_teamoverride","1" }; @@ -45,6 +45,7 @@ cvar_t teamoverride = { "mp_teamoverride","1" };
cvar_t defaultteam = { "mp_defaultteam","0" };
cvar_t allowmonsters = { "mp_allowmonsters","0", FCVAR_SERVER };
cvar_t bhopcap = { "mp_bhopcap", "1", FCVAR_SERVER };
cvar_t allowhook = { "mp_allow_hook", "1", FCVAR_SERVER };
cvar_t allow_spectators = { "allow_spectators", "0", FCVAR_SERVER }; // 0 prevents players from being spectators
@ -485,6 +486,7 @@ void GameDLLInit( void ) @@ -485,6 +486,7 @@ void GameDLLInit( void )
CVAR_REGISTER( &defaultteam );
CVAR_REGISTER( &allowmonsters );
CVAR_REGISTER( &bhopcap );
CVAR_REGISTER( &allowhook );
CVAR_REGISTER( &mp_chattime );

1
dlls/game.h

@ -35,6 +35,7 @@ extern cvar_t teamlist; @@ -35,6 +35,7 @@ extern cvar_t teamlist;
extern cvar_t teamoverride;
extern cvar_t defaultteam;
extern cvar_t allowmonsters;
extern cvar_t allowhook;
// Engine Cvars
extern cvar_t *g_psv_gravity;

Loading…
Cancel
Save