You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.5 KiB
58 lines
1.5 KiB
8 years ago
|
/***
|
||
|
*
|
||
|
* 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");
|
||
|
};
|