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.
63 lines
1.5 KiB
63 lines
1.5 KiB
8 years ago
|
/***
|
||
|
*
|
||
5 years ago
|
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||
|
*
|
||
|
* This product contains software technology licensed from Id
|
||
|
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||
8 years ago
|
* 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"
|
||
5 years ago
|
#include "monsters.h"
|
||
8 years ago
|
#include "weapons.h"
|
||
5 years ago
|
#include "nodes.h"
|
||
8 years ago
|
#include "player.h"
|
||
|
#include "gamerules.h"
|
||
|
|
||
5 years ago
|
LINK_ENTITY_TO_CLASS( light_spot2, CLightSpot )
|
||
8 years ago
|
|
||
|
//=========================================================
|
||
|
//=========================================================
|
||
5 years ago
|
CLightSpot *CLightSpot::CreateSpot( void )
|
||
8 years ago
|
{
|
||
5 years ago
|
CLightSpot *pSpot = GetClassPtr( (CLightSpot *)NULL );
|
||
8 years ago
|
pSpot->Spawn();
|
||
|
|
||
5 years ago
|
pSpot->pev->classname = MAKE_STRING( "light_spot2" );
|
||
8 years ago
|
|
||
|
return pSpot;
|
||
|
}
|
||
|
|
||
|
//=========================================================
|
||
|
//=========================================================
|
||
5 years ago
|
void CLightSpot::Spawn( void )
|
||
8 years ago
|
{
|
||
|
Precache();
|
||
|
pev->movetype = MOVETYPE_NONE;
|
||
|
pev->solid = SOLID_NOT;
|
||
|
|
||
5 years ago
|
pev->rendermode = kRenderTransAdd;
|
||
8 years ago
|
pev->renderfx = kRenderFxNoDissipation;
|
||
|
|
||
5 years ago
|
SetBits( pev->effects, EF_DIMLIGHT );
|
||
|
|
||
|
pev->renderamt = 185;
|
||
|
|
||
|
SET_MODEL( ENT( pev ), "sprites/beam.spr" );
|
||
|
UTIL_SetOrigin( pev, pev->origin );
|
||
|
}
|
||
8 years ago
|
|
||
5 years ago
|
void CLightSpot::Precache( void )
|
||
8 years ago
|
{
|
||
5 years ago
|
PRECACHE_MODEL( "sprites/beam.spr" );
|
||
|
}
|
||
|
|