mirror of https://github.com/FWGS/hlsdk-xash3d
Merge changes for weapons from SoHL1.5.
This commit is contained in:
parent
161b9ed9bd
commit
e6cf0db4b9
|
@ -59,7 +59,6 @@ void EV_FireMP52( struct event_args_s *args );
|
||||||
void EV_FirePython( struct event_args_s *args );
|
void EV_FirePython( struct event_args_s *args );
|
||||||
void EV_FireGauss( struct event_args_s *args );
|
void EV_FireGauss( struct event_args_s *args );
|
||||||
void EV_SpinGauss( struct event_args_s *args );
|
void EV_SpinGauss( struct event_args_s *args );
|
||||||
void EV_Crowbar( struct event_args_s *args );
|
|
||||||
void EV_FireCrossbow( struct event_args_s *args );
|
void EV_FireCrossbow( struct event_args_s *args );
|
||||||
void EV_FireCrossbow2( struct event_args_s *args );
|
void EV_FireCrossbow2( struct event_args_s *args );
|
||||||
void EV_FireRpg( struct event_args_s *args );
|
void EV_FireRpg( struct event_args_s *args );
|
||||||
|
@ -1125,65 +1124,6 @@ void EV_FireGauss( event_args_t *args )
|
||||||
// GAUSS END
|
// GAUSS END
|
||||||
//======================
|
//======================
|
||||||
|
|
||||||
//======================
|
|
||||||
// CROWBAR START
|
|
||||||
//======================
|
|
||||||
enum crowbar_e
|
|
||||||
{
|
|
||||||
CROWBAR_IDLE = 0,
|
|
||||||
CROWBAR_DRAW,
|
|
||||||
CROWBAR_HOLSTER,
|
|
||||||
CROWBAR_ATTACK1HIT,
|
|
||||||
CROWBAR_ATTACK1MISS,
|
|
||||||
CROWBAR_ATTACK2MISS,
|
|
||||||
CROWBAR_ATTACK2HIT,
|
|
||||||
CROWBAR_ATTACK3MISS,
|
|
||||||
#ifndef CROWBAR_IDLE_ANIM
|
|
||||||
CROWBAR_ATTACK3HIT
|
|
||||||
#else
|
|
||||||
CROWBAR_ATTACK3HIT,
|
|
||||||
CROWBAR_IDLE2,
|
|
||||||
CROWBAR_IDLE3
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
int g_iSwing;
|
|
||||||
|
|
||||||
//Only predict the miss sounds, hit sounds are still played
|
|
||||||
//server side, so players don't get the wrong idea.
|
|
||||||
void EV_Crowbar( event_args_t *args )
|
|
||||||
{
|
|
||||||
int idx;
|
|
||||||
vec3_t origin;
|
|
||||||
vec3_t angles;
|
|
||||||
vec3_t velocity;
|
|
||||||
|
|
||||||
idx = args->entindex;
|
|
||||||
VectorCopy( args->origin, origin );
|
|
||||||
|
|
||||||
//Play Swing sound
|
|
||||||
gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/cbar_miss1.wav", 1, ATTN_NORM, 0, PITCH_NORM );
|
|
||||||
|
|
||||||
if( EV_IsLocal( idx ) )
|
|
||||||
{
|
|
||||||
switch( (g_iSwing++) % 3 )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROWBAR_ATTACK1MISS, 1 );
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROWBAR_ATTACK2MISS, 1 );
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
gEngfuncs.pEventAPI->EV_WeaponAnimation( CROWBAR_ATTACK3MISS, 1 );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//======================
|
|
||||||
// CROWBAR END
|
|
||||||
//======================
|
|
||||||
|
|
||||||
//======================
|
//======================
|
||||||
// CROSSBOW START
|
// CROSSBOW START
|
||||||
//======================
|
//======================
|
||||||
|
|
|
@ -29,7 +29,6 @@ void EV_FireMP52( struct event_args_s *args );
|
||||||
void EV_FirePython( struct event_args_s *args );
|
void EV_FirePython( struct event_args_s *args );
|
||||||
void EV_FireGauss( struct event_args_s *args );
|
void EV_FireGauss( struct event_args_s *args );
|
||||||
void EV_SpinGauss( struct event_args_s *args );
|
void EV_SpinGauss( struct event_args_s *args );
|
||||||
void EV_Crowbar( struct event_args_s *args );
|
|
||||||
void EV_FireCrossbow( struct event_args_s *args );
|
void EV_FireCrossbow( struct event_args_s *args );
|
||||||
void EV_FireCrossbow2( struct event_args_s *args );
|
void EV_FireCrossbow2( struct event_args_s *args );
|
||||||
void EV_FireRpg( struct event_args_s *args );
|
void EV_FireRpg( struct event_args_s *args );
|
||||||
|
@ -67,7 +66,6 @@ void Game_HookEvents( void )
|
||||||
gEngfuncs.pfnHookEvent( "events/gauss.sc", EV_FireGauss );
|
gEngfuncs.pfnHookEvent( "events/gauss.sc", EV_FireGauss );
|
||||||
gEngfuncs.pfnHookEvent( "events/gaussspin.sc", EV_SpinGauss );
|
gEngfuncs.pfnHookEvent( "events/gaussspin.sc", EV_SpinGauss );
|
||||||
gEngfuncs.pfnHookEvent( "events/train.sc", EV_TrainPitchAdjust );
|
gEngfuncs.pfnHookEvent( "events/train.sc", EV_TrainPitchAdjust );
|
||||||
gEngfuncs.pfnHookEvent( "events/crowbar.sc", EV_Crowbar );
|
|
||||||
gEngfuncs.pfnHookEvent( "events/crossbow1.sc", EV_FireCrossbow );
|
gEngfuncs.pfnHookEvent( "events/crossbow1.sc", EV_FireCrossbow );
|
||||||
gEngfuncs.pfnHookEvent( "events/crossbow2.sc", EV_FireCrossbow2 );
|
gEngfuncs.pfnHookEvent( "events/crossbow2.sc", EV_FireCrossbow2 );
|
||||||
gEngfuncs.pfnHookEvent( "events/rpg.sc", EV_FireRpg );
|
gEngfuncs.pfnHookEvent( "events/rpg.sc", EV_FireRpg );
|
||||||
|
|
|
@ -1429,6 +1429,8 @@ void CBaseEntity::FireBullets( ULONG cShots, Vector vecSrc, Vector vecDirShootin
|
||||||
Vector vecRight = gpGlobals->v_right;
|
Vector vecRight = gpGlobals->v_right;
|
||||||
Vector vecUp = gpGlobals->v_up;
|
Vector vecUp = gpGlobals->v_up;
|
||||||
|
|
||||||
|
UTIL_MuzzleLight( vecSrc, 160, 255, 255, 128, 0, 0 );
|
||||||
|
|
||||||
if( pevAttacker == NULL )
|
if( pevAttacker == NULL )
|
||||||
pevAttacker = pev; // the default attacker is ourselves
|
pevAttacker = pev; // the default attacker is ourselves
|
||||||
|
|
||||||
|
@ -1569,6 +1571,8 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi
|
||||||
float x = 0.0f, y = 0.0f;
|
float x = 0.0f, y = 0.0f;
|
||||||
float z;
|
float z;
|
||||||
|
|
||||||
|
UTIL_MuzzleLight( vecSrc, 160, 255, 255, 128, 0, 0 );
|
||||||
|
|
||||||
if( pevAttacker == NULL )
|
if( pevAttacker == NULL )
|
||||||
pevAttacker = pev; // the default attacker is ourselves
|
pevAttacker = pev; // the default attacker is ourselves
|
||||||
|
|
||||||
|
|
|
@ -67,8 +67,6 @@ void CCrowbar::Precache( void )
|
||||||
PRECACHE_SOUND( "weapons/cbar_hitbod2.wav" );
|
PRECACHE_SOUND( "weapons/cbar_hitbod2.wav" );
|
||||||
PRECACHE_SOUND( "weapons/cbar_hitbod3.wav" );
|
PRECACHE_SOUND( "weapons/cbar_hitbod3.wav" );
|
||||||
PRECACHE_SOUND( "weapons/cbar_miss1.wav" );
|
PRECACHE_SOUND( "weapons/cbar_miss1.wav" );
|
||||||
|
|
||||||
m_usCrowbar = PRECACHE_EVENT( 1, "events/crowbar.sc" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CCrowbar::GetItemInfo( ItemInfo *p )
|
int CCrowbar::GetItemInfo( ItemInfo *p )
|
||||||
|
@ -201,12 +199,6 @@ int CCrowbar::Swing( int fFirst )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if( fFirst )
|
|
||||||
{
|
|
||||||
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usCrowbar,
|
|
||||||
0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0, 0, 0,
|
|
||||||
0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( tr.flFraction >= 1.0 )
|
if( tr.flFraction >= 1.0 )
|
||||||
{
|
{
|
||||||
|
@ -217,6 +209,21 @@ int CCrowbar::Swing( int fFirst )
|
||||||
#ifdef CROWBAR_IDLE_ANIM
|
#ifdef CROWBAR_IDLE_ANIM
|
||||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
|
||||||
#endif
|
#endif
|
||||||
|
switch( ( m_iSwing++ ) % 3 )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
SendWeaponAnim( CROWBAR_ATTACK1MISS );
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
SendWeaponAnim( CROWBAR_ATTACK2MISS );
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
SendWeaponAnim( CROWBAR_ATTACK3MISS );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/cbar_miss1.wav", 1, ATTN_NORM, 0, 94 + RANDOM_LONG( 0, 0xF ) );
|
||||||
|
|
||||||
// player "shoot" animation
|
// player "shoot" animation
|
||||||
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
|
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,12 @@ void CGlock::Spawn()
|
||||||
FallInit();// get ready to fall down.
|
FallInit();// get ready to fall down.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGlock::Holster( int skiplocal )
|
||||||
|
{
|
||||||
|
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||||
|
SendWeaponAnim( GLOCK_HOLSTER );
|
||||||
|
}
|
||||||
|
|
||||||
void CGlock::Precache( void )
|
void CGlock::Precache( void )
|
||||||
{
|
{
|
||||||
PRECACHE_MODEL( "models/v_9mmhandgun.mdl" );
|
PRECACHE_MODEL( "models/v_9mmhandgun.mdl" );
|
||||||
|
|
|
@ -540,6 +540,7 @@ BOOL CHGrunt::CheckRangeAttack2( float flDot, float flDist )
|
||||||
// crap, I might blow my own guy up. Don't throw a grenade and don't check again for a while.
|
// crap, I might blow my own guy up. Don't throw a grenade and don't check again for a while.
|
||||||
m_flNextGrenadeCheck = gpGlobals->time + 1; // one full second.
|
m_flNextGrenadeCheck = gpGlobals->time + 1; // one full second.
|
||||||
m_fThrowGrenade = FALSE;
|
m_fThrowGrenade = FALSE;
|
||||||
|
return m_fThrowGrenade; //AJH need this or it is overridden later.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
21
dlls/mp5.cpp
21
dlls/mp5.cpp
|
@ -32,7 +32,8 @@ enum mp5_e
|
||||||
MP5_DEPLOY,
|
MP5_DEPLOY,
|
||||||
MP5_FIRE1,
|
MP5_FIRE1,
|
||||||
MP5_FIRE2,
|
MP5_FIRE2,
|
||||||
MP5_FIRE3
|
MP5_FIRE3,
|
||||||
|
MP5_HOLSTER
|
||||||
};
|
};
|
||||||
|
|
||||||
LINK_ENTITY_TO_CLASS( weapon_mp5, CMP5 )
|
LINK_ENTITY_TO_CLASS( weapon_mp5, CMP5 )
|
||||||
|
@ -120,20 +121,26 @@ BOOL CMP5::Deploy()
|
||||||
return DefaultDeploy( "models/v_9mmAR.mdl", "models/p_9mmAR.mdl", MP5_DEPLOY, "mp5" );
|
return DefaultDeploy( "models/v_9mmAR.mdl", "models/p_9mmAR.mdl", MP5_DEPLOY, "mp5" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMP5::Holster( int skiplocal /* = 0 */)
|
||||||
|
{
|
||||||
|
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||||
|
SendWeaponAnim( MP5_HOLSTER );
|
||||||
|
}
|
||||||
|
|
||||||
void CMP5::PrimaryAttack()
|
void CMP5::PrimaryAttack()
|
||||||
{
|
{
|
||||||
// don't fire underwater
|
// don't fire underwater
|
||||||
if (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD)
|
if (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD)
|
||||||
{
|
{
|
||||||
PlayEmptySound();
|
PlayEmptySound();
|
||||||
m_flNextPrimaryAttack = 0.15;
|
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_iClip <= 0 )
|
if( m_iClip <= 0 )
|
||||||
{
|
{
|
||||||
PlayEmptySound();
|
PlayEmptySound();
|
||||||
m_flNextPrimaryAttack = 0.15;
|
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +178,7 @@ void CMP5::PrimaryAttack()
|
||||||
#else
|
#else
|
||||||
flags = 0;
|
flags = 0;
|
||||||
#endif
|
#endif
|
||||||
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usMP5, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 );
|
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usMP5, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, RANDOM_LONG( MP5_FIRE1, MP5_FIRE3 ), m_iShell, 0, 0 );
|
||||||
|
|
||||||
if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 )
|
if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 )
|
||||||
// HEV suit - indicate out of ammo condition
|
// HEV suit - indicate out of ammo condition
|
||||||
|
@ -180,7 +187,7 @@ void CMP5::PrimaryAttack()
|
||||||
m_flNextPrimaryAttack = GetNextAttackDelay( 0.1 );
|
m_flNextPrimaryAttack = GetNextAttackDelay( 0.1 );
|
||||||
|
|
||||||
if( m_flNextPrimaryAttack < UTIL_WeaponTimeBase() )
|
if( m_flNextPrimaryAttack < UTIL_WeaponTimeBase() )
|
||||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1;
|
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.2;
|
||||||
|
|
||||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
|
||||||
}
|
}
|
||||||
|
@ -191,7 +198,7 @@ void CMP5::SecondaryAttack( void )
|
||||||
if (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD)
|
if (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD)
|
||||||
{
|
{
|
||||||
PlayEmptySound( );
|
PlayEmptySound( );
|
||||||
m_flNextPrimaryAttack = 0.15;
|
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,6 +241,8 @@ void CMP5::SecondaryAttack( void )
|
||||||
if( !m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] )
|
if( !m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] )
|
||||||
// HEV suit - indicate out of ammo condition
|
// HEV suit - indicate out of ammo condition
|
||||||
m_pPlayer->SetSuitUpdate( "!HEV_AMO0", FALSE, 0 );
|
m_pPlayer->SetSuitUpdate( "!HEV_AMO0", FALSE, 0 );
|
||||||
|
|
||||||
|
m_pPlayer->pev->punchangle.x -= 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMP5::Reload( void )
|
void CMP5::Reload( void )
|
||||||
|
|
|
@ -123,7 +123,7 @@ void CPython::Holster( int skiplocal /* = 0 */ )
|
||||||
SecondaryAttack();
|
SecondaryAttack();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.0;
|
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f;
|
||||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
|
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );
|
||||||
SendWeaponAnim( PYTHON_HOLSTER );
|
SendWeaponAnim( PYTHON_HOLSTER );
|
||||||
}
|
}
|
||||||
|
|
|
@ -436,8 +436,10 @@ void CRpg::Holster( int skiplocal /* = 0 */ )
|
||||||
|
|
||||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||||
|
|
||||||
SendWeaponAnim( RPG_HOLSTER1 );
|
if( m_iClip )
|
||||||
|
SendWeaponAnim( RPG_HOLSTER1 );
|
||||||
|
else
|
||||||
|
SendWeaponAnim( RPG_HOLSTER2 );
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
if( m_pSpot )
|
if( m_pSpot )
|
||||||
{
|
{
|
||||||
|
|
|
@ -113,6 +113,12 @@ BOOL CShotgun::Deploy()
|
||||||
return DefaultDeploy( "models/v_shotgun.mdl", "models/p_shotgun.mdl", SHOTGUN_DRAW, "shotgun" );
|
return DefaultDeploy( "models/v_shotgun.mdl", "models/p_shotgun.mdl", SHOTGUN_DRAW, "shotgun" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CShotgun::Holster( int skiplocal )
|
||||||
|
{
|
||||||
|
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||||
|
SendWeaponAnim( SHOTGUN_HOLSTER );
|
||||||
|
}
|
||||||
|
|
||||||
void CShotgun::PrimaryAttack()
|
void CShotgun::PrimaryAttack()
|
||||||
{
|
{
|
||||||
// don't fire underwater
|
// don't fire underwater
|
||||||
|
|
|
@ -475,6 +475,9 @@ void CSqueak::Holster( int skiplocal /* = 0 */ )
|
||||||
{
|
{
|
||||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||||
|
|
||||||
|
SendWeaponAnim( SQUEAK_DOWN );
|
||||||
|
EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_WEAPON, "common/null.wav", 1.0, ATTN_NORM );
|
||||||
|
|
||||||
if( !m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] )
|
if( !m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] )
|
||||||
{
|
{
|
||||||
m_pPlayer->pev->weapons &= ~( 1 << WEAPON_SNARK );
|
m_pPlayer->pev->weapons &= ~( 1 << WEAPON_SNARK );
|
||||||
|
@ -482,9 +485,6 @@ void CSqueak::Holster( int skiplocal /* = 0 */ )
|
||||||
SetNextThink( 0.1 );
|
SetNextThink( 0.1 );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SendWeaponAnim( SQUEAK_DOWN );
|
|
||||||
EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_WEAPON, "common/null.wav", 1.0, ATTN_NORM );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSqueak::PrimaryAttack()
|
void CSqueak::PrimaryAttack()
|
||||||
|
|
|
@ -33,6 +33,22 @@
|
||||||
#include "movewith.h"
|
#include "movewith.h"
|
||||||
#include "locus.h"
|
#include "locus.h"
|
||||||
|
|
||||||
|
void UTIL_MuzzleLight( Vector vecSrc, float flRadius, byte r, byte g, byte b, float flTime, float flDecay )
|
||||||
|
{
|
||||||
|
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, vecSrc );
|
||||||
|
WRITE_BYTE( TE_DLIGHT );
|
||||||
|
WRITE_COORD( vecSrc.x ); // X
|
||||||
|
WRITE_COORD( vecSrc.y ); // Y
|
||||||
|
WRITE_COORD( vecSrc.z ); // Z
|
||||||
|
WRITE_BYTE( flRadius * 0.1f ); // radius * 0.1
|
||||||
|
WRITE_BYTE( r ); // r
|
||||||
|
WRITE_BYTE( g ); // g
|
||||||
|
WRITE_BYTE( b ); // b
|
||||||
|
WRITE_BYTE( flTime * 10.0f ); // time * 10
|
||||||
|
WRITE_BYTE( flDecay * 0.1f ); // decay * 0.1
|
||||||
|
MESSAGE_END();
|
||||||
|
}
|
||||||
|
|
||||||
float UTIL_WeaponTimeBase( void )
|
float UTIL_WeaponTimeBase( void )
|
||||||
{
|
{
|
||||||
#if defined( CLIENT_WEAPONS )
|
#if defined( CLIENT_WEAPONS )
|
||||||
|
|
|
@ -614,4 +614,5 @@ int GetStdLightStyle (int iStyle); //LRC- declared here so it can be used by eve
|
||||||
// needs to deal with the standard lightstyles.
|
// needs to deal with the standard lightstyles.
|
||||||
// LRC- for aliases and groups
|
// LRC- for aliases and groups
|
||||||
CBaseEntity* UTIL_FollowReference( CBaseEntity* pStartEntity, const char* szName );
|
CBaseEntity* UTIL_FollowReference( CBaseEntity* pStartEntity, const char* szName );
|
||||||
|
void UTIL_MuzzleLight( Vector vecSrc, float flRadius, byte r, byte g, byte b, float flTime, float flDecay );
|
||||||
#endif // UTIL_H
|
#endif // UTIL_H
|
||||||
|
|
|
@ -300,6 +300,7 @@ void W_Precache( void )
|
||||||
UTIL_PrecacheOther( "item_antidote" );
|
UTIL_PrecacheOther( "item_antidote" );
|
||||||
UTIL_PrecacheOther( "item_security" );
|
UTIL_PrecacheOther( "item_security" );
|
||||||
UTIL_PrecacheOther( "item_longjump" );
|
UTIL_PrecacheOther( "item_longjump" );
|
||||||
|
//UTIL_PrecacheOtherWeapon( "weapon_debug" );
|
||||||
|
|
||||||
// shotgun
|
// shotgun
|
||||||
UTIL_PrecacheOtherWeapon( "weapon_shotgun" );
|
UTIL_PrecacheOtherWeapon( "weapon_shotgun" );
|
||||||
|
@ -386,6 +387,17 @@ void W_Precache( void )
|
||||||
PRECACHE_SOUND( "items/weapondrop1.wav" );// weapon falls to the ground
|
PRECACHE_SOUND( "items/weapondrop1.wav" );// weapon falls to the ground
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CBasePlayerItem::KeyValue( KeyValueData *pkvd ) //AJH
|
||||||
|
{
|
||||||
|
if (FStrEq(pkvd->szKeyName, "master"))
|
||||||
|
{
|
||||||
|
m_sMaster = ALLOC_STRING(pkvd->szValue);
|
||||||
|
pkvd->fHandled = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CBaseDelay::KeyValue( pkvd );
|
||||||
|
}
|
||||||
|
|
||||||
TYPEDESCRIPTION CBasePlayerItem::m_SaveData[] =
|
TYPEDESCRIPTION CBasePlayerItem::m_SaveData[] =
|
||||||
{
|
{
|
||||||
DEFINE_FIELD( CBasePlayerItem, m_pPlayer, FIELD_CLASSPTR ),
|
DEFINE_FIELD( CBasePlayerItem, m_pPlayer, FIELD_CLASSPTR ),
|
||||||
|
@ -415,6 +427,7 @@ TYPEDESCRIPTION CBasePlayerWeapon::m_SaveData[] =
|
||||||
DEFINE_FIELD( CBasePlayerWeapon, m_iDefaultAmmo, FIELD_INTEGER ),
|
DEFINE_FIELD( CBasePlayerWeapon, m_iDefaultAmmo, FIELD_INTEGER ),
|
||||||
//DEFINE_FIELD( CBasePlayerWeapon, m_iClientClip, FIELD_INTEGER ), reset to zero on load so hud gets updated correctly
|
//DEFINE_FIELD( CBasePlayerWeapon, m_iClientClip, FIELD_INTEGER ), reset to zero on load so hud gets updated correctly
|
||||||
//DEFINE_FIELD( CBasePlayerWeapon, m_iClientWeaponState, FIELD_INTEGER ), reset to zero on load so hud gets updated correctly
|
//DEFINE_FIELD( CBasePlayerWeapon, m_iClientWeaponState, FIELD_INTEGER ), reset to zero on load so hud gets updated correctly
|
||||||
|
DEFINE_FIELD( CBasePlayerWeapon, m_sMaster, FIELD_STRING ), // AJH master entity for Lockable weapons
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_SAVERESTORE( CBasePlayerWeapon, CBasePlayerItem )
|
IMPLEMENT_SAVERESTORE( CBasePlayerWeapon, CBasePlayerItem )
|
||||||
|
@ -577,11 +590,35 @@ void CBasePlayerItem::DefaultTouch( CBaseEntity *pOther )
|
||||||
{
|
{
|
||||||
AttachToPlayer( pPlayer );
|
AttachToPlayer( pPlayer );
|
||||||
EMIT_SOUND( ENT( pPlayer->pev ), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
|
EMIT_SOUND( ENT( pPlayer->pev ), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
|
||||||
|
|
||||||
|
if( !gEvilImpulse101 )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char sample[32];
|
||||||
|
char weapon_name[32];
|
||||||
|
strcpy(weapon_name, STRING(pev->classname));
|
||||||
|
|
||||||
|
if(strncmp(weapon_name, "weapon_", 7) == 0)
|
||||||
|
i = 7;
|
||||||
|
else if (strncmp(weapon_name, "item_", 5) == 0)
|
||||||
|
i = 5;
|
||||||
|
else
|
||||||
|
i = 0;
|
||||||
|
|
||||||
|
sprintf( sample, "!%s", weapon_name + i );
|
||||||
|
pPlayer->SetSuitUpdate( sample, FALSE, SUIT_NEXT_IN_30SEC );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SUB_UseTargets( pOther, USE_TOGGLE, 0 ); // UNDONE: when should this happen?
|
SUB_UseTargets( pOther, USE_TOGGLE, 0 ); // UNDONE: when should this happen?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CBasePlayerItem::Spawn()
|
||||||
|
{
|
||||||
|
pev->animtime = gpGlobals->time + 0.1;
|
||||||
|
CBaseAnimating::Spawn();
|
||||||
|
}
|
||||||
|
|
||||||
BOOL CanAttack( float attack_time, float curtime, BOOL isPredicted )
|
BOOL CanAttack( float attack_time, float curtime, BOOL isPredicted )
|
||||||
{
|
{
|
||||||
#if defined( CLIENT_WEAPONS )
|
#if defined( CLIENT_WEAPONS )
|
||||||
|
@ -745,6 +782,9 @@ void CBasePlayerWeapon :: SetNextThink( float delay )
|
||||||
// CALLED THROUGH the newly-touched weapon's instance. The existing player weapon is pOriginal
|
// CALLED THROUGH the newly-touched weapon's instance. The existing player weapon is pOriginal
|
||||||
int CBasePlayerWeapon::AddDuplicate( CBasePlayerItem *pOriginal )
|
int CBasePlayerWeapon::AddDuplicate( CBasePlayerItem *pOriginal )
|
||||||
{
|
{
|
||||||
|
if( !UTIL_IsMasterTriggered( m_sMaster, m_pPlayer ) )
|
||||||
|
return FALSE; // AJH allows for locked weapons
|
||||||
|
|
||||||
if( m_iDefaultAmmo )
|
if( m_iDefaultAmmo )
|
||||||
{
|
{
|
||||||
return ExtractAmmo( (CBasePlayerWeapon *)pOriginal );
|
return ExtractAmmo( (CBasePlayerWeapon *)pOriginal );
|
||||||
|
@ -758,6 +798,9 @@ int CBasePlayerWeapon::AddDuplicate( CBasePlayerItem *pOriginal )
|
||||||
|
|
||||||
int CBasePlayerWeapon::AddToPlayer( CBasePlayer *pPlayer )
|
int CBasePlayerWeapon::AddToPlayer( CBasePlayer *pPlayer )
|
||||||
{
|
{
|
||||||
|
if( !UTIL_IsMasterTriggered( m_sMaster, m_pPlayer ) )
|
||||||
|
return FALSE; // AJH allows for locked weapons
|
||||||
|
|
||||||
int bResult = CBasePlayerItem::AddToPlayer( pPlayer );
|
int bResult = CBasePlayerItem::AddToPlayer( pPlayer );
|
||||||
|
|
||||||
pPlayer->pev->weapons |= ( 1 << m_iId );
|
pPlayer->pev->weapons |= ( 1 << m_iId );
|
||||||
|
@ -905,16 +948,7 @@ BOOL CBasePlayerWeapon::AddSecondaryAmmo( int iCount, char *szName, int iMax )
|
||||||
//=========================================================
|
//=========================================================
|
||||||
BOOL CBasePlayerWeapon::IsUseable( void )
|
BOOL CBasePlayerWeapon::IsUseable( void )
|
||||||
{
|
{
|
||||||
if( m_iClip <= 0 )
|
return CanDeploy();
|
||||||
{
|
|
||||||
if( m_pPlayer->m_rgAmmo[PrimaryAmmoIndex()] <= 0 && iMaxAmmo1() != -1 )
|
|
||||||
{
|
|
||||||
// clip is empty (or nonexistant) and the player has no more ammo of this type.
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CBasePlayerWeapon::CanDeploy( void )
|
BOOL CBasePlayerWeapon::CanDeploy( void )
|
||||||
|
@ -1067,6 +1101,9 @@ void CBasePlayerAmmo::DefaultTouch( CBaseEntity *pOther )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !UTIL_IsMasterTriggered( m_sMaster, m_pPlayer ) )
|
||||||
|
return; // AJH allows for locked weapons
|
||||||
|
|
||||||
if( AddAmmo( pOther ) )
|
if( AddAmmo( pOther ) )
|
||||||
{
|
{
|
||||||
if( g_pGameRules->AmmoShouldRespawn( this ) == GR_AMMO_RESPAWN_YES )
|
if( g_pGameRules->AmmoShouldRespawn( this ) == GR_AMMO_RESPAWN_YES )
|
||||||
|
|
|
@ -66,18 +66,19 @@ public:
|
||||||
#define WEAPON_CROWBAR 1
|
#define WEAPON_CROWBAR 1
|
||||||
#define WEAPON_GLOCK 2
|
#define WEAPON_GLOCK 2
|
||||||
#define WEAPON_PYTHON 3
|
#define WEAPON_PYTHON 3
|
||||||
#define WEAPON_MP5 4
|
#define WEAPON_GENERIC 4
|
||||||
#define WEAPON_CHAINGUN 5
|
#define WEAPON_MP5 5
|
||||||
#define WEAPON_CROSSBOW 6
|
#define WEAPON_DEBUG 6
|
||||||
#define WEAPON_SHOTGUN 7
|
#define WEAPON_CROSSBOW 7
|
||||||
#define WEAPON_RPG 8
|
#define WEAPON_SHOTGUN 8
|
||||||
#define WEAPON_GAUSS 9
|
#define WEAPON_RPG 9
|
||||||
#define WEAPON_EGON 10
|
#define WEAPON_GAUSS 10
|
||||||
#define WEAPON_HORNETGUN 11
|
#define WEAPON_EGON 11
|
||||||
#define WEAPON_HANDGRENADE 12
|
#define WEAPON_HORNETGUN 12
|
||||||
#define WEAPON_TRIPMINE 13
|
#define WEAPON_HANDGRENADE 13
|
||||||
#define WEAPON_SATCHEL 14
|
#define WEAPON_TRIPMINE 14
|
||||||
#define WEAPON_SNARK 15
|
#define WEAPON_SATCHEL 15
|
||||||
|
#define WEAPON_SNARK 16
|
||||||
|
|
||||||
#define WEAPON_ALLWEAPONS (~(1<<WEAPON_SUIT))
|
#define WEAPON_ALLWEAPONS (~(1<<WEAPON_SUIT))
|
||||||
|
|
||||||
|
@ -216,6 +217,9 @@ class CBasePlayerItem : public CBaseAnimating
|
||||||
public:
|
public:
|
||||||
virtual void SetObjectCollisionBox( void );
|
virtual void SetObjectCollisionBox( void );
|
||||||
|
|
||||||
|
#ifndef CLIENT_DLL // AJH for lockable weapons
|
||||||
|
virtual void KeyValue( KeyValueData* pkvd);
|
||||||
|
#endif
|
||||||
virtual int Save( CSave &save );
|
virtual int Save( CSave &save );
|
||||||
virtual int Restore( CRestore &restore );
|
virtual int Restore( CRestore &restore );
|
||||||
|
|
||||||
|
@ -257,11 +261,23 @@ public:
|
||||||
static ItemInfo ItemInfoArray[ MAX_WEAPONS ];
|
static ItemInfo ItemInfoArray[ MAX_WEAPONS ];
|
||||||
static AmmoInfo AmmoInfoArray[ MAX_AMMO_SLOTS ];
|
static AmmoInfo AmmoInfoArray[ MAX_AMMO_SLOTS ];
|
||||||
|
|
||||||
|
string_t m_sMaster; //AJH for lockable weapons
|
||||||
|
|
||||||
CBasePlayer *m_pPlayer;
|
CBasePlayer *m_pPlayer;
|
||||||
CBasePlayerItem *m_pNext;
|
CBasePlayerItem *m_pNext;
|
||||||
int m_iId; // WEAPON_???
|
int m_iId; // WEAPON_???
|
||||||
|
|
||||||
virtual int iItemSlot( void ) { return 0; } // return 0 to MAX_ITEMS_SLOTS, used in hud
|
#ifndef CLIENT_DLL//AJH Test Debug
|
||||||
|
virtual void Spawn();
|
||||||
|
#endif//AJH
|
||||||
|
virtual int iItemSlot( void )
|
||||||
|
{
|
||||||
|
ItemInfo II;
|
||||||
|
if(GetItemInfo(&II))
|
||||||
|
return II.iSlot + 1;
|
||||||
|
else
|
||||||
|
return 0;// return 0 to MAX_ITEMS_SLOTS, used in hud
|
||||||
|
}
|
||||||
|
|
||||||
int iItemPosition( void ) { return ItemInfoArray[ m_iId ].iPosition; }
|
int iItemPosition( void ) { return ItemInfoArray[ m_iId ].iPosition; }
|
||||||
const char *pszAmmo1( void ) { return ItemInfoArray[ m_iId ].pszAmmo1; }
|
const char *pszAmmo1( void ) { return ItemInfoArray[ m_iId ].pszAmmo1; }
|
||||||
|
@ -328,6 +344,7 @@ public:
|
||||||
virtual BOOL ShouldWeaponIdle( void ) {return FALSE; };
|
virtual BOOL ShouldWeaponIdle( void ) {return FALSE; };
|
||||||
virtual void Holster( int skiplocal = 0 );
|
virtual void Holster( int skiplocal = 0 );
|
||||||
virtual BOOL UseDecrement( void ) { return FALSE; };
|
virtual BOOL UseDecrement( void ) { return FALSE; };
|
||||||
|
//void KeyValue( KeyValueData *pkvd );
|
||||||
|
|
||||||
//LRC - used by weaponstrip
|
//LRC - used by weaponstrip
|
||||||
void DrainClip(CBasePlayer* pPlayer, BOOL keep, int i9mm, int i357, int iBuck, int iBolt, int iARGren, int iRock, int iUranium, int iSatchel, int iSnark, int iTrip, int iGren );
|
void DrainClip(CBasePlayer* pPlayer, BOOL keep, int i9mm, int i357, int iBuck, int iBolt, int iARGren, int iRock, int iUranium, int iSatchel, int iSnark, int iTrip, int iGren );
|
||||||
|
@ -341,7 +358,7 @@ public:
|
||||||
float GetNextAttackDelay( float delay );
|
float GetNextAttackDelay( float delay );
|
||||||
|
|
||||||
float m_flPumpTime;
|
float m_flPumpTime;
|
||||||
int m_fInSpecialReload; // Are we in the middle of a reload for the shotguns
|
int m_fInSpecialReload; // Are we in the middle of a reload for the shotguns
|
||||||
float m_flNextPrimaryAttack; // soonest time ItemPostFrame will call PrimaryAttack
|
float m_flNextPrimaryAttack; // soonest time ItemPostFrame will call PrimaryAttack
|
||||||
float m_flNextSecondaryAttack; // soonest time ItemPostFrame will call SecondaryAttack
|
float m_flNextSecondaryAttack; // soonest time ItemPostFrame will call SecondaryAttack
|
||||||
float m_flTimeWeaponIdle; // soonest time ItemPostFrame will call WeaponIdle
|
float m_flTimeWeaponIdle; // soonest time ItemPostFrame will call WeaponIdle
|
||||||
|
@ -351,6 +368,7 @@ public:
|
||||||
int m_iClientClip; // the last version of m_iClip sent to hud dll
|
int m_iClientClip; // the last version of m_iClip sent to hud dll
|
||||||
int m_iClientWeaponState; // the last version of the weapon state sent to hud dll (is current weapon, is on target)
|
int m_iClientWeaponState; // the last version of the weapon state sent to hud dll (is current weapon, is on target)
|
||||||
int m_fInReload; // Are we in the middle of a reload;
|
int m_fInReload; // Are we in the middle of a reload;
|
||||||
|
int m_iClipSize;//This required weapon_generic, defintion in same class will crash'es compile
|
||||||
|
|
||||||
int m_iDefaultAmmo;// how much ammo you get when you pick up this weapon as placed by a level designer.
|
int m_iDefaultAmmo;// how much ammo you get when you pick up this weapon as placed by a level designer.
|
||||||
|
|
||||||
|
@ -359,7 +377,7 @@ public:
|
||||||
float m_flLastFireTime;
|
float m_flLastFireTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CBasePlayerAmmo : public CBaseEntity
|
class CBasePlayerAmmo : public CBasePlayerItem //AJH
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void Spawn( void );
|
virtual void Spawn( void );
|
||||||
|
@ -468,7 +486,6 @@ class CGlock : public CBasePlayerWeapon
|
||||||
public:
|
public:
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 2; }
|
|
||||||
int GetItemInfo( ItemInfo *p );
|
int GetItemInfo( ItemInfo *p );
|
||||||
int AddToPlayer( CBasePlayer *pPlayer );
|
int AddToPlayer( CBasePlayer *pPlayer );
|
||||||
|
|
||||||
|
@ -476,6 +493,7 @@ public:
|
||||||
void SecondaryAttack( void );
|
void SecondaryAttack( void );
|
||||||
void GlockFire( float flSpread, float flCycleTime, BOOL fUseAutoAim );
|
void GlockFire( float flSpread, float flCycleTime, BOOL fUseAutoAim );
|
||||||
BOOL Deploy( void );
|
BOOL Deploy( void );
|
||||||
|
void Holster( int skiplocal = 0 );
|
||||||
void Reload( void );
|
void Reload( void );
|
||||||
void WeaponIdle( void );
|
void WeaponIdle( void );
|
||||||
|
|
||||||
|
@ -500,7 +518,6 @@ class CCrowbar : public CBasePlayerWeapon
|
||||||
public:
|
public:
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 1; }
|
|
||||||
void EXPORT SwingAgain( void );
|
void EXPORT SwingAgain( void );
|
||||||
void EXPORT Smack( void );
|
void EXPORT Smack( void );
|
||||||
int GetItemInfo( ItemInfo *p );
|
int GetItemInfo( ItemInfo *p );
|
||||||
|
@ -533,7 +550,6 @@ class CPython : public CBasePlayerWeapon
|
||||||
public:
|
public:
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 2; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
int AddToPlayer( CBasePlayer *pPlayer );
|
int AddToPlayer( CBasePlayer *pPlayer );
|
||||||
void PrimaryAttack( void );
|
void PrimaryAttack( void );
|
||||||
|
@ -564,7 +580,6 @@ class CMP5 : public CBasePlayerWeapon
|
||||||
public:
|
public:
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 3; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
int AddToPlayer( CBasePlayer *pPlayer );
|
int AddToPlayer( CBasePlayer *pPlayer );
|
||||||
|
|
||||||
|
@ -572,6 +587,7 @@ public:
|
||||||
void SecondaryAttack( void );
|
void SecondaryAttack( void );
|
||||||
int SecondaryAmmoIndex( void );
|
int SecondaryAmmoIndex( void );
|
||||||
BOOL Deploy( void );
|
BOOL Deploy( void );
|
||||||
|
void Holster( int skiplocal = 0 );
|
||||||
void Reload( void );
|
void Reload( void );
|
||||||
void WeaponIdle( void );
|
void WeaponIdle( void );
|
||||||
BOOL IsUseable();
|
BOOL IsUseable();
|
||||||
|
@ -597,7 +613,6 @@ class CCrossbow : public CBasePlayerWeapon
|
||||||
public:
|
public:
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( ) { return 3; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
|
|
||||||
void FireBolt( void );
|
void FireBolt( void );
|
||||||
|
@ -636,13 +651,13 @@ public:
|
||||||
#endif
|
#endif
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( ) { return 3; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
int AddToPlayer( CBasePlayer *pPlayer );
|
int AddToPlayer( CBasePlayer *pPlayer );
|
||||||
|
|
||||||
void PrimaryAttack( void );
|
void PrimaryAttack( void );
|
||||||
void SecondaryAttack( void );
|
void SecondaryAttack( void );
|
||||||
BOOL Deploy( );
|
BOOL Deploy( );
|
||||||
|
void Holster( int skiplocal = 0 );
|
||||||
void Reload( void );
|
void Reload( void );
|
||||||
void WeaponTick();
|
void WeaponTick();
|
||||||
void WeaponIdle( void );
|
void WeaponIdle( void );
|
||||||
|
@ -690,7 +705,6 @@ public:
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
void Reload( void );
|
void Reload( void );
|
||||||
int iItemSlot( void ) { return 4; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
int AddToPlayer( CBasePlayer *pPlayer );
|
int AddToPlayer( CBasePlayer *pPlayer );
|
||||||
|
|
||||||
|
@ -750,7 +764,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 4; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
int AddToPlayer( CBasePlayer *pPlayer );
|
int AddToPlayer( CBasePlayer *pPlayer );
|
||||||
BOOL IsUseable();
|
BOOL IsUseable();
|
||||||
|
@ -797,7 +810,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 4; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
int AddToPlayer( CBasePlayer *pPlayer );
|
int AddToPlayer( CBasePlayer *pPlayer );
|
||||||
|
|
||||||
|
@ -863,7 +875,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 4; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
int AddToPlayer( CBasePlayer *pPlayer );
|
int AddToPlayer( CBasePlayer *pPlayer );
|
||||||
|
|
||||||
|
@ -897,7 +908,6 @@ class CHandGrenade : public CBasePlayerWeapon
|
||||||
public:
|
public:
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 5; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
|
|
||||||
void PrimaryAttack( void );
|
void PrimaryAttack( void );
|
||||||
|
@ -926,7 +936,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 5; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
int AddToPlayer( CBasePlayer *pPlayer );
|
int AddToPlayer( CBasePlayer *pPlayer );
|
||||||
void PrimaryAttack( void );
|
void PrimaryAttack( void );
|
||||||
|
@ -955,7 +964,6 @@ class CTripmine : public CBasePlayerWeapon
|
||||||
public:
|
public:
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 5; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
void SetObjectCollisionBox( void )
|
void SetObjectCollisionBox( void )
|
||||||
{
|
{
|
||||||
|
@ -987,7 +995,6 @@ class CSqueak : public CBasePlayerWeapon
|
||||||
public:
|
public:
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
void Precache( void );
|
void Precache( void );
|
||||||
int iItemSlot( void ) { return 5; }
|
|
||||||
int GetItemInfo(ItemInfo *p);
|
int GetItemInfo(ItemInfo *p);
|
||||||
|
|
||||||
void PrimaryAttack( void );
|
void PrimaryAttack( void );
|
||||||
|
|
Loading…
Reference in New Issue