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 )
return 1; 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() BOOL CCrowbar::Deploy()
{ {
return DefaultDeploy( "models/v_crowbar.mdl", "models/p_crowbar.mdl", CROWBAR_DRAW, "crowbar" ); 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 )
return 1; 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() BOOL CGlock::Deploy()
{ {
// pev->body = 1; // pev->body = 1;

2
dlls/weapons.h

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

Loading…
Cancel
Save