diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/tfc/tfc_playeranimstate.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/shared/tfc/tfc_playeranimstate.h')
| -rw-r--r-- | game/shared/tfc/tfc_playeranimstate.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/game/shared/tfc/tfc_playeranimstate.h b/game/shared/tfc/tfc_playeranimstate.h new file mode 100644 index 0000000..fab1a41 --- /dev/null +++ b/game/shared/tfc/tfc_playeranimstate.h @@ -0,0 +1,55 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef TFC_PLAYERANIMSTATE_H +#define TFC_PLAYERANIMSTATE_H +#ifdef _WIN32 +#pragma once +#endif + + +#include "convar.h" +#include "iplayeranimstate.h" + + +#if defined( CLIENT_DLL ) + class C_TFCPlayer; + #define CTFCPlayer C_TFCPlayer +#else + class CTFCPlayer; +#endif + + +enum PlayerAnimEvent_t +{ + PLAYERANIMEVENT_FIRE_GUN=0, + PLAYERANIMEVENT_THROW_GRENADE, + PLAYERANIMEVENT_JUMP, + PLAYERANIMEVENT_RELOAD, + PLAYERANIMEVENT_DIE, + + PLAYERANIMEVENT_COUNT +}; + + +class ITFCPlayerAnimState : 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; +}; + + +ITFCPlayerAnimState* CreatePlayerAnimState( CTFCPlayer *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 // TFC_PLAYERANIMSTATE_H |