summaryrefslogtreecommitdiff
path: root/game/shared/tf2/weapon_basecombatobject.h
blob: 37e802f74759ec406aff928f86d3c52a253556b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef WEAPON_BASECOMBATOBJECT_H
#define WEAPON_BASECOMBATOBJECT_H
#ifdef _WIN32
#pragma once
#endif

#include "basetfcombatweapon_shared.h"

class CBaseTFPlayer;

#if defined( CLIENT_DLL )

#define CWeaponBaseCombatObject C_WeaponBaseCombatObject

#endif

//-----------------------------------------------------------------------------
// Purpose: Base class for combat object weapons
//-----------------------------------------------------------------------------
class CWeaponBaseCombatObject : public CBaseTFCombatWeapon
{
	DECLARE_CLASS( CWeaponBaseCombatObject, CBaseTFCombatWeapon );
public:
	DECLARE_NETWORKCLASS();
	DECLARE_PREDICTABLE();

	CWeaponBaseCombatObject();

	virtual void	PrimaryAttack( void );
	virtual bool	GetPlacePosition( CBaseTFPlayer *pBuilder, Vector *vecPlaceOrigin, QAngle *angPlaceAngles );
	virtual void	PlaceCombatObject( CBaseTFPlayer *pBuilder, Vector vecOrigin, QAngle angles );
	virtual float	GetFireRate( void );

protected:
	char	*m_szObjectName;
	Vector	m_vecBuildMins;
	Vector	m_vecBuildMaxs;

	/*
	// All predicted weapons need to implement and return true
	virtual bool			IsPredicted( void ) const
	{ 
		return true;
	}

#if defined( CLIENT_DLL )
	virtual bool	ShouldPredict( void )
	{
		if ( GetOwner() == C_BasePlayer::GetLocalPlayer() )
			return true;

		return BaseClass::ShouldPredict();
	}
#endif
	*/

private:														
	CWeaponBaseCombatObject( const CWeaponBaseCombatObject & );						
};

#endif // WEAPON_BASECOMBATOBJECT_H