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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#include "cbase.h"
#include "fx.h"
#include "c_te_effect_dispatch.h"
#include "c_te_legacytempents.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void ShellEjectCallback( const CEffectData &data )
{
// Use the gun angles to orient the shell
IClientRenderable *pRenderable = data.GetRenderable();
if ( pRenderable )
{
tempents->EjectBrass( data.m_vOrigin, data.m_vAngles, pRenderable->GetRenderAngles(), 0 );
}
}
DECLARE_CLIENT_EFFECT( "ShellEject", ShellEjectCallback );
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void RifleShellEjectCallback( const CEffectData &data )
{
// Use the gun angles to orient the shell
IClientRenderable *pRenderable = data.GetRenderable();
if ( pRenderable )
{
tempents->EjectBrass( data.m_vOrigin, data.m_vAngles, pRenderable->GetRenderAngles(), 1 );
}
}
DECLARE_CLIENT_EFFECT( "RifleShellEject", RifleShellEjectCallback );
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void ShotgunShellEjectCallback( const CEffectData &data )
{
// Use the gun angles to orient the shell
IClientRenderable *pRenderable = data.GetRenderable();
if ( pRenderable )
{
tempents->EjectBrass( data.m_vOrigin, data.m_vAngles, pRenderable->GetRenderAngles(), 2 );
}
}
DECLARE_CLIENT_EFFECT( "ShotgunShellEject", ShotgunShellEjectCallback );
|