summaryrefslogtreecommitdiff
path: root/game/server/tf2/npc_bug_builder.h
blob: cda1ead57e0f3cf89a73008fc76eae9a87e2b9c1 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

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

#include "AI_BaseNPC.h"

#define	BUG_BUILDER_MODEL		"models/npcs/bugs/bug_builder.mdl"

class CMaker_BugHole;

//-----------------------------------------------------------------------------
// Purpose: BUILDER BUG
//-----------------------------------------------------------------------------
class CNPC_Bug_Builder : public CAI_BaseNPC
{
	DECLARE_CLASS( CNPC_Bug_Builder, CAI_BaseNPC );
public:
	CNPC_Bug_Builder( void );

	virtual void Spawn( void );
	virtual void Precache( void );

	virtual int SelectSchedule( void );
	virtual void StartTask( const Task_t *pTask );
	virtual void RunTask( const Task_t *pTask );

	virtual float MaxYawSpeed( void );
	virtual void HandleAnimEvent( animevent_t *pEvent );
	virtual void IdleSound( void );
	virtual void PainSound( const CTakeDamageInfo &info );
	virtual void AlertSound( void );
	virtual bool FValidateHintType(CAI_Hint *pHint);

	virtual bool ShouldPlayIdleSound( void );

	virtual Class_T	Classify( void ) { return CLASS_ANTLION; }
	virtual int	GetSoundInterests( void ) { return 0; }

	DECLARE_DATADESC();

	// BugHole handling
	void	SetBugHole( CMaker_BugHole *pBugHole );
	void	ReturnToBugHole( void );

private:
	virtual Disposition_t	IRelationType( CBaseEntity *pTarget );

	void	Event_Killed( const CTakeDamageInfo &info );

	float	m_flIdleDelay;

	float	m_flNextDawdle;

	// BugHole handling
	CHandle< CMaker_BugHole >	m_hMyBugHole;

	DEFINE_CUSTOM_AI;
};

#endif // NPC_BUG_BUILDER_H