mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-25 22:24:16 +00:00
58 lines
1.5 KiB
C++
58 lines
1.5 KiB
C++
/***
|
|
*
|
|
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
|
|
*
|
|
* This product contains software technology licensed from Id
|
|
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
|
* All Rights Reserved.
|
|
*
|
|
* Use, distribution, and modification of this source code and/or resulting
|
|
* object code is restricted to non-commercial enhancements to products from
|
|
* Valve LLC. All other use, distribution, or modification is prohibited
|
|
* without written permission from Valve LLC.
|
|
*
|
|
****/
|
|
|
|
#include "extdll.h"
|
|
#include "util.h"
|
|
#include "cbase.h"
|
|
#include "weapons.h"
|
|
#include "player.h"
|
|
#include "gamerules.h"
|
|
#include "flashlightspot.h"
|
|
|
|
LINK_ENTITY_TO_CLASS(flashlight_spot, CFlashlightSpot);
|
|
|
|
//=========================================================
|
|
//=========================================================
|
|
CFlashlightSpot *CFlashlightSpot::CreateSpot(void)
|
|
{
|
|
CFlashlightSpot *pSpot = GetClassPtr((CFlashlightSpot *)NULL);
|
|
pSpot->Spawn();
|
|
|
|
pSpot->pev->classname = MAKE_STRING("flashlight_spot");
|
|
|
|
return pSpot;
|
|
}
|
|
|
|
//=========================================================
|
|
//=========================================================
|
|
void CFlashlightSpot::Spawn(void)
|
|
{
|
|
Precache();
|
|
pev->movetype = MOVETYPE_NONE;
|
|
pev->solid = SOLID_NOT;
|
|
|
|
pev->rendermode = kRenderGlow; // kRenderGlow
|
|
pev->renderfx = kRenderFxNoDissipation;
|
|
pev->renderamt = 128;
|
|
pev->scale = 4;
|
|
|
|
SET_MODEL(ENT(pev), "sprites/beam2.spr");
|
|
UTIL_SetOrigin(pev, pev->origin);
|
|
};
|
|
|
|
void CFlashlightSpot::Precache(void)
|
|
{
|
|
PRECACHE_MODEL("sprites/beam2.spr");
|
|
}; |