Night Owl 7 years ago
parent
commit
7e5145aaff
  1. 12
      dlls/crowbar.cpp
  2. 12
      dlls/glock.cpp
  3. 6
      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;

6
dlls/weapons.h

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

Loading…
Cancel
Save