CBeam *CBeam::BeamCreate( const char *pSpriteName, float width ) { // Create a new entity with CBeam private data CBeam *pBeam = CREATE_ENTITY( CBeam, "beam" ); pBeam->BeamInit( pSpriteName, width ); return pBeam; }
CBeam *CBeam::BeamCreate( const char *pSpriteName, int width ) { // Create a new entity with CBeam private data CBeam *pBeam = GetClassPtr( ( CBeam * ) NULL ); pBeam->pev->classname = MAKE_STRING( "beam" ); pBeam->BeamInit( pSpriteName, width ); return pBeam; }
//----------------------------------------------------------------------------- // Purpose: // Input : *pSpriteName - // &origin - // animate - // Output : CSprite //----------------------------------------------------------------------------- CBeam *CBeam::BeamCreatePredictable( const char *module, int line, bool persist, const char *pSpriteName, float width, CBasePlayer *pOwner ) { #if !defined( NO_ENTITY_PREDICTION ) CBeam *pBeam = ( CBeam * )CBaseEntity::CreatePredictedEntityByName( "beam", module, line, persist ); if ( pBeam ) { pBeam->BeamInit( pSpriteName, width ); pBeam->SetOwnerEntity( pOwner ); pBeam->SetPlayerSimulated( pOwner ); } return pBeam; #else return NULL; #endif }