Override AddToPlayer function for poolstick and beretta.

This commit is contained in:
Night Owl 2018-08-17 01:51:13 +05:00
parent 4b636e1ce3
commit 183aa9f6f2
3 changed files with 25 additions and 1 deletions

View File

@ -88,6 +88,18 @@ int CBeretta::GetItemInfo(ItemInfo *p)
return 1;
}
int CBeretta::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 CBeretta::Deploy( )
{
// pev->body = 1;

View File

@ -83,7 +83,17 @@ int CPoolstick::GetItemInfo(ItemInfo *p)
return 1;
}
int CBeretta::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 CPoolstick::Deploy( )
{

View File

@ -1087,6 +1087,7 @@ public:
int iItemSlot( void ) { return 2; }
int GetItemInfo(ItemInfo *p);
int AddToPlayer( CBasePlayer *pPlayer );
void PrimaryAttack( void );
void SecondaryAttack( void );
void BerettaFire( float flSpread, float flCycleTime, BOOL fUseAutoAim );
@ -1122,6 +1123,7 @@ public:
void EXPORT Smack( void );
int GetItemInfo(ItemInfo *p);
int AddToPlayer( CBasePlayer *pPlayer );
void PrimaryAttack( void );
int Swing( int fFirst );
BOOL Deploy( void );