summaryrefslogtreecommitdiff
path: root/game/server/tf/player_vs_environment/tf_tank_boss_body.cpp
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/server/tf/player_vs_environment/tf_tank_boss_body.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/tf/player_vs_environment/tf_tank_boss_body.cpp')
-rw-r--r--game/server/tf/player_vs_environment/tf_tank_boss_body.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/game/server/tf/player_vs_environment/tf_tank_boss_body.cpp b/game/server/tf/player_vs_environment/tf_tank_boss_body.cpp
new file mode 100644
index 0000000..d3dd638
--- /dev/null
+++ b/game/server/tf/player_vs_environment/tf_tank_boss_body.cpp
@@ -0,0 +1,58 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+#include "cbase.h"
+
+#include "NextBot.h"
+#include "tf_tank_boss.h"
+#include "tf_tank_boss_body.h"
+
+
+//-------------------------------------------------------------------------------------------
+CTFTankBossBody::CTFTankBossBody( INextBot *bot ) : IBody( bot )
+{
+}
+
+
+//-------------------------------------------------------------------------------------------
+bool CTFTankBossBody::StartSequence( const char *name )
+{
+ CTFTankBoss *me = (CTFTankBoss *)GetBot()->GetEntity();
+
+ int animSequence = me->LookupSequence( name );
+
+ if ( animSequence )
+ {
+ me->SetSequence( animSequence );
+ me->SetPlaybackRate( 1.0f );
+ me->SetCycle( 0 );
+ me->ResetSequenceInfo();
+
+ return true;
+ }
+
+ return false;
+}
+
+void CTFTankBossBody::SetSkin( int nSkin )
+{
+ CTFTankBoss *me = (CTFTankBoss *)GetBot()->GetEntity();
+ me->m_nSkin = nSkin;
+}
+
+
+//-------------------------------------------------------------------------------------------
+void CTFTankBossBody::Update( void )
+{
+ CTFTankBoss *me = (CTFTankBoss *)GetBot()->GetEntity();
+
+ // move the animation ahead in time
+ me->StudioFrameAdvance();
+ me->DispatchAnimEvents( me );
+}
+
+
+//---------------------------------------------------------------------------------------------
+// return the bot's collision mask (hack until we get a general hull trace abstraction here or in the locomotion interface)
+unsigned int CTFTankBossBody::GetSolidMask( void ) const
+{
+ return CONTENTS_SOLID;
+}