aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/hl2/item_security.cpp
blob: 85d774b26434efb415b8b8b309f4ea0653b974d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//
//=============================================================================//
/*

===== item_security.cpp ========================================================

  handling for the security item
*/

#include "cbase.h"
#include "player.h"
//#include "weapons.h"
#include "gamerules.h"
#include "items.h"

class CItemSecurity : public CItem
{
public:
	DECLARE_CLASS( CItemSecurity, CItem );

	void Spawn( void )
	{ 
		Precache( );
		SetModel( "models/w_security.mdl" );
		BaseClass::Spawn( );
	}
	void Precache( void )
	{
		PrecacheModel ("models/w_security.mdl");
	}
	bool MyTouch( CBasePlayer *pPlayer )
	{
		pPlayer->m_rgItems[ITEM_SECURITY] += 1;
		return true;
	}
};

LINK_ENTITY_TO_CLASS(item_security, CItemSecurity);