Browse Source

Add mp_arcade cvar for arcade gamemode.

dmc
Night Owl 7 years ago
parent
commit
e3c44c4be7
  1. 17
      dlls/3wave/threewave_gamerules.cpp
  2. 2
      dlls/game.cpp
  3. 2
      dlls/game.h
  4. 2
      dlls/multiplay_gamerules.cpp

17
dlls/3wave/threewave_gamerules.cpp

@ -426,7 +426,22 @@ void CThreeWave::PlayerSpawn( CBasePlayer *pPlayer ) @@ -426,7 +426,22 @@ void CThreeWave::PlayerSpawn( CBasePlayer *pPlayer )
// Start with shotgun and axe
pPlayer->GiveNamedItem( "weapon_quakegun" );
pPlayer->m_iQuakeItems |= ( IT_SHOTGUN | IT_AXE );
if( arcade.value )
{
pPlayer->m_iQuakeItems |= ( IT_AXE | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_NAILGUN | IT_SUPER_NAILGUN | IT_GRENADE_LAUNCHER | IT_ROCKET_LAUNCHER | IT_LIGHTNING );
pPlayer->m_iAmmoRockets = 100;
pPlayer->m_iAmmoCells = 100;
pPlayer->m_iAmmoShells = 100;
pPlayer->m_iAmmoNails = 200;
pPlayer->pev->health = 200;
pPlayer->pev->armortype = 0.8;
pPlayer->pev->armorvalue = 200;
pPlayer->m_iQuakeItems &= ~( IT_ARMOR1 | IT_ARMOR2 | IT_ARMOR3 );
pPlayer->m_iQuakeItems |= IT_ARMOR3;
}
else
pPlayer->m_iQuakeItems |= ( IT_SHOTGUN | IT_AXE );
if( allowhook.value )
pPlayer->m_iQuakeItems |= IT_EXTRA_WEAPON;

2
dlls/game.cpp

@ -47,6 +47,7 @@ cvar_t allowmonsters = { "mp_allowmonsters","0", FCVAR_SERVER }; @@ -47,6 +47,7 @@ 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 instagib = { "mp_instagib", "0", FCVAR_SERVER };
cvar_t arcade = { "mp_arcade", "0", FCVAR_SERVER };
cvar_t allow_spectators = { "allow_spectators", "0", FCVAR_SERVER }; // 0 prevents players from being spectators
@ -489,6 +490,7 @@ void GameDLLInit( void ) @@ -489,6 +490,7 @@ void GameDLLInit( void )
CVAR_REGISTER( &bhopcap );
CVAR_REGISTER( &allowhook );
CVAR_REGISTER( &instagib );
CVAR_REGISTER( &arcade );
CVAR_REGISTER( &mp_chattime );

2
dlls/game.h

@ -36,6 +36,8 @@ extern cvar_t teamoverride; @@ -36,6 +36,8 @@ extern cvar_t teamoverride;
extern cvar_t defaultteam;
extern cvar_t allowmonsters;
extern cvar_t allowhook;
extern cvar_t instagib;
extern cvar_t arcade;
// Engine Cvars
extern cvar_t *g_psv_gravity;

2
dlls/multiplay_gamerules.cpp

@ -659,7 +659,7 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer ) @@ -659,7 +659,7 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer )
pPlayer->GiveNamedItem( "weapon_quakegun" );
//++ BulliT
if( !g_bIsThreeWave && g_pGameRules->m_iGameMode >= ARENA )
if( ( arcade.value ) || ( !g_bIsThreeWave && g_pGameRules->m_iGameMode >= ARENA ) )
{
pPlayer->m_iQuakeItems |= ( IT_AXE | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_NAILGUN | IT_SUPER_NAILGUN | IT_GRENADE_LAUNCHER | IT_ROCKET_LAUNCHER | IT_LIGHTNING );
pPlayer->m_iAmmoRockets = 100;

Loading…
Cancel
Save