blob: 412d8210234166ed164175bd63b2ab5434734161 (
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
//========= Copyright Valve Corporation, All rights reserved. ============//
// c_boss_alpha.cpp
#include "cbase.h"
#include "NextBot/C_NextBot.h"
#include "c_boss_alpha.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
#undef NextBot
//-----------------------------------------------------------------------------
IMPLEMENT_CLIENTCLASS_DT( C_BossAlpha, DT_BossAlpha, CBossAlpha )
RecvPropBool( RECVINFO( m_isNuking ) ),
END_RECV_TABLE()
//-----------------------------------------------------------------------------
C_BossAlpha::C_BossAlpha()
{
}
//-----------------------------------------------------------------------------
C_BossAlpha::~C_BossAlpha()
{
if ( m_nukeEffect )
{
ParticleProp()->StopEmissionAndDestroyImmediately( m_nukeEffect );
m_nukeEffect = NULL;
}
}
//-----------------------------------------------------------------------------
void C_BossAlpha::Spawn( void )
{
BaseClass::Spawn();
m_vecViewOffset = Vector( 0, 0, 180.0f );
SetNextClientThink( CLIENT_THINK_ALWAYS );
}
//-----------------------------------------------------------------------------
void C_BossAlpha::ClientThink( void )
{
if ( m_isNuking )
{
if ( !m_nukeEffect )
{
m_nukeEffect = ParticleProp()->Create( "charge_up", PATTACH_POINT_FOLLOW, LookupAttachment( "head" ) );
}
}
else
{
if ( m_nukeEffect )
{
ParticleProp()->StopEmissionAndDestroyImmediately( m_nukeEffect );
m_nukeEffect = NULL;
}
}
}
//-----------------------------------------------------------------------------
// Return the origin for player observers tracking this target
Vector C_BossAlpha::GetObserverCamOrigin( void )
{
return EyePosition();
}
//-----------------------------------------------------------------------------
void C_BossAlpha::FireEvent( const Vector& origin, const QAngle& angles, int event, const char *options )
{
if ( event == 7001 )
{
EmitSound( "RobotBoss.Footstep" );
}
}
|