mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 12:06:07 +08:00
First version of the SOurce SDK 2013
This commit is contained in:
59
game/client/fx_shelleject.cpp
Normal file
59
game/client/fx_shelleject.cpp
Normal file
@ -0,0 +1,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 );
|
||||
|
||||
|
Reference in New Issue
Block a user