Browse Source

Override AddToPlayer call for desert eagle.

CAd
Night Owl 6 years ago
parent
commit
56169c7272
  1. 12
      dlls/CAd/eagle.cpp
  2. 1
      dlls/weapons.h

12
dlls/CAd/eagle.cpp

@ -80,6 +80,18 @@ int CEagle::GetItemInfo(ItemInfo *p) @@ -80,6 +80,18 @@ int CEagle::GetItemInfo(ItemInfo *p)
return 1;
}
int CEagle::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 CEagle::Deploy( )
{
return DefaultDeploy( "models/v_desert_eagle.mdl", "models/p_desert_eagle.mdl", DEAGLE_DRAW, "onehanded", 0 );

1
dlls/weapons.h

@ -1076,6 +1076,7 @@ public: @@ -1076,6 +1076,7 @@ public:
void PrimaryAttack( void );
void SecondaryAttack( void );
int AddToPlayer( CBasePlayer *pPlayer );
BOOL Deploy( void );
void Holster( int skiplocal = 0 );
void Reload( void );

Loading…
Cancel
Save