|
|
@ -70,6 +70,9 @@ void CWorldItem::Spawn( void ) |
|
|
|
case 45: // ITEM_SUIT:
|
|
|
|
case 45: // ITEM_SUIT:
|
|
|
|
pEntity = CBaseEntity::Create( "item_suit", pev->origin, pev->angles ); |
|
|
|
pEntity = CBaseEntity::Create( "item_suit", pev->origin, pev->angles ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case 46: // ITEM_FLASHLIGHT:
|
|
|
|
|
|
|
|
pEntity = CBaseEntity::Create( "item_flashlight", pev->origin, pev->angles ); |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if( !pEntity ) |
|
|
|
if( !pEntity ) |
|
|
@ -366,6 +369,33 @@ class CItemSecurity : public CItem |
|
|
|
|
|
|
|
|
|
|
|
LINK_ENTITY_TO_CLASS( item_security, CItemSecurity ) |
|
|
|
LINK_ENTITY_TO_CLASS( item_security, CItemSecurity ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CItemFlashlight : public CItem |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
void Spawn( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Precache(); |
|
|
|
|
|
|
|
SET_MODEL( ENT( pev ), "models/w_flashlight.mdl" ); |
|
|
|
|
|
|
|
CItem::Spawn(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void Precache( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
PRECACHE_MODEL( "models/w_flashlight.mdl" ); |
|
|
|
|
|
|
|
PRECACHE_SOUND( "items/gunpickup2.wav" ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BOOL MyTouch( CBasePlayer *pPlayer ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( pPlayer->pev->weapons & ( 1 << WEAPON_FLASHLIGHT ) ) |
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pPlayer->pev->weapons |= ( 1 << WEAPON_FLASHLIGHT ); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LINK_ENTITY_TO_CLASS( item_flashlight, CItemFlashlight ) |
|
|
|
|
|
|
|
|
|
|
|
class CItemLongJump : public CItem |
|
|
|
class CItemLongJump : public CItem |
|
|
|
{ |
|
|
|
{ |
|
|
|
void Spawn( void ) |
|
|
|
void Spawn( void ) |
|
|
|