summaryrefslogtreecommitdiff
path: root/game/server/hl1/hl1_ents.h
blob: a5eb6fe076bff72a3406333d989b56911c49f619 (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
69
70
71
72
73
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

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


/**********************
	    Pendulum
/**********************/

class CPendulum : public CBaseToggle
{
	DECLARE_CLASS( CPendulum, CBaseToggle );
public:
	void	Spawn ( void );
	void	KeyValue( KeyValueData *pkvd );
	void	Swing( void );
	void	PendulumUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
	void	Stop( void );
	void	Touch( CBaseEntity *pOther );
	void	RopeTouch ( CBaseEntity *pOther );// this touch func makes the pendulum a rope
	void	Blocked( CBaseEntity *pOther );

	// Input handlers.
	void	InputActivate( inputdata_t &inputdata );

	DECLARE_DATADESC();
	
	float	m_flAccel;			// Acceleration
	float	m_flTime;
	float	m_flDamp;
	float	m_flMaxSpeed;
	float	m_flDampSpeed;
	QAngle	m_vCenter;
	QAngle	m_vStart;
	float   m_flBlockDamage;

	EHANDLE		m_hEnemy;
};

class CHL1Gib : public CBaseEntity
{
	DECLARE_CLASS( CHL1Gib, CBaseEntity );

public:
	void Spawn( const char *szGibModel );
	void BounceGibTouch ( CBaseEntity *pOther );
	void StickyGibTouch ( CBaseEntity *pOther );
	void WaitTillLand( void );
	void LimitVelocity( void );

	virtual int	ObjectCaps( void ) { return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION) | FCAP_DONT_SAVE; }
	static	void SpawnHeadGib( CBaseEntity *pVictim );
	static	void SpawnRandomGibs( CBaseEntity *pVictim, int cGibs, int human );
	static  void SpawnStickyGibs( CBaseEntity *pVictim, Vector vecOrigin, int cGibs );

	int		m_bloodColor;
	int		m_cBloodDecals;
	int		m_material;
	float	m_lifeTime;

	DECLARE_DATADESC();
};


#endif // HL1_ENTS_H