aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/hl2/env_speaker.h
blob: 20fbeb6b5e1997d779aced45e6d69d1c125398a1 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

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

// ===================================================================================
//
// Speaker class. Used for announcements per level, for door lock/unlock spoken voice. 
//

class CSpeaker : public CPointEntity
{
public:
	DECLARE_CLASS( CSpeaker, CPointEntity );

	void Spawn( void );
	void Precache( void );
	
	DECLARE_DATADESC();

	virtual int	ObjectCaps( void ) { return (BaseClass::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }

	virtual IResponseSystem *GetResponseSystem() { return m_pInstancedResponseSystem; }

	virtual int	Save( ISave &save );
	virtual int	Restore( IRestore &restore );

protected:

	void SpeakerThink( void );

	void InputToggle( inputdata_t &inputdata );

	float	m_delayMin;
	float	m_delayMax;

	string_t	m_iszRuleScriptFile;
	string_t	m_iszConcept;
	IResponseSystem *m_pInstancedResponseSystem;

public:

	void InputTurnOff( inputdata_t &inputdata );
	void InputTurnOn( inputdata_t &inputdata );
};

#endif // ENV_SPEAKER_H