mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 01:39:36 +00:00
1
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
|
||||
#include "cbase.h"
|
||||
#include "player.h"
|
||||
#include "items.h"
|
||||
#include "gamerules.h"
|
||||
#include "hl1_items.h"
|
||||
|
||||
|
||||
void CHL1Item::Spawn( void )
|
||||
{
|
||||
SetMoveType( MOVETYPE_FLYGRAVITY );
|
||||
SetSolid( SOLID_BBOX );
|
||||
AddSolidFlags( FSOLID_NOT_STANDABLE | FSOLID_TRIGGER );
|
||||
CollisionProp()->UseTriggerBounds( true, 24.0f );
|
||||
|
||||
SetCollisionGroup( COLLISION_GROUP_DEBRIS );
|
||||
|
||||
SetTouch( &CItem::ItemTouch );
|
||||
|
||||
#ifdef HL1_DLL
|
||||
if ( g_pGameRules->IsMultiplayer() )
|
||||
AddEffects( EF_NOSHADOW );
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CHL1Item::Activate( void )
|
||||
{
|
||||
BaseClass::Activate();
|
||||
|
||||
if ( UTIL_DropToFloor( this, MASK_SOLID ) == 0 )
|
||||
{
|
||||
Warning( "Item %s fell out of level at %f,%f,%f\n", GetClassname(), GetAbsOrigin().x, GetAbsOrigin().y, GetAbsOrigin().z);
|
||||
UTIL_Remove( this );
|
||||
return;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user