mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-10 10:49:35 +00:00
1
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
#include "movie_explosion.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#define MOVIEEXPLOSION_ENTITYNAME "env_movieexplosion"
|
||||
|
||||
|
||||
IMPLEMENT_SERVERCLASS_ST(MovieExplosion, DT_MovieExplosion)
|
||||
END_SEND_TABLE()
|
||||
|
||||
LINK_ENTITY_TO_CLASS(env_movieexplosion, MovieExplosion);
|
||||
|
||||
|
||||
MovieExplosion* MovieExplosion::CreateMovieExplosion(const Vector &pos)
|
||||
{
|
||||
CBaseEntity *pEnt = CreateEntityByName(MOVIEEXPLOSION_ENTITYNAME);
|
||||
if(pEnt)
|
||||
{
|
||||
MovieExplosion *pEffect = dynamic_cast<MovieExplosion*>(pEnt);
|
||||
if(pEffect && pEffect->edict())
|
||||
{
|
||||
pEffect->SetLocalOrigin( pos );
|
||||
pEffect->Activate();
|
||||
return pEffect;
|
||||
}
|
||||
else
|
||||
{
|
||||
UTIL_Remove(pEnt);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user