Andrey Akhmichin 4 years ago
parent
commit
4c19cb7c8c
  1. 12
      dlls/hunger/medkit.cpp
  2. 1
      dlls/weapons.h

12
dlls/hunger/medkit.cpp

@ -72,6 +72,18 @@ int CWeaponEinarMedkit::GetItemInfo( ItemInfo *p )
return 1; return 1;
} }
int CWeaponEinarMedkit::AddToPlayer( CBasePlayer *pPlayer )
{
if( CBasePlayerWeapon::AddToPlayer( pPlayer ) )
{
MESSAGE_BEGIN( MSG_ONE, gmsgWeapPickup, NULL, pPlayer->pev );
WRITE_BYTE( m_iId );
MESSAGE_END();
return TRUE;
}
return FALSE;
}
BOOL CWeaponEinarMedkit::Deploy() BOOL CWeaponEinarMedkit::Deploy()
{ {
return DefaultDeploy( "models/v_tfc_medkit.mdl", "models/p_tfc_medkit.mdl", MEDKIT_DRAW, "trip" ); return DefaultDeploy( "models/v_tfc_medkit.mdl", "models/p_tfc_medkit.mdl", MEDKIT_DRAW, "trip" );

1
dlls/weapons.h

@ -1248,6 +1248,7 @@ public:
void Spawn(); void Spawn();
void Precache(); void Precache();
int iItemSlot() { return 5; } int iItemSlot() { return 5; }
int AddToPlayer( CBasePlayer *pPlayer );
int GetItemInfo( ItemInfo *p ); int GetItemInfo( ItemInfo *p );
void PrimaryAttack(); void PrimaryAttack();

Loading…
Cancel
Save