Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
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.

63 lines
1.5 KiB

5 years ago
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Vehicle mounted machinegun that the driver controls
//
//=============================================================================//
#ifndef TF_OBJ_DRIVER_MACHINEGUN_H
#define TF_OBJ_DRIVER_MACHINEGUN_H
#ifdef _WIN32
#pragma once
#endif
#include "tf_obj_basedrivergun_shared.h"
#if defined( CLIENT_DLL )
#define CObjectDriverMachinegun C_ObjectDriverMachinegun
#endif
// ------------------------------------------------------------------------ //
// Mounted machinegun
// ------------------------------------------------------------------------ //
class CObjectDriverMachinegun : public CBaseObjectDriverGun
{
DECLARE_CLASS( CObjectDriverMachinegun, CBaseObjectDriverGun );
public:
DECLARE_NETWORKCLASS();
DECLARE_PREDICTABLE();
CObjectDriverMachinegun();
virtual void Spawn();
virtual void Precache();
// Firing
virtual bool CanFireNow( void );
virtual void Fire( CBaseTFPlayer *pDriver );
// Turning
virtual Vector GetFireOrigin( void );
virtual void SetTargetAngles( const QAngle &vecAngles );
#if defined( CLIENT_DLL )
void GetBoneControllers( float controllers[MAXSTUDIOBONECTRLS] );
virtual void DrawHudElements( void );
#endif
// Ammo
void RechargeThink( void );
private:
float m_flNextAttack;
int m_nBarrelAttachment;
int m_nAmmoType;
CNetworkVar( int, m_nAmmoCount );
int m_nMaxAmmoCount;
private:
CObjectDriverMachinegun( const CObjectDriverMachinegun & ); // not defined, not accessible
};
#endif // TF_OBJ_DRIVER_MACHINEGUN_H