Night Owl 7 years ago
parent
commit
7e5145aaff
  1. 12
      dlls/crowbar.cpp
  2. 12
      dlls/glock.cpp
  3. 2
      dlls/weapons.h

12
dlls/crowbar.cpp

@ -80,6 +80,18 @@ int CCrowbar::GetItemInfo( ItemInfo *p ) @@ -80,6 +80,18 @@ int CCrowbar::GetItemInfo( ItemInfo *p )
return 1;
}
int CCrowbar::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 CCrowbar::Deploy()
{
return DefaultDeploy( "models/v_crowbar.mdl", "models/p_crowbar.mdl", CROWBAR_DRAW, "crowbar" );

12
dlls/glock.cpp

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

2
dlls/weapons.h

@ -464,6 +464,7 @@ public: @@ -464,6 +464,7 @@ public:
void Precache( void );
int iItemSlot( void ) { return 2; }
int GetItemInfo( ItemInfo *p );
int AddToPlayer( CBasePlayer *pPlayer );
void PrimaryAttack( void );
void SecondaryAttack( void );
@ -497,6 +498,7 @@ public: @@ -497,6 +498,7 @@ public:
void EXPORT SwingAgain( void );
void EXPORT Smack( void );
int GetItemInfo( ItemInfo *p );
int AddToPlayer( CBasePlayer *pPlayer );
void PrimaryAttack( void );
int Swing( int fFirst );

Loading…
Cancel
Save