summaryrefslogtreecommitdiff
path: root/game/shared/dod/dod_playeranimstate.h
blob: 100b50dee1766d001ef4b2e78e741272ce823631 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

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


#include "convar.h"
#include "iplayeranimstate.h"


#if defined( CLIENT_DLL )
	class C_DODPlayer;
	#define CDODPlayer C_DODPlayer
#else
	class CDODPlayer;
#endif

enum PlayerAnimEvent_t
{
	PLAYERANIMEVENT_FIRE_GUN=0,
	PLAYERANIMEVENT_THROW_GRENADE,
	PLAYERANIMEVENT_ROLL_GRENADE,
	PLAYERANIMEVENT_JUMP,
	PLAYERANIMEVENT_RELOAD,
	PLAYERANIMEVENT_SECONDARY_ATTACK,
	PLAYERANIMEVENT_HANDSIGNAL,
	PLAYERANIMEVENT_PLANT_TNT,
	PLAYERANIMEVENT_DEFUSE_TNT,

	PLAYERANIMEVENT_HS_NONE,
	PLAYERANIMEVENT_CANCEL_GESTURES,	// cancel current gesture

	PLAYERANIMEVENT_COUNT
};

class IDODPlayerAnimState : virtual public IPlayerAnimState
{
public:
	// This is called by both the client and the server in the same way to trigger events for
	// players firing, jumping, throwing grenades, etc.
	virtual void DoAnimationEvent( PlayerAnimEvent_t event, int nData = 0 ) = 0;

	virtual void ShowDebugInfo( void ) = 0;
};


IDODPlayerAnimState* CreatePlayerAnimState( CDODPlayer *pPlayer );


// If this is set, then the game code needs to make sure to send player animation events
// to the local player if he's the one being watched.
extern ConVar cl_showanimstate;


#endif // DOD_PLAYERANIMSTATE_H