summaryrefslogtreecommitdiff
path: root/game/shared/dod/dod_playeranimstate.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/dod/dod_playeranimstate.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/dod/dod_playeranimstate.h')
-rw-r--r--game/shared/dod/dod_playeranimstate.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/game/shared/dod/dod_playeranimstate.h b/game/shared/dod/dod_playeranimstate.h
new file mode 100644
index 0000000..100b50d
--- /dev/null
+++ b/game/shared/dod/dod_playeranimstate.h
@@ -0,0 +1,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