mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-10 12:09:03 +00:00
Merge f54f2d1cfa
into ceb6d4d783
This commit is contained in:
commit
ef84a0579c
5 changed files with 26 additions and 6 deletions
|
@ -22,4 +22,10 @@ ConVar mp_ready_signal(
|
|||
"mp_ready_signal",
|
||||
"ready",
|
||||
FCVAR_GAMEDLL,
|
||||
"Text that each player must speak for the match to begin" );
|
||||
"Text that each player must speak for the match to begin" );
|
||||
|
||||
ConVar sv_melee_viewkick(
|
||||
"sv_melee_viewkick",
|
||||
"0",
|
||||
FCVAR_REPLICATED,
|
||||
"Adds melee view kick" );
|
|
@ -16,5 +16,6 @@
|
|||
extern ConVar mp_restartround;
|
||||
extern ConVar mp_readyrestart;
|
||||
extern ConVar mp_ready_signal;
|
||||
extern ConVar sv_melee_viewkick;
|
||||
|
||||
#endif //HL2MP_CVARS_H
|
||||
|
|
|
@ -51,7 +51,6 @@ extern CBaseEntity *g_pLastRebelSpawn;
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
REGISTER_GAMERULES_CLASS( CHL2MPRules );
|
||||
|
||||
BEGIN_NETWORK_TABLE_NOBASE( CHL2MPRules, DT_HL2MPRules )
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "ndebugoverlay.h"
|
||||
#include "te_effect_dispatch.h"
|
||||
#include "ilagcompensationmanager.h"
|
||||
#include "hl2mp_cvars.h"
|
||||
#endif
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
|
@ -135,7 +136,8 @@ void CBaseHL2MPBludgeonWeapon::Hit( trace_t &traceHit, Activity nHitActivity )
|
|||
CBasePlayer *pPlayer = ToBasePlayer( GetOwner() );
|
||||
|
||||
//Do view kick
|
||||
// AddViewKick();
|
||||
if ( sv_melee_viewkick.GetBool() )
|
||||
AddViewKick();
|
||||
|
||||
CBaseEntity *pHitEntity = traceHit.m_pEnt;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
|
||||
float GetRange( void ) { return STUNSTICK_RANGE; }
|
||||
float GetFireRate( void ) { return STUNSTICK_REFIRE; }
|
||||
|
||||
void AddViewKick( void );
|
||||
|
||||
bool Deploy( void );
|
||||
bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL );
|
||||
|
@ -244,9 +244,21 @@ void CWeaponStunStick::ImpactEffect( trace_t &traceHit )
|
|||
UTIL_ImpactTrace( &traceHit, DMG_CLUB );
|
||||
}
|
||||
|
||||
|
||||
void CWeaponStunStick::AddViewKick( void )
|
||||
{
|
||||
CBasePlayer *pPlayer = ToBasePlayer( GetOwner() );
|
||||
|
||||
if ( pPlayer == NULL )
|
||||
return;
|
||||
|
||||
QAngle punchAng;
|
||||
punchAng.x = SharedRandomFloat( "crowbarpax", 1.0f, 2.0f );
|
||||
punchAng.y = SharedRandomFloat( "crowbarpay", -2.0f, -1.0f );
|
||||
punchAng.z = 0.0f;
|
||||
pPlayer->ViewPunch( punchAng );
|
||||
}
|
||||
#ifndef CLIENT_DLL
|
||||
|
||||
|
||||
int CWeaponStunStick::WeaponMeleeAttack1Condition( float flDot, float flDist )
|
||||
{
|
||||
// Attempt to lead the target (needed because citizens can't hit manhacks with the crowbar!)
|
||||
|
|
Loading…
Reference in a new issue