You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.8 KiB
57 lines
1.8 KiB
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose: The class from which all bludgeon melee
|
|
// weapons are derived.
|
|
//
|
|
// $Workfile: $
|
|
// $Date: $
|
|
// $NoKeywords: $
|
|
//=============================================================================//
|
|
|
|
#include "basehlcombatweapon.h"
|
|
|
|
#ifndef BASEBLUDGEONWEAPON_H
|
|
#define BASEBLUDGEONWEAPON_H
|
|
|
|
//=========================================================
|
|
// CBaseHLBludgeonWeapon
|
|
//=========================================================
|
|
class CBaseHLBludgeonWeapon : public CBaseHLCombatWeapon
|
|
{
|
|
DECLARE_CLASS( CBaseHLBludgeonWeapon, CBaseHLCombatWeapon );
|
|
public:
|
|
CBaseHLBludgeonWeapon();
|
|
|
|
DECLARE_SERVERCLASS();
|
|
|
|
virtual void Spawn( void );
|
|
virtual void Precache( void );
|
|
|
|
//Attack functions
|
|
virtual void PrimaryAttack( void );
|
|
virtual void SecondaryAttack( void );
|
|
|
|
virtual void ItemPostFrame( void );
|
|
|
|
//Functions to select animation sequences
|
|
virtual Activity GetPrimaryAttackActivity( void ) { return ACT_VM_HITCENTER; }
|
|
virtual Activity GetSecondaryAttackActivity( void ) { return ACT_VM_HITCENTER2; }
|
|
|
|
virtual float GetFireRate( void ) { return 0.2f; }
|
|
virtual float GetRange( void ) { return 32.0f; }
|
|
virtual float GetDamageForActivity( Activity hitActivity ) { return 1.0f; }
|
|
|
|
virtual int CapabilitiesGet( void );
|
|
virtual int WeaponMeleeAttack1Condition( float flDot, float flDist );
|
|
|
|
protected:
|
|
virtual void ImpactEffect( trace_t &trace );
|
|
|
|
private:
|
|
bool ImpactWater( const Vector &start, const Vector &end );
|
|
void Swing( int bIsSecondary );
|
|
void Hit( trace_t &traceHit, Activity nHitActivity, bool bIsSecondary );
|
|
Activity ChooseIntersectionPointAndActivity( trace_t &hitTrace, const Vector &mins, const Vector &maxs, CBasePlayer *pOwner );
|
|
};
|
|
|
|
#endif
|