mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 21:24:27 +00:00
Implement mp_satchelfix cvar.
This commit is contained in:
parent
ea8f2bed77
commit
c9ac2c6dab
@ -22,6 +22,7 @@
|
||||
#include "util.h"
|
||||
#include "cbase.h"
|
||||
#include "doors.h"
|
||||
#include "game.h"
|
||||
#include "weapons.h"
|
||||
|
||||
extern void SetMovedir( entvars_t *ev );
|
||||
@ -737,9 +738,12 @@ void CBaseDoor::Blocked( CBaseEntity *pOther )
|
||||
if( pev->dmg )
|
||||
pOther->TakeDamage( pev, pev, pev->dmg, DMG_CRUSH );
|
||||
|
||||
// Detonate satchels
|
||||
if( !strcmp( "monster_satchel", STRING( pOther->pev->classname ) ) )
|
||||
( (CSatchel*)pOther )->Use( this, this, USE_ON, 0 );
|
||||
if( satchelfix.value )
|
||||
{
|
||||
// Detonate satchels
|
||||
if( !strcmp( "monster_satchel", STRING( pOther->pev->classname ) ) )
|
||||
( (CSatchel*)pOther )->Use( this, this, USE_ON, 0 );
|
||||
}
|
||||
|
||||
// if a door has a negative wait, it would never come back if blocked,
|
||||
// so let it just squash the object to death real fast
|
||||
|
@ -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 satchelfix = { "mp_satchelfix", "0", 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 };
|
||||
@ -469,6 +470,7 @@ void GameDLLInit( void )
|
||||
CVAR_REGISTER( &falldamage );
|
||||
CVAR_REGISTER( &weaponstay );
|
||||
CVAR_REGISTER( &selfgauss );
|
||||
CVAR_REGISTER( &satchelfix );
|
||||
CVAR_REGISTER( &forcerespawn );
|
||||
CVAR_REGISTER( &flashlight );
|
||||
CVAR_REGISTER( &aimcrosshair );
|
||||
|
@ -28,6 +28,7 @@ extern cvar_t friendlyfire;
|
||||
extern cvar_t falldamage;
|
||||
extern cvar_t weaponstay;
|
||||
extern cvar_t selfgauss;
|
||||
extern cvar_t satchelfix;
|
||||
extern cvar_t forcerespawn;
|
||||
extern cvar_t flashlight;
|
||||
extern cvar_t aimcrosshair;
|
||||
|
@ -823,7 +823,9 @@ void CBasePlayer::RemoveAllItems( BOOL removeSuit )
|
||||
for( i = 0; i < MAX_AMMO_SLOTS; i++ )
|
||||
m_rgAmmo[i] = 0;
|
||||
|
||||
DeactivateSatchels( this );
|
||||
if( satchelfix.value )
|
||||
DeactivateSatchels( this );
|
||||
|
||||
UpdateClientData();
|
||||
|
||||
// send Selected Weapon Message to our client
|
||||
|
Loading…
x
Reference in New Issue
Block a user