Get rid of cs_baseentity.cpp, move client-side prediction stubs to appropriate headers, as server code is not intended to be buildable now.
This commit is contained in:
parent
333bdd7638
commit
a89154a3b0
|
@ -176,10 +176,14 @@ Always 0.0 on client, even if not predicting weapons ( won't get called
|
|||
in that case )
|
||||
=====================
|
||||
*/
|
||||
/*
|
||||
moved in util.h
|
||||
|
||||
float UTIL_WeaponTimeBase( void )
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
*/
|
||||
|
||||
static unsigned int glSeed = 0;
|
||||
|
||||
|
|
|
@ -36,249 +36,5 @@ const Vector g_vecZero = Vector( 0, 0, 0 );
|
|||
int gmsgWeapPickup = 0;
|
||||
enginefuncs_t g_engfuncs;
|
||||
globalvars_t *gpGlobals;
|
||||
|
||||
ItemInfo CBasePlayerItem::ItemInfoArray[MAX_WEAPONS];
|
||||
|
||||
void EMIT_SOUND_DYN(edict_t *entity, int channel, const char *sample, float volume, float attenuation, int flags, int pitch) { }
|
||||
|
||||
// CBaseEntity Stubs
|
||||
int CBaseEntity :: TakeHealth( float flHealth, int bitsDamageType ) { return 1; }
|
||||
int CBaseEntity :: TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType ) { return 1; }
|
||||
CBaseEntity *CBaseEntity::GetNextTarget( void ) { return NULL; }
|
||||
int CBaseEntity::Save( CSave &save ) { return 1; }
|
||||
int CBaseEntity::Restore( CRestore &restore ) { return 1; }
|
||||
void CBaseEntity::SetObjectCollisionBox( void ) { }
|
||||
int CBaseEntity :: Intersects( CBaseEntity *pOther ) { return 0; }
|
||||
void CBaseEntity :: MakeDormant( void ) { }
|
||||
int CBaseEntity :: IsDormant( void ) { return 0; }
|
||||
BOOL CBaseEntity :: IsInWorld( void ) { return TRUE; }
|
||||
int CBaseEntity::ShouldToggle( USE_TYPE useType, BOOL currentState ) { return 0; }
|
||||
int CBaseEntity :: DamageDecal( int bitsDamageType ) { return -1; }
|
||||
CBaseEntity * CBaseEntity::Create( char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner ) { return NULL; }
|
||||
void CBaseEntity::SUB_Remove( void ) { }
|
||||
|
||||
// CBaseDelay Stubs
|
||||
void CBaseDelay :: KeyValue( struct KeyValueData_s * ) { }
|
||||
int CBaseDelay::Restore( class CRestore & ) { return 1; }
|
||||
int CBaseDelay::Save( class CSave & ) { return 1; }
|
||||
|
||||
// CBaseAnimating Stubs
|
||||
int CBaseAnimating::Restore( class CRestore & ) { return 1; }
|
||||
int CBaseAnimating::Save( class CSave & ) { return 1; }
|
||||
|
||||
// DEBUG Stubs
|
||||
edict_t *DBG_EntOfVars( const entvars_t *pev ) { return NULL; }
|
||||
void DBG_AssertFunction(BOOL fExpr, const char* szExpr, const char* szFile, int szLine, const char* szMessage) { }
|
||||
|
||||
// UTIL_* Stubs
|
||||
void UTIL_PrecacheOther( const char *szClassname ) { }
|
||||
void UTIL_BloodDrips( const Vector &origin, const Vector &direction, int color, int amount ) { }
|
||||
void UTIL_DecalTrace( TraceResult *pTrace, int decalNumber ) { }
|
||||
void UTIL_GunshotDecalTrace( TraceResult *pTrace, int decalNumber ) { }
|
||||
BOOL UTIL_IsValidEntity( edict_t *pent ) { return TRUE; }
|
||||
void UTIL_SetOrigin( entvars_t *, const Vector &org ) { }
|
||||
void UTIL_LogPrintf(const char *,...) { }
|
||||
void UTIL_ClientPrintAll( int,char const *,char const *,char const *,char const *,char const *) { }
|
||||
void ClientPrint( entvars_t *client, int msg_dest, const char *msg_name, const char *param1, const char *param2, const char *param3, const char *param4 ) { }
|
||||
CBaseEntity *UTIL_FindEntityByClassname(CBaseEntity *pStartEntity, const char *szName) { return 0; }
|
||||
|
||||
// CBaseToggle Stubs
|
||||
int CBaseToggle::Restore( class CRestore & ) { return 1; }
|
||||
int CBaseToggle::Save( class CSave & ) { return 1; }
|
||||
void CBaseToggle :: KeyValue( struct KeyValueData_s * ) { }
|
||||
|
||||
void UTIL_Remove( CBaseEntity *pEntity ){ }
|
||||
struct skilldata_t gSkillData;
|
||||
void UTIL_SetSize( entvars_t *pev, const Vector &vecMin, const Vector &vecMax ){ }
|
||||
CBaseEntity *UTIL_FindEntityInSphere( CBaseEntity *pStartEntity, const Vector &vecCenter, float flRadius ){ return 0;}
|
||||
|
||||
Vector UTIL_VecToAngles( const Vector &vec ){ return 0; }
|
||||
CSprite *CSprite::SpriteCreate( const char *pSpriteName, const Vector &origin, BOOL animate ) { return 0; }
|
||||
void CBeam::PointEntInit( const Vector &start, int endIndex ) { }
|
||||
CBeam *CBeam::BeamCreate( const char *pSpriteName, int width ) { return NULL; }
|
||||
void CSprite::Expand( float scaleSpeed, float fadeSpeed ) { }
|
||||
|
||||
|
||||
CBaseEntity* CBaseMonster :: CheckTraceHullAttack( float flDist, int iDamage, int iDmgType ) { return NULL; }
|
||||
void CBaseMonster :: Look ( int iDistance ) { }
|
||||
float CBaseAnimating :: StudioFrameAdvance ( float flInterval ) { return 0.0; }
|
||||
int CBaseMonster::IRelationship ( CBaseEntity *pTarget ) { return 0; }
|
||||
CBaseEntity *CBaseMonster :: BestVisibleEnemy ( void ) { return NULL; }
|
||||
BOOL CBaseMonster :: FInViewCone ( CBaseEntity *pEntity ) { return FALSE; }
|
||||
BOOL CBaseMonster :: FInViewCone ( Vector *pOrigin ) { return FALSE; }
|
||||
BOOL CBaseEntity :: FVisible ( CBaseEntity *pEntity ) { return FALSE; }
|
||||
BOOL CBaseEntity :: FVisible ( const Vector &vecOrigin ) { return FALSE; }
|
||||
void CBaseMonster :: MakeIdealYaw( Vector vecTarget ) { }
|
||||
float CBaseMonster::ChangeYaw ( int yawSpeed ) { return 0; }
|
||||
int CBaseAnimating :: LookupActivity ( int activity ) { return 0; }
|
||||
int CBaseAnimating :: LookupActivityHeaviest ( int activity ) { return 0; }
|
||||
int CBaseAnimating :: LookupSequence ( const char *label ) { return 0; }
|
||||
void CBaseAnimating :: ResetSequenceInfo ( ) { }
|
||||
BOOL CBaseAnimating :: GetSequenceFlags( ) { return FALSE; }
|
||||
void CBaseAnimating :: DispatchAnimEvents ( float flInterval ) { }
|
||||
float CBaseAnimating :: SetBoneController ( int iController, float flValue ) { return 0.0; }
|
||||
void CBaseAnimating :: InitBoneControllers ( void ) { }
|
||||
float CBaseAnimating :: SetBlending ( int iBlender, float flValue ) { return 0; }
|
||||
void CBaseAnimating :: GetBonePosition ( int iBone, Vector &origin, Vector &angles ) { }
|
||||
void CBaseAnimating :: GetAttachment ( int iAttachment, Vector &origin, Vector &angles ) { }
|
||||
int CBaseAnimating :: FindTransition( int iEndingSequence, int iGoalSequence, int *piDir ) { return -1; }
|
||||
void CBaseAnimating :: GetAutomovement( Vector &origin, Vector &angles, float flInterval ) { }
|
||||
void CBaseAnimating :: SetBodygroup( int iGroup, int iValue ) { }
|
||||
int CBaseAnimating :: GetBodygroup( int iGroup ) { return 0; }
|
||||
void CBaseEntity::TraceAttack(entvars_t *pevAttacker, float flDamage, const Vector &vecDir, TraceResult *ptr, int bitsDamageType) { }
|
||||
void CBaseEntity::FireBullets(ULONG cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker ) { }
|
||||
void CBaseEntity :: TraceBleed( float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType ) { }
|
||||
void CBaseMonster :: MakeDamageBloodDecal ( int cCount, float flNoise, TraceResult *ptr, const Vector &vecDir ) { }
|
||||
void CBaseMonster::ReportAIState( void ) { }
|
||||
void CBaseMonster :: KeyValue( KeyValueData *pkvd ) { }
|
||||
BOOL CBaseMonster :: FCheckAITrigger ( void ) { return FALSE; }
|
||||
void CBaseMonster::CorpseFallThink( void ) { }
|
||||
void CBaseMonster :: MonsterInitDead( void ) { }
|
||||
void CBaseMonster :: TraceAttack(entvars_t *pevAttacker, float flDamage, const Vector &vecDir, TraceResult *ptr, int bitsDamageType) { }
|
||||
BOOL CBaseMonster :: ShouldFadeOnDeath( void ) { return FALSE; }
|
||||
void CBaseMonster :: RadiusDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType ) { }
|
||||
void CBaseMonster :: RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType ) { }
|
||||
void CBaseMonster::FadeMonster( void ) { }
|
||||
void CBaseMonster :: GibMonster( void ) { }
|
||||
BOOL CBaseMonster :: HasHumanGibs( void ) { return FALSE; }
|
||||
BOOL CBaseMonster :: HasAlienGibs( void ) { return FALSE; }
|
||||
Activity CBaseMonster :: GetDeathActivity ( void ) { return ACT_DIE_HEADSHOT; }
|
||||
void CBaseMonster::BecomeDead( void ) {}
|
||||
void CBaseMonster :: Killed( entvars_t *pevAttacker, int iGib ) {}
|
||||
int CBaseMonster :: TakeHealth (float flHealth, int bitsDamageType) { return 0; }
|
||||
int CBaseMonster :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ) { return 0; }
|
||||
|
||||
int TrainSpeed(int iSpeed, int iMax) { return 0; }
|
||||
void CBasePlayer :: DeathSound( void ) { }
|
||||
int CBasePlayer :: TakeHealth( float flHealth, int bitsDamageType ) { return 0; }
|
||||
void CBasePlayer :: TraceAttack(entvars_t *pevAttacker, float flDamage, const Vector &vecDir, TraceResult *ptr, int bitsDamageType) { }
|
||||
int CBasePlayer :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ) { return 0; }
|
||||
void CBasePlayer::RemoveAllItems( BOOL removeSuit ) { }
|
||||
void CBasePlayer::SetAnimation( PLAYER_ANIM playerAnim ) { }
|
||||
void CBasePlayer::WaterMove() { }
|
||||
BOOL CBasePlayer::IsOnLadder( void ) { return FALSE; }
|
||||
void CBasePlayer::PlayerDeathThink(void) { }
|
||||
void CBasePlayer::StartDeathCam( void ) { }
|
||||
void CBasePlayer::PlayerUse ( void ) { }
|
||||
void CBasePlayer::Jump() { }
|
||||
void CBasePlayer::Duck( ) { }
|
||||
int CBasePlayer::Classify ( void ) { return 0; }
|
||||
void CBasePlayer::PreThink(void) { }
|
||||
void CBasePlayer::CheckTimeBasedDamage() { }
|
||||
void CBasePlayer :: UpdateGeigerCounter( void ) { }
|
||||
void CBasePlayer::CheckSuitUpdate() { }
|
||||
void CBasePlayer::SetSuitUpdate(const char *name, int fgroup, int iNoRepeatTime) { }
|
||||
void CBasePlayer :: UpdatePlayerSound ( void ) { }
|
||||
void CBasePlayer::PostThink() { }
|
||||
void CBasePlayer :: Precache( void ) { }
|
||||
int CBasePlayer::Save( CSave &save ) { return 0; }
|
||||
void CBasePlayer::RenewItems(void) { }
|
||||
int CBasePlayer::Restore( CRestore &restore ) { return 0; }
|
||||
void CBasePlayer::SelectNextItem( int iItem ) { }
|
||||
BOOL CBasePlayer::HasWeapons( void ) { return FALSE; }
|
||||
void CBasePlayer::SelectPrevItem( int iItem ) { }
|
||||
CBaseEntity *FindEntityForward( CBaseEntity *pMe ) { return NULL; }
|
||||
BOOL CBasePlayer :: FlashlightIsOn( void ) { return FALSE; }
|
||||
void CBasePlayer :: FlashlightTurnOn( void ) { }
|
||||
void CBasePlayer :: FlashlightTurnOff( void ) { }
|
||||
void CBasePlayer :: ForceClientDllUpdate( void ) { }
|
||||
void CBasePlayer::ImpulseCommands( ) { }
|
||||
void CBasePlayer::CheatImpulseCommands( int iImpulse ) { }
|
||||
int CBasePlayer::AddPlayerItem( CBasePlayerItem *pItem ) { return FALSE; }
|
||||
int CBasePlayer::RemovePlayerItem( CBasePlayerItem *pItem ) { return FALSE; }
|
||||
void CBasePlayer::ItemPreFrame() { }
|
||||
void CBasePlayer::ItemPostFrame() { }
|
||||
int CBasePlayer::AmmoInventory( int iAmmoIndex ) { return -1; }
|
||||
int CBasePlayer::GetAmmoIndex(const char *psz) { return -1; }
|
||||
void CBasePlayer::SendAmmoUpdate(void) { }
|
||||
void CBasePlayer :: UpdateClientData( void ) { }
|
||||
BOOL CBasePlayer :: FBecomeProne ( void ) { return TRUE; }
|
||||
void CBasePlayer :: BarnacleVictimBitten ( entvars_t *pevBarnacle ) { }
|
||||
void CBasePlayer :: BarnacleVictimReleased ( void ) { }
|
||||
int CBasePlayer :: Illumination( void ) { return 0; }
|
||||
void CBasePlayer :: EnableControl(BOOL fControl) { }
|
||||
Vector CBasePlayer :: GetAutoaimVector( float flDelta ) { return g_vecZero; }
|
||||
Vector CBasePlayer :: AutoaimDeflection( Vector &vecSrc, float flDist, float flDelta ) { return g_vecZero; }
|
||||
void CBasePlayer :: ResetAutoaim( ) { }
|
||||
void CBasePlayer :: SetCustomDecalFrames( int nFrames ) { }
|
||||
int CBasePlayer :: GetCustomDecalFrames( void ) { return -1; }
|
||||
void CBasePlayer::DropPlayerItem ( const char *pszItemName ) { }
|
||||
BOOL CBasePlayer::HasPlayerItem( CBasePlayerItem *pCheckItem ) { return FALSE; }
|
||||
BOOL CBasePlayer :: SwitchWeapon( CBasePlayerItem *pWeapon ) { return FALSE; }
|
||||
const char *CBasePlayer::TeamID( void ) { return ""; }
|
||||
int CBasePlayer :: GiveAmmo( int iCount, char *szName, int iMax ) { return 0; }
|
||||
void CBasePlayer::AddPoints( int score, BOOL bAllowNegativeScore ) { }
|
||||
void CBasePlayer::AddPointsToTeam( int score, BOOL bAllowNegativeScore ) { }
|
||||
|
||||
// CS16 START
|
||||
void CBasePlayer::Restart( ) { }
|
||||
void CBasePlayer::ResetMaxSpeed() { }
|
||||
void CBasePlayer::RoundRespawn() { }
|
||||
void CBasePlayer::Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha) { }
|
||||
void CBasePlayer::SetProgressBarTime( int iTime ) { }
|
||||
void CBasePlayer::SetBombIcon( int ) { }
|
||||
void CBasePlayer::UpdateShieldCrosshair(bool bShieldDrawn) { }
|
||||
void CBasePlayer::Radio(const char *msg_id, const char *msg_verbose, int pitch, bool showIcon) { }
|
||||
|
||||
void RadiusFlash(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage) { }
|
||||
void UTIL_TraceHull(const Vector &vecStart, const Vector &vecEnd, IGNORE_MONSTERS igmon, int hullNumber, edict_t *pentIgnore, TraceResult *ptr) { }
|
||||
float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int iBulletType) { return 0.0f; }
|
||||
void UTIL_ScreenShake(const Vector ¢er, float amplitude, float frequency, float duration, float radius) { }
|
||||
void UTIL_Bubbles(Vector mins, Vector maxs, int count) { }
|
||||
void RemoveEntityHashValue(entvars_s *pev, const char *value, hash_types_e fieldType) { }
|
||||
void AddEntityHashValue(entvars_s *pev, const char *value, hash_types_e fieldType) { }
|
||||
int UTIL_PointContents(const Vector &vec) { return 0; }
|
||||
void UTIL_EmitAmbientSound(edict_t *entity, const Vector &vecOrigin, const char *samp, float vol, float attenuation, int fFlags, int pitch) { }
|
||||
|
||||
CGrenade *CGrenade::ShootSatchelCharge(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity) { return 0; }
|
||||
CGrenade *CGrenade::ShootTimed(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time) { return 0; }
|
||||
CGrenade *CGrenade::ShootTimed2(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, int iTeam, unsigned short usEvent) { return 0; }
|
||||
CGrenade *CGrenade::ShootSmokeGrenade(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, unsigned short usEvent) { return 0; }
|
||||
|
||||
void CBasePlayerWeapon::RetireWeapon() {}
|
||||
|
||||
// CS16 END
|
||||
|
||||
void ClearMultiDamage(void) { }
|
||||
void ApplyMultiDamage(entvars_t *pevInflictor, entvars_t *pevAttacker ) { }
|
||||
void AddMultiDamage( entvars_t *pevInflictor, CBaseEntity *pEntity, float flDamage, int bitsDamageType) { }
|
||||
void SpawnBlood(Vector vecSpot, int bloodColor, float flDamage) { }
|
||||
int DamageDecal( CBaseEntity *pEntity, int bitsDamageType ) { return 0; }
|
||||
void DecalGunshot( TraceResult *pTrace, int iBulletType ) { }
|
||||
void DecalGunshot( TraceResult *pTrace, int iBulletType, bool ClientOnly, entvars_t *pShooter, bool bHitMetal ) { }
|
||||
void EjectBrass ( const Vector &vecOrigin, const Vector &vecVelocity, float rotation, int model, int soundtype ) { }
|
||||
void AddAmmoNameToAmmoRegistry( const char *szAmmoname ) { }
|
||||
int CBasePlayerItem::Restore( class CRestore & ) { return 1; }
|
||||
int CBasePlayerItem::Save( class CSave & ) { return 1; }
|
||||
int CBasePlayerWeapon::Restore( class CRestore & ) { return 1; }
|
||||
int CBasePlayerWeapon::Save( class CSave & ) { return 1; }
|
||||
void CBasePlayerItem :: SetObjectCollisionBox( void ) { }
|
||||
void CBasePlayerItem :: FallInit( void ) { }
|
||||
void CBasePlayerItem::FallThink ( void ) { }
|
||||
void CBasePlayerItem::Materialize( void ) { }
|
||||
void CBasePlayerItem::AttemptToMaterialize( void ) { }
|
||||
void CBasePlayerItem :: CheckRespawn ( void ) { }
|
||||
CBaseEntity* CBasePlayerItem::Respawn( void ) { return NULL; }
|
||||
void CBasePlayerItem::DefaultTouch( CBaseEntity *pOther ) { }
|
||||
void CBasePlayerItem::DestroyItem( void ) { }
|
||||
int CBasePlayerItem::AddToPlayer( CBasePlayer *pPlayer ) { return TRUE; }
|
||||
void CBasePlayerItem::Drop( void ) { }
|
||||
void CBasePlayerItem::Kill( void ) { }
|
||||
void CBasePlayerItem::Holster( int skiplocal ) { }
|
||||
void CBasePlayerItem::AttachToPlayer ( CBasePlayer *pPlayer ) { }
|
||||
int CBasePlayerWeapon::AddDuplicate( CBasePlayerItem *pOriginal ) { return 0; }
|
||||
int CBasePlayerWeapon::AddToPlayer( CBasePlayer *pPlayer ) { return FALSE; }
|
||||
int CBasePlayerWeapon::UpdateClientData( CBasePlayer *pPlayer ) { return 0; }
|
||||
BOOL CBasePlayerWeapon :: AddPrimaryAmmo( int iCount, char *szName, int iMaxClip, int iMaxCarry ) { return TRUE; }
|
||||
BOOL CBasePlayerWeapon :: AddSecondaryAmmo( int iCount, char *szName, int iMax ) { return TRUE; }
|
||||
BOOL CBasePlayerWeapon :: IsUseable( void ) { return TRUE; }
|
||||
int CBasePlayerWeapon::PrimaryAmmoIndex( void ) { return -1; }
|
||||
int CBasePlayerWeapon::SecondaryAmmoIndex( void ) { return -1; }
|
||||
void CBasePlayerAmmo::Spawn( void ) { }
|
||||
CBaseEntity* CBasePlayerAmmo::Respawn( void ) { return this; }
|
||||
void CBasePlayerAmmo::Materialize( void ) { }
|
||||
void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther ) { }
|
||||
int CBasePlayerWeapon::ExtractAmmo( CBasePlayerWeapon *pWeapon ) { return 0; }
|
||||
int CBasePlayerWeapon::ExtractClipAmmo( CBasePlayerWeapon *pWeapon ) { return 0; }
|
||||
void CSoundEnt::InsertSound ( int iType, const Vector &vecOrigin, int iVolume, float flDuration ) {}
|
||||
void RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, float flRadius, int iClassIgnore, int bitsDamageType ){}
|
||||
|
|
|
@ -352,7 +352,9 @@ void CBasePlayerWeapon::FireRemaining(int &shotsFired, float &shootTime, BOOL is
|
|||
}
|
||||
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
shotsFired++;
|
||||
|
||||
if (shotsFired == 3)
|
||||
|
@ -383,9 +385,10 @@ bool CBasePlayerWeapon::ShieldSecondaryFire(int up_anim, int down_anim)
|
|||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) ? true : false);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
#endif
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.6;
|
||||
|
@ -504,6 +507,12 @@ void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal )
|
|||
HUD_SendWeaponAnim( iAnim, m_iId, 0, 0 );
|
||||
}
|
||||
|
||||
void CBasePlayerWeapon::RetireWeapon()
|
||||
{
|
||||
// TODO: Implement
|
||||
//UTIL_GetNextBestWeapon( m_pPlayer, this );
|
||||
}
|
||||
|
||||
Vector CBaseEntity::FireBullets3 ( Vector vecSrc, Vector vecDirShooting, float flSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand )
|
||||
{
|
||||
float x, y, z;
|
||||
|
|
|
@ -18,27 +18,27 @@
|
|||
class CBaseMonster : public CBaseToggle
|
||||
{
|
||||
public:
|
||||
virtual void KeyValue(KeyValueData *pkvd);
|
||||
virtual float ChangeYaw(int speed);
|
||||
virtual BOOL HasHumanGibs(void);
|
||||
virtual BOOL HasAlienGibs(void);
|
||||
virtual void FadeMonster(void);
|
||||
virtual void GibMonster(void);
|
||||
virtual Activity GetDeathActivity(void);
|
||||
virtual void BecomeDead(void);
|
||||
virtual BOOL ShouldFadeOnDeath(void);
|
||||
virtual int IRelationship(CBaseEntity *pTarget);
|
||||
virtual int TakeHealth(float flHealth, int bitsDamageType);
|
||||
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||
virtual void Killed(entvars_t *pevAttacker, int iGib);
|
||||
virtual void KeyValue(KeyValueData *pkvd) { }
|
||||
virtual float ChangeYaw(int speed) { return 0; }
|
||||
virtual BOOL HasHumanGibs(void) { return FALSE; }
|
||||
virtual BOOL HasAlienGibs(void) { return FALSE; }
|
||||
virtual void FadeMonster(void) { }
|
||||
virtual void GibMonster(void) { }
|
||||
virtual Activity GetDeathActivity(void) { return ACT_DIE_HEADSHOT; }
|
||||
virtual void BecomeDead(void) { }
|
||||
virtual BOOL ShouldFadeOnDeath(void) { return FALSE; }
|
||||
virtual int IRelationship(CBaseEntity *pTarget) { return 0; }
|
||||
virtual int TakeHealth(float flHealth, int bitsDamageType) { return 0; }
|
||||
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return 0; }
|
||||
virtual void Killed(entvars_t *pevAttacker, int iGib) { }
|
||||
virtual void PainSound(void) { return; }
|
||||
virtual void ResetMaxSpeed(void) {};
|
||||
virtual void ReportAIState(void);
|
||||
virtual void MonsterInitDead(void);
|
||||
virtual void Look(int iDistance);
|
||||
virtual CBaseEntity *BestVisibleEnemy(void);
|
||||
virtual BOOL FInViewCone(CBaseEntity *pEntity);
|
||||
virtual BOOL FInViewCone(Vector *pOrigin);
|
||||
virtual void ResetMaxSpeed(void) {}
|
||||
virtual void ReportAIState(void) { }
|
||||
virtual void MonsterInitDead(void) { }
|
||||
virtual void Look(int iDistance) { }
|
||||
virtual CBaseEntity *BestVisibleEnemy(void) { return NULL; }
|
||||
virtual BOOL FInViewCone(CBaseEntity *pEntity) { return FALSE; }
|
||||
virtual BOOL FInViewCone(Vector *pOrigin) { return FALSE; }
|
||||
virtual int BloodColor(void) { return m_bloodColor; }
|
||||
virtual BOOL IsAlive(void) { return (pev->deadflag != DEAD_DEAD); }
|
||||
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
void RadiusDamage(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int iClassIgnore, int bitsDamageType);
|
||||
void EXPORT CorpseFallThink(void);
|
||||
CBaseEntity *CheckTraceHullAttack(float flDist, int iDamage, int iDmgType);
|
||||
void TraceAttack(entvars_t *pevAttacker, float flDamage, const Vector &vecDir, TraceResult *ptr, int bitsDamageType);
|
||||
void TraceAttack(entvars_t *pevAttacker, float flDamage, const Vector &vecDir, TraceResult *ptr, int bitsDamageType) {}
|
||||
void MakeDamageBloodDecal(int cCount, float flNoise, TraceResult *ptr, const Vector &vecDir);
|
||||
void BloodSplat(const Vector &vecPos, const Vector &vecDir, int hitgroup, int iDamage);
|
||||
|
||||
|
@ -87,4 +87,4 @@ public:
|
|||
Vector m_HackedGunPos;
|
||||
Vector m_vecEnemyLKP;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
92
dlls/cbase.h
92
dlls/cbase.h
|
@ -71,6 +71,10 @@ void AddEntityHashValue(struct entvars_s *pev, const char *value, hash_types_e f
|
|||
void RemoveEntityHashValue(struct entvars_s *pev, const char *value, hash_types_e fieldType);
|
||||
void printEntities(void);
|
||||
void loopPerformance(void);
|
||||
#ifdef CLIENT_DLL
|
||||
void Broadcast( const char*, int );
|
||||
#endif
|
||||
|
||||
|
||||
extern int DispatchSpawn(edict_t *pent);
|
||||
extern void DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd);
|
||||
|
@ -150,19 +154,19 @@ public:
|
|||
virtual void Precache(void) {}
|
||||
virtual void Restart(void) {}
|
||||
virtual void KeyValue(KeyValueData *pkvd) { pkvd->fHandled = FALSE; }
|
||||
virtual int Save(CSave &save);
|
||||
virtual int Restore(CRestore &restore);
|
||||
virtual int Save(CSave &save) { return 1; }
|
||||
virtual int Restore(CRestore &restore) { return 1; }
|
||||
virtual int ObjectCaps(void) { return FCAP_ACROSS_TRANSITION; }
|
||||
virtual void Activate(void) {}
|
||||
virtual void SetObjectCollisionBox(void);
|
||||
virtual void SetObjectCollisionBox(void) {}
|
||||
virtual int Classify(void) { return CLASS_NONE; }
|
||||
virtual void DeathNotice(entvars_t *pevChild) {}
|
||||
virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, const Vector &vecDir, TraceResult *ptr, int bitsDamageType);
|
||||
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||
virtual int TakeHealth(float flHealth, int bitsDamageType);
|
||||
virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, const Vector &vecDir, TraceResult *ptr, int bitsDamageType) { }
|
||||
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return 1; }
|
||||
virtual int TakeHealth(float flHealth, int bitsDamageType) { return 1; }
|
||||
virtual void Killed(entvars_t *pevAttacker, int iGib);
|
||||
virtual int BloodColor(void) { return DONT_BLEED; }
|
||||
virtual void TraceBleed(float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType);
|
||||
virtual void TraceBleed(float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType) { }
|
||||
virtual BOOL IsTriggered(CBaseEntity *pActivator) { return TRUE; }
|
||||
virtual CBaseMonster *MyMonsterPointer(void) { return NULL; }
|
||||
virtual CSquadMonster *MySquadMonsterPointer(void) { return NULL; }
|
||||
|
@ -175,7 +179,7 @@ public:
|
|||
virtual float GetDelay(void) { return 0; }
|
||||
virtual int IsMoving(void) { return pev->velocity != g_vecZero; }
|
||||
virtual void OverrideReset(void) {}
|
||||
virtual int DamageDecal(int bitsDamageType);
|
||||
virtual int DamageDecal(int bitsDamageType) { return -1; }
|
||||
virtual void SetToggleState(int state) {}
|
||||
virtual void StartSneaking(void) {}
|
||||
virtual void StopSneaking(void) {}
|
||||
|
@ -185,11 +189,11 @@ public:
|
|||
virtual BOOL IsBSPModel(void) { return pev->solid == SOLID_BSP || pev->movetype == MOVETYPE_PUSHSTEP; }
|
||||
virtual BOOL ReflectGauss(void) { return IsBSPModel() && !pev->takedamage; }
|
||||
virtual BOOL HasTarget(string_t targetname) { return FStrEq(STRING(targetname), STRING(pev->targetname)); }
|
||||
virtual BOOL IsInWorld(void);
|
||||
virtual BOOL IsInWorld(void) { return TRUE; }
|
||||
virtual BOOL IsPlayer(void) { return FALSE; }
|
||||
virtual BOOL IsNetClient(void) { return FALSE; }
|
||||
virtual const char *TeamID(void) { return ""; }
|
||||
virtual CBaseEntity *GetNextTarget(void);
|
||||
virtual CBaseEntity *GetNextTarget(void) { return 0; }
|
||||
virtual void Think(void) { if (m_pfnThink) (this->*m_pfnThink)(); }
|
||||
virtual void Touch(CBaseEntity *pOther) { if (m_pfnTouch) (this->*m_pfnTouch)(pOther); }
|
||||
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { if (m_pfnUse) (this->*m_pfnUse)(pActivator, pCaller, useType, value); }
|
||||
|
@ -202,11 +206,11 @@ public:
|
|||
virtual Vector EarPosition(void) { return pev->origin + pev->view_ofs; }
|
||||
virtual Vector BodyTarget(const Vector &posSrc) { return Center(); }
|
||||
virtual int Illumination(void) { return GETENTITYILLUM(ENT(pev)); }
|
||||
virtual BOOL FVisible(CBaseEntity *pEntity);
|
||||
virtual BOOL FVisible(const Vector &vecOrigin);
|
||||
virtual BOOL FVisible(CBaseEntity *pEntity) { return FALSE; }
|
||||
virtual BOOL FVisible(const Vector &vecOrigin) { return FALSE; }
|
||||
|
||||
public:
|
||||
void EXPORT SUB_Remove(void);
|
||||
void EXPORT SUB_Remove(void) { }
|
||||
void EXPORT SUB_DoNothing(void);
|
||||
void EXPORT SUB_StartFadeOut(void);
|
||||
void EXPORT SUB_FadeOut(void);
|
||||
|
@ -215,12 +219,12 @@ public:
|
|||
|
||||
public:
|
||||
void UpdateOnRemove(void);
|
||||
int ShouldToggle(USE_TYPE useType, BOOL currentState);
|
||||
int ShouldToggle(USE_TYPE useType, BOOL currentState) { return 0; }
|
||||
void FireBullets(ULONG cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread, float flDistance, int iBulletType, int iTracerFreq = 4, int iDamage = 0, entvars_t *pevAttacker = NULL);
|
||||
Vector FireBullets3(Vector vecSrc, Vector vecDirShooting, float flSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand = 0);
|
||||
int Intersects(CBaseEntity *pOther);
|
||||
void MakeDormant(void);
|
||||
int IsDormant(void);
|
||||
int Intersects(CBaseEntity *pOther) { return 0; }
|
||||
void MakeDormant(void) { }
|
||||
int IsDormant(void) { return 0; }
|
||||
BOOL IsLockedByMaster(void) { return FALSE; }
|
||||
|
||||
public:
|
||||
|
@ -248,7 +252,7 @@ public:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if defined(_DEBUG) && !defined(CLIENT_DLL)
|
||||
void FunctionCheck(void *pFunction, const char *name)
|
||||
{
|
||||
if (pFunction && !NAME_FOR_FUNCTION((unsigned long)(pFunction)))
|
||||
|
@ -292,7 +296,7 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
static CBaseEntity *Create(char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner = NULL);
|
||||
static CBaseEntity *Create(char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner = NULL) { return NULL; }
|
||||
|
||||
edict_t *edict(void) { return ENT(pev); }
|
||||
EOFFSET eoffset(void) { return OFFSET(pev); }
|
||||
|
@ -344,7 +348,7 @@ public:
|
|||
bool has_disconnected;
|
||||
};
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if defined(_DEBUG) && !defined(CLIENT_DLL)
|
||||
#define SetThink(a) ThinkSet(static_cast <void (CBaseEntity::*)(void)>(a), (char*)#a)
|
||||
#define SetTouch(a) TouchSet(static_cast <void (CBaseEntity::*)(CBaseEntity *)>(a), #a)
|
||||
#define SetUse(a) UseSet(static_cast <void (CBaseEntity::*)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)>(a), #a)
|
||||
|
@ -410,9 +414,9 @@ public:
|
|||
class CBaseDelay : public CBaseEntity
|
||||
{
|
||||
public:
|
||||
void KeyValue(KeyValueData *pkvd);
|
||||
int Save(CSave &save);
|
||||
int Restore(CRestore &restore);
|
||||
void KeyValue(KeyValueData *pkvd) { }
|
||||
int Save(CSave &save) { return 1; }
|
||||
int Restore(CRestore &restore) { return 1; }
|
||||
|
||||
public:
|
||||
void SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value);
|
||||
|
@ -431,29 +435,29 @@ public:
|
|||
class CBaseAnimating : public CBaseDelay
|
||||
{
|
||||
public:
|
||||
virtual int Save(CSave &save);
|
||||
virtual int Restore(CRestore &restore);
|
||||
virtual int Save(CSave &save) { return 1; }
|
||||
virtual int Restore(CRestore &restore) { return 1; }
|
||||
virtual void HandleAnimEvent(MonsterEvent_t *pEvent) {}
|
||||
|
||||
public:
|
||||
float StudioFrameAdvance(float flInterval = 0);
|
||||
int GetSequenceFlags(void);
|
||||
int LookupActivity(int activity);
|
||||
int LookupActivityHeaviest(int activity);
|
||||
int LookupSequence(const char *label);
|
||||
void ResetSequenceInfo(void);
|
||||
void DispatchAnimEvents(float flFutureInterval = 0.1);
|
||||
float SetBoneController(int iController, float flValue);
|
||||
void InitBoneControllers(void);
|
||||
float SetBlending(int iBlender, float flValue);
|
||||
void GetBonePosition(int iBone, Vector &origin, Vector &angles);
|
||||
void GetAutomovement(Vector &origin, Vector &angles, float flInterval = 0.1);
|
||||
int FindTransition(int iEndingSequence, int iGoalSequence, int *piDir);
|
||||
void GetAttachment(int iAttachment, Vector &origin, Vector &angles);
|
||||
void SetBodygroup(int iGroup, int iValue);
|
||||
int GetBodygroup(int iGroup);
|
||||
int ExtractBbox(int sequence, float *mins, float *maxs);
|
||||
void SetSequenceBox(void);
|
||||
int LookupActivity(int activity) { return 0; }
|
||||
int LookupActivityHeaviest(int activity) { return 0; }
|
||||
int LookupSequence(const char *label) { return 0; }
|
||||
void ResetSequenceInfo(void) { }
|
||||
void DispatchAnimEvents(float flFutureInterval = 0.1) { }
|
||||
float SetBoneController(int iController, float flValue) { return 0; }
|
||||
void InitBoneControllers(void) { }
|
||||
float SetBlending(int iBlender, float flValue) { return 0; }
|
||||
void GetBonePosition(int iBone, Vector &origin, Vector &angles) { }
|
||||
void GetAutomovement(Vector &origin, Vector &angles, float flInterval = 0.1) { }
|
||||
int FindTransition(int iEndingSequence, int iGoalSequence, int *piDir) { return -1; }
|
||||
void GetAttachment(int iAttachment, Vector &origin, Vector &angles) { }
|
||||
void SetBodygroup(int iGroup, int iValue) {}
|
||||
int GetBodygroup(int iGroup) { return 0; }
|
||||
int ExtractBbox(int sequence, float *mins, float *maxs) { return 0; }
|
||||
void SetSequenceBox(void) { }
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION m_SaveData[];
|
||||
|
@ -471,9 +475,9 @@ public:
|
|||
class CBaseToggle : public CBaseAnimating
|
||||
{
|
||||
public:
|
||||
void KeyValue(KeyValueData *pkvd);
|
||||
int Save(CSave &save);
|
||||
int Restore(CRestore &restore);
|
||||
void KeyValue(KeyValueData *pkvd) { }
|
||||
int Save(CSave &save) { return 1; }
|
||||
int Restore(CRestore &restore) { return 1; }
|
||||
int GetToggleState(void) { return m_toggle_state; }
|
||||
float GetDelay(void) { return m_flWait; }
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
};
|
||||
|
||||
extern char *GetTeam(int teamNo);
|
||||
extern void Broadcast(const char *sentence);
|
||||
extern void Broadcast(const char *sentence, int pitch = 100 );
|
||||
extern CGameRules *InstallGameRules(void);
|
||||
|
||||
class CHalfLifeRules : public CGameRules
|
||||
|
@ -394,4 +394,4 @@ public:
|
|||
BOOL m_bShouldRestart;
|
||||
};
|
||||
|
||||
extern DLL_GLOBAL CHalfLifeMultiplay *g_pGameRules;
|
||||
extern DLL_GLOBAL CHalfLifeMultiplay *g_pGameRules;
|
||||
|
|
|
@ -247,45 +247,45 @@ class CBasePlayer : public CBaseMonster
|
|||
{
|
||||
public:
|
||||
virtual void Spawn(void);
|
||||
virtual void Precache(void);
|
||||
virtual void Restart(void);
|
||||
virtual int Save(CSave &save);
|
||||
virtual int Restore(CRestore &restore);
|
||||
virtual void Precache(void) { }
|
||||
virtual void Restart(void) { }
|
||||
virtual int Save(CSave &save) { return 1; }
|
||||
virtual int Restore(CRestore &restore) { return 1; }
|
||||
virtual int ObjectCaps(void) { return CBaseMonster::ObjectCaps() & ~FCAP_ACROSS_TRANSITION; }
|
||||
virtual int Classify(void);
|
||||
virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, const Vector &vecDir, TraceResult *ptr, int bitsDamageType);
|
||||
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType);
|
||||
virtual int TakeHealth(float flHealth, int bitsDamageType);
|
||||
virtual int Classify(void) { return 0; }
|
||||
virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, const Vector &vecDir, TraceResult *ptr, int bitsDamageType) { }
|
||||
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return 0; }
|
||||
virtual int TakeHealth(float flHealth, int bitsDamageType) { return 0; }
|
||||
virtual void Killed(entvars_t *pevAttacker, int iGib);
|
||||
virtual void AddPoints(int score, BOOL bAllowNegativeScore);
|
||||
virtual void AddPointsToTeam(int score, BOOL bAllowNegativeScore);
|
||||
virtual BOOL AddPlayerItem(CBasePlayerItem *pItem);
|
||||
virtual BOOL RemovePlayerItem(CBasePlayerItem *pItem);
|
||||
virtual int GiveAmmo(int iAmount, char *szName, int iMax);
|
||||
virtual void AddPoints(int score, BOOL bAllowNegativeScore) {}
|
||||
virtual void AddPointsToTeam(int score, BOOL bAllowNegativeScore) {}
|
||||
virtual BOOL AddPlayerItem(CBasePlayerItem *pItem) { return false; }
|
||||
virtual BOOL RemovePlayerItem(CBasePlayerItem *pItem) { return false; }
|
||||
virtual int GiveAmmo(int iAmount, char *szName, int iMax){ return 0; }
|
||||
virtual void StartSneaking(void) { m_tSneaking = gpGlobals->time - 1; }
|
||||
virtual void StopSneaking(void) { m_tSneaking = gpGlobals->time + 30; }
|
||||
virtual BOOL IsSneaking(void) { return m_tSneaking <= gpGlobals->time; }
|
||||
virtual BOOL IsAlive(void) { return pev->deadflag == DEAD_NO && pev->health > 0; }
|
||||
virtual BOOL IsPlayer(void) { return TRUE; }
|
||||
virtual BOOL IsNetClient(void) { return TRUE; }
|
||||
virtual const char *TeamID(void);
|
||||
virtual BOOL FBecomeProne(void);
|
||||
virtual const char *TeamID(void) { return NULL; }
|
||||
virtual BOOL FBecomeProne(void) { return TRUE; }
|
||||
virtual Vector BodyTarget(const Vector &posSrc) { return Center() + pev->view_ofs * RANDOM_FLOAT(0.5, 1.1); }
|
||||
virtual int Illumination(void);
|
||||
virtual int Illumination(void) { return 0; }
|
||||
virtual BOOL ShouldFadeOnDeath(void) { return FALSE; }
|
||||
virtual void ResetMaxSpeed(void);
|
||||
virtual void Jump(void);
|
||||
virtual void Duck(void);
|
||||
virtual void PreThink(void);
|
||||
virtual void PostThink(void);
|
||||
virtual void ResetMaxSpeed(void) { }
|
||||
virtual void Jump(void) { }
|
||||
virtual void Duck(void) { }
|
||||
virtual void PreThink(void) { }
|
||||
virtual void PostThink(void) { }
|
||||
virtual Vector GetGunPosition(void);
|
||||
virtual BOOL IsBot(void) { return FALSE; }
|
||||
virtual void UpdateClientData(void);
|
||||
virtual void ImpulseCommands(void);
|
||||
virtual void RoundRespawn(void);
|
||||
virtual Vector GetAutoaimVector(float flDelta);
|
||||
virtual void Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha);
|
||||
virtual void OnTouchingWeapon(CBasePlayerWeapon *pWeapon) {};
|
||||
virtual void UpdateClientData(void) { }
|
||||
virtual void ImpulseCommands(void) { }
|
||||
virtual void RoundRespawn(void) { }
|
||||
virtual Vector GetAutoaimVector(float flDelta) { return g_vecZero; }
|
||||
virtual void Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha) { }
|
||||
virtual void OnTouchingWeapon(CBasePlayerWeapon *pWeapon) {}
|
||||
|
||||
public:
|
||||
void Pain(int hitgroup, bool hitkevlar);
|
||||
|
|
26
dlls/util.h
26
dlls/util.h
|
@ -70,7 +70,9 @@ typedef int BOOL;
|
|||
#define DECLARE_GLOBAL_METHOD(MethodName) extern void DLLEXPORT MethodName(void)
|
||||
#define GLOBAL_METHOD(funcname) void DLLEXPORT funcname(void)
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef CLIENT_DLL
|
||||
#define LINK_ENTITY_TO_CLASS( x, y )
|
||||
#elif defined(_WIN32)
|
||||
#define LINK_ENTITY_TO_CLASS(mapClassName, DLLClassName) \
|
||||
extern "C" EXPORT void mapClassName(entvars_t *pev); \
|
||||
void mapClassName(entvars_t *pev) { GetClassPtr((DLLClassName *)pev); }
|
||||
|
@ -78,7 +80,7 @@ typedef int BOOL;
|
|||
#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) extern "C" void mapClassName(entvars_t *pev); void mapClassName(entvars_t *pev) { GetClassPtr((DLLClassName *)pev); }
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#if defined(DEBUG) && !defined(CLIENT_DLL)
|
||||
extern edict_t *DBG_EntOfVars(const entvars_t *pev);
|
||||
inline edict_t *ENT(const entvars_t *pev) { return DBG_EntOfVars(pev); }
|
||||
#else
|
||||
|
@ -178,7 +180,11 @@ extern float UTIL_AngleDiff(float destAngle, float srcAngle);
|
|||
extern CBaseEntity *UTIL_FindEntityInSphere(CBaseEntity *pStartEntity, const Vector &vecCenter, float flRadius);
|
||||
extern CBaseEntity *UTIL_FindEntityByString_Old(CBaseEntity *pStartEntity, const char *szKeyword, const char *szValue);
|
||||
extern CBaseEntity *UTIL_FindEntityByString(CBaseEntity *pStartEntity, const char *szKeyword, const char *szValue);
|
||||
#ifndef CLIENT_DLL
|
||||
extern CBaseEntity *UTIL_FindEntityByClassname(CBaseEntity *pStartEntity, const char *szName);
|
||||
#else
|
||||
inline CBaseEntity *UTIL_FindEntityByClassname(CBaseEntity *, const char* ) { return NULL; }
|
||||
#endif
|
||||
extern CBaseEntity *UTIL_FindEntityByTargetname(CBaseEntity *pStartEntity, const char *szName);
|
||||
extern CBaseEntity *UTIL_FindEntityGeneric(const char *szName, Vector &vecSrc, float flRadius);
|
||||
extern CBaseEntity *UTIL_PlayerByIndex(int playerIndex);
|
||||
|
@ -208,7 +214,11 @@ typedef enum { ignore_glass = 1, dont_ignore_glass = 0 } IGNORE_GLASS;
|
|||
extern void UTIL_TraceLine(const Vector &vecStart, const Vector &vecEnd, IGNORE_MONSTERS igmon, edict_t *pentIgnore, TraceResult *ptr);
|
||||
extern void UTIL_TraceLine(const Vector &vecStart, const Vector &vecEnd, IGNORE_MONSTERS igmon, IGNORE_GLASS ignoreGlass, edict_t *pentIgnore, TraceResult *ptr);
|
||||
typedef enum { point_hull = 0, human_hull = 1, large_hull = 2, head_hull = 3 } HULL_TYPE;
|
||||
#ifndef CLIENT_DLL
|
||||
extern void UTIL_TraceHull(const Vector &vecStart, const Vector &vecEnd, IGNORE_MONSTERS igmon, int hullNumber, edict_t *pentIgnore, TraceResult *ptr);
|
||||
#else
|
||||
inline void UTIL_TraceHull(const Vector &vecStart, const Vector &vecEnd, IGNORE_MONSTERS igmon, int hullNumber, edict_t *pentIgnore, TraceResult *ptr) {}
|
||||
#endif
|
||||
extern TraceResult UTIL_GetGlobalTrace(void);
|
||||
extern void UTIL_TraceModel(const Vector &vecStart, const Vector &vecEnd, int hullNumber, edict_t *pentModel, TraceResult *ptr);
|
||||
extern Vector UTIL_GetAimVector(edict_t *pent, float flSpeed);
|
||||
|
@ -251,7 +261,11 @@ class CBasePlayerItem;
|
|||
class CBasePlayer;
|
||||
|
||||
extern BOOL UTIL_GetNextBestWeapon(CBasePlayer *pPlayer, CBasePlayerItem *pCurrentWeapon);
|
||||
#ifndef CLIENT_DLL
|
||||
extern void ClientPrint(entvars_t *client, int msg_dest, const char *msg_name, const char *param1 = NULL, const char *param2 = NULL, const char *param3 = NULL, const char *param4 = NULL);
|
||||
#else
|
||||
inline void ClientPrint(entvars_t *client, int msg_dest, const char *msg_name, const char *param1 = NULL, const char *param2 = NULL, const char *param3 = NULL, const char *param4 = NULL) { }
|
||||
#endif
|
||||
extern void UTIL_SayText(const char *pText, CBaseEntity *pEntity);
|
||||
extern void UTIL_SayTextAll(const char *pText, CBaseEntity *pEntity);
|
||||
|
||||
|
@ -406,7 +420,11 @@ void TEXTURETYPE_Init(void);
|
|||
char TEXTURETYPE_Find(char *name);
|
||||
float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int iBulletType);
|
||||
|
||||
#ifndef CLIENT_WEAPONS
|
||||
void EMIT_SOUND_DYN(edict_t *entity, int channel, const char *sample, float volume, float attenuation, int flags, int pitch);
|
||||
#else
|
||||
inline void EMIT_SOUND_DYN(edict_t *entity, int channel, const char *sample, float volume, float attenuation, int flags, int pitch) { }
|
||||
#endif
|
||||
|
||||
inline void EMIT_SOUND(edict_t *entity, int channel, const char *sample, float volume, float attenuation)
|
||||
{
|
||||
|
@ -455,5 +473,9 @@ void UTIL_UnsetGroupTrace(void);
|
|||
int UTIL_SharedRandomLong(unsigned int seed, int low, int high);
|
||||
float UTIL_SharedRandomFloat(unsigned int seed, float low, float high);
|
||||
|
||||
#ifndef CLIENT_WEAPONS
|
||||
float UTIL_WeaponTimeBase(void);
|
||||
#else
|
||||
inline float UTIL_WeaponTimeBase( void ) { return 0; }
|
||||
#endif
|
||||
#endif // util_h__
|
||||
|
|
|
@ -37,11 +37,19 @@ public:
|
|||
typedef enum { SATCHEL_DETONATE = 0, SATCHEL_RELEASE } SATCHELCODE;
|
||||
|
||||
public:
|
||||
#ifndef CLIENT_DLL
|
||||
static CGrenade *ShootTimed(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time);
|
||||
static CGrenade *ShootTimed2(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, int iTeam, unsigned short usEvent);
|
||||
static CGrenade *ShootContact(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity);
|
||||
static CGrenade *ShootSmokeGrenade(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, unsigned short usEvent);
|
||||
static CGrenade *ShootSatchelCharge(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity);
|
||||
#else
|
||||
static CGrenade *ShootTimed(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time) { return NULL; }
|
||||
static CGrenade *ShootTimed2(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, int iTeam, unsigned short usEvent) { return NULL; }
|
||||
static CGrenade *ShootContact(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity) { return NULL; }
|
||||
static CGrenade *ShootSmokeGrenade(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, unsigned short usEvent) { return NULL; }
|
||||
static CGrenade *ShootSatchelCharge(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity) { return NULL; }
|
||||
#endif
|
||||
static void UseSatchelCharges(entvars_t *pevOwner, SATCHELCODE code);
|
||||
|
||||
public:
|
||||
|
@ -526,10 +534,10 @@ AmmoInfo;
|
|||
class CBasePlayerItem : public CBaseAnimating
|
||||
{
|
||||
public:
|
||||
virtual int Save(CSave &save);
|
||||
virtual int Restore(CRestore &restore);
|
||||
virtual void SetObjectCollisionBox(void);
|
||||
virtual int AddToPlayer(CBasePlayer *pPlayer);
|
||||
virtual int Save(CSave &save) { return 1; }
|
||||
virtual int Restore(CRestore &restore) { return 1; }
|
||||
virtual void SetObjectCollisionBox(void) { }
|
||||
virtual int AddToPlayer(CBasePlayer *pPlayer) { return false; }
|
||||
virtual int AddDuplicate(CBasePlayerItem *pItem) { return FALSE; }
|
||||
virtual int GetItemInfo(ItemInfo *p) { return 0; }
|
||||
virtual BOOL CanDeploy(void) { return TRUE; }
|
||||
|
@ -537,13 +545,13 @@ public:
|
|||
virtual BOOL Deploy(void) { return TRUE; }
|
||||
virtual BOOL IsWeapon(void) { return FALSE; }
|
||||
virtual BOOL CanHolster(void) { return TRUE; }
|
||||
virtual void Holster(int skiplocal = 0);
|
||||
virtual void Holster(int skiplocal = 0) {}
|
||||
virtual void UpdateItemInfo(void) {}
|
||||
virtual void ItemPreFrame(void) {}
|
||||
virtual void ItemPostFrame(void) {}
|
||||
virtual void Drop(void);
|
||||
virtual void Kill(void);
|
||||
virtual void AttachToPlayer(CBasePlayer *pPlayer);
|
||||
virtual void Drop(void) {}
|
||||
virtual void Kill(void) {}
|
||||
virtual void AttachToPlayer(CBasePlayer *pPlayer) {}
|
||||
virtual int PrimaryAmmoIndex(void) { return -1; }
|
||||
virtual int SecondaryAmmoIndex(void) { return -1; }
|
||||
virtual int UpdateClientData(CBasePlayer *pPlayer) { return 0; }
|
||||
|
@ -552,14 +560,14 @@ public:
|
|||
virtual int iItemSlot(void) { return 0; }
|
||||
|
||||
public:
|
||||
void EXPORT DestroyItem(void);
|
||||
void EXPORT DefaultTouch(CBaseEntity *pOther);
|
||||
void EXPORT FallThink(void);
|
||||
void EXPORT Materialize(void);
|
||||
void EXPORT AttemptToMaterialize(void);
|
||||
CBaseEntity *Respawn(void);
|
||||
void FallInit(void);
|
||||
void CheckRespawn(void);
|
||||
void EXPORT DestroyItem(void) {}
|
||||
void EXPORT DefaultTouch(CBaseEntity *pOther) {}
|
||||
void EXPORT FallThink(void) {}
|
||||
void EXPORT Materialize(void) {}
|
||||
void EXPORT AttemptToMaterialize(void) {}
|
||||
CBaseEntity *Respawn(void) { return this; }
|
||||
void FallInit(void) { }
|
||||
void CheckRespawn(void) {}
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION m_SaveData[];
|
||||
|
@ -586,26 +594,26 @@ public:
|
|||
class CBasePlayerWeapon : public CBasePlayerItem
|
||||
{
|
||||
public:
|
||||
virtual int Save(CSave &save);
|
||||
virtual int Restore(CRestore &restore);
|
||||
virtual int AddToPlayer(CBasePlayer *pPlayer);
|
||||
virtual int AddDuplicate(CBasePlayerItem *pItem);
|
||||
virtual int ExtractAmmo(CBasePlayerWeapon *pWeapon);
|
||||
virtual int ExtractClipAmmo(CBasePlayerWeapon *pWeapon);
|
||||
virtual int Save(CSave &save) { return 1; }
|
||||
virtual int Restore(CRestore &restore) { return 1; }
|
||||
virtual int AddToPlayer(CBasePlayer *pPlayer) { return 0; }
|
||||
virtual int AddDuplicate(CBasePlayerItem *pItem) { return 0; }
|
||||
virtual int ExtractAmmo(CBasePlayerWeapon *pWeapon) { return 0; }
|
||||
virtual int ExtractClipAmmo(CBasePlayerWeapon *pWeapon) { return 0; }
|
||||
virtual int AddWeapon(void) { ExtractAmmo(this); return TRUE; }
|
||||
virtual void UpdateItemInfo(void) {};
|
||||
virtual void UpdateItemInfo(void) {}
|
||||
virtual BOOL PlayEmptySound(void);
|
||||
virtual void ResetEmptySound(void);
|
||||
virtual void SendWeaponAnim(int iAnim, int skiplocal = 0);
|
||||
virtual BOOL CanDeploy(void);
|
||||
virtual BOOL IsWeapon(void) { return TRUE; }
|
||||
virtual BOOL IsUseable(void);
|
||||
virtual BOOL IsUseable(void) { return true; }
|
||||
virtual void ItemPostFrame(void);
|
||||
virtual void PrimaryAttack(void) {}
|
||||
virtual void SecondaryAttack(void) {}
|
||||
virtual void Reload(void) {}
|
||||
virtual void WeaponIdle(void) {}
|
||||
virtual int UpdateClientData(CBasePlayer *pPlayer);
|
||||
virtual int UpdateClientData(CBasePlayer *pPlayer) { return 0; }
|
||||
virtual void RetireWeapon(void);
|
||||
virtual BOOL ShouldWeaponIdle(void) { return FALSE; }
|
||||
virtual void Holster(int skiplocal = 0);
|
||||
|
@ -616,10 +624,10 @@ public:
|
|||
BOOL DefaultDeploy(const char *szViewModel, const char *szWeaponModel, int iAnim, const char *szAnimExt, int skiplocal = 0);
|
||||
int DefaultReload(int iClipSize, int iAnim, float fDelay, int body = 0);
|
||||
void ReloadSound(void);
|
||||
BOOL AddPrimaryAmmo(int iCount, char *szName, int iMaxClip, int iMaxCarry);
|
||||
BOOL AddSecondaryAmmo(int iCount, char *szName, int iMaxCarry);
|
||||
int PrimaryAmmoIndex(void);
|
||||
int SecondaryAmmoIndex(void);
|
||||
BOOL AddPrimaryAmmo(int iCount, char *szName, int iMaxClip, int iMaxCarry) { return true; }
|
||||
BOOL AddSecondaryAmmo(int iCount, char *szName, int iMaxCarry) { return true; }
|
||||
int PrimaryAmmoIndex(void) { return -1; }
|
||||
int SecondaryAmmoIndex(void) { return -1; }
|
||||
void EjectBrassLate(void);
|
||||
void KickBack(float up_base, float lateral_base, float up_modifier, float lateral_modifier, float up_max, float lateral_max, int direction_change);
|
||||
void FireRemaining(int &shotsFired, float &shootTime, BOOL isGlock18);
|
||||
|
@ -670,13 +678,13 @@ public:
|
|||
class CBasePlayerAmmo : public CBaseEntity
|
||||
{
|
||||
public:
|
||||
virtual void Spawn(void);
|
||||
virtual void Spawn(void){}
|
||||
virtual BOOL AddAmmo(CBaseEntity *pOther) { return TRUE; }
|
||||
|
||||
public:
|
||||
void EXPORT Materialize(void);
|
||||
void EXPORT DefaultTouch(CBaseEntity *pOther);
|
||||
CBaseEntity *Respawn(void);
|
||||
void EXPORT Materialize(void) { }
|
||||
void EXPORT DefaultTouch(CBaseEntity *pOther) { }
|
||||
CBaseEntity *Respawn(void) { return this; }
|
||||
};
|
||||
|
||||
extern DLL_GLOBAL short g_sModelIndexLaser;
|
||||
|
@ -697,6 +705,7 @@ extern DLL_GLOBAL short g_sModelIndexCTGhost;
|
|||
extern DLL_GLOBAL short g_sModelIndexTGhost;
|
||||
extern DLL_GLOBAL short g_sModelIndexC4Glow;
|
||||
|
||||
#ifndef CLIENT_WEAPONS
|
||||
extern void ClearMultiDamage(void);
|
||||
extern void ApplyMultiDamage(entvars_t *pevInflictor, entvars_t *pevAttacker);
|
||||
extern void AddMultiDamage(entvars_t *pevInflictor, CBaseEntity *pEntity, float flDamage, int bitsDamageType);
|
||||
|
@ -705,7 +714,11 @@ extern void SpawnBlood(Vector vecSpot, int bloodColor, float flDamage);
|
|||
extern int DamageDecal(CBaseEntity *pEntity, int bitsDamageType);
|
||||
extern void RadiusFlash(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage);
|
||||
extern void RadiusDamage(Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, float flRadius, int iClassIgnore, int bitsDamageType);
|
||||
|
||||
#else
|
||||
inline void ClearMultiDamage(void) { }
|
||||
inline void ApplyMultiDamage(entvars_t *pevInflictor, entvars_t *pevAttacker) { }
|
||||
inline void DecalGunshot(TraceResult *pTrace, int iBulletType, bool ClientOnly, entvars_t *pShooter, bool bHitMetal) { }
|
||||
#endif
|
||||
typedef struct
|
||||
{
|
||||
CBaseEntity *pEntity;
|
||||
|
|
|
@ -28,7 +28,7 @@ enum ak47_e
|
|||
AK47_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_ak47, CAK47);
|
||||
LINK_ENTITY_TO_CLASS(weapon_ak47, CAK47)
|
||||
|
||||
void CAK47::Spawn(void)
|
||||
{
|
||||
|
@ -118,8 +118,9 @@ void CAK47::AK47Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
#endif
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
Vector vecSrc = m_pPlayer->GetGunPosition();
|
||||
Vector vecDir = m_pPlayer->FireBullets3(vecSrc, gpGlobals->v_forward, flSpread, 8192, 2, BULLET_PLAYER_762MM, 36, 0.98, m_pPlayer->pev, FALSE, m_pPlayer->random_seed);
|
||||
|
@ -137,9 +138,10 @@ void CAK47::AK47Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.9;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
|
@ -159,7 +161,9 @@ void CAK47::Reload(void)
|
|||
|
||||
if (DefaultReload(AK47_MAX_CLIP, AK47_RELOAD, 2.45))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
|
|
|
@ -28,7 +28,7 @@ enum aug_e
|
|||
AUG_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_aug, CAUG);
|
||||
LINK_ENTITY_TO_CLASS(weapon_aug, CAUG)
|
||||
|
||||
void CAUG::Spawn(void)
|
||||
{
|
||||
|
@ -131,8 +131,9 @@ void CAUG::AUGFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
#endif
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
||||
|
@ -150,9 +151,10 @@ void CAUG::AUGFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireAug, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), FALSE, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.9;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
|
@ -172,8 +174,9 @@ void CAUG::Reload(void)
|
|||
|
||||
if (DefaultReload(AUG_MAX_CLIP, AUG_RELOAD, 3.3))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
#endif
|
||||
if (m_pPlayer->m_iFOV != 90)
|
||||
SecondaryAttack();
|
||||
|
||||
|
@ -193,4 +196,4 @@ void CAUG::WeaponIdle(void)
|
|||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(AUG_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum awp_e
|
|||
AWP_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_awp, CAWP);
|
||||
LINK_ENTITY_TO_CLASS(weapon_awp, CAWP)
|
||||
|
||||
void CAWP::Spawn(void)
|
||||
{
|
||||
|
@ -141,8 +141,9 @@ void CAWP::AWPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
#endif
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_flEjectBrass = gpGlobals->time + 0.55;
|
||||
|
@ -161,9 +162,10 @@ void CAWP::AWPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
PLAYBACK_EVENT_FULL(flags, ENT(m_pPlayer->pev), m_usFireAWP, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.x * 100), FALSE, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
}
|
||||
|
@ -175,8 +177,9 @@ void CAWP::Reload(void)
|
|||
|
||||
if (DefaultReload(AWP_MAX_CLIP, AWP_RELOAD, 2.5))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
#endif
|
||||
if (m_pPlayer->pev->fov != 90)
|
||||
{
|
||||
m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 10;
|
||||
|
|
|
@ -33,7 +33,7 @@ enum c4_e
|
|||
C4_ARM
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_c4, CC4);
|
||||
LINK_ENTITY_TO_CLASS(weapon_c4, CC4)
|
||||
|
||||
void CC4::Spawn(void)
|
||||
{
|
||||
|
@ -152,9 +152,11 @@ void CC4::PrimaryAttack(void)
|
|||
m_bStartedArming = true;
|
||||
m_bBombPlacedAnimation = false;
|
||||
m_fArmedTime = gpGlobals->time + 3;
|
||||
SendWeaponAnim(C4_ARM, UseDecrement() != FALSE);
|
||||
SendWeaponAnim(C4_ARM, UseDecrement() != FALSE);
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
m_pPlayer->SetProgressBarTime(3);
|
||||
#endif
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.3;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT(10, 15);
|
||||
}
|
||||
|
@ -170,10 +172,11 @@ void CC4::PrimaryAttack(void)
|
|||
|
||||
m_bStartedArming = false;
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.5;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
m_pPlayer->SetProgressBarTime(0);
|
||||
m_pPlayer->SetAnimation(PLAYER_HOLDBOMB);
|
||||
|
||||
#endif
|
||||
if (m_bBombPlacedAnimation == true)
|
||||
SendWeaponAnim(C4_DRAW, UseDecrement() != FALSE);
|
||||
else
|
||||
|
@ -190,8 +193,8 @@ void CC4::PrimaryAttack(void)
|
|||
m_fArmedTime = 0;
|
||||
m_pPlayer->m_bHasC4 = false;
|
||||
|
||||
#ifndef CLIENT_WEAPONS
|
||||
Broadcast("BOMBPL");
|
||||
#ifndef CLIENT_WEAPONS
|
||||
|
||||
if (pev->speed != 0 && g_pGameRules)
|
||||
g_pGameRules->m_iC4Timer = (int)pev->speed;
|
||||
|
@ -220,8 +223,10 @@ void CC4::PrimaryAttack(void)
|
|||
EMIT_SOUND(ENT(pev), CHAN_WEAPON, "weapons/c4_plant.wav", VOL_NORM, ATTN_NORM);
|
||||
|
||||
m_pPlayer->pev->body = 0;
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
m_pPlayer->SetBombIcon(FALSE);
|
||||
#endif
|
||||
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
|
||||
|
||||
if (!m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType])
|
||||
|
@ -239,7 +244,9 @@ void CC4::PrimaryAttack(void)
|
|||
{
|
||||
m_bBombPlacedAnimation = true;
|
||||
SendWeaponAnim(C4_DROP, UseDecrement() != FALSE);
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_HOLDBOMB);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -254,9 +261,11 @@ void CC4::WeaponIdle(void)
|
|||
if (m_bStartedArming == true)
|
||||
{
|
||||
m_bStartedArming = false;
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
m_pPlayer->SetProgressBarTime(0);
|
||||
#endif
|
||||
|
||||
if (m_bBombPlacedAnimation == true)
|
||||
SendWeaponAnim(C4_DRAW, UseDecrement() != FALSE);
|
||||
|
|
|
@ -28,7 +28,7 @@ enum deagle_e
|
|||
DEAGLE_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_deagle, CDEAGLE);
|
||||
LINK_ENTITY_TO_CLASS(weapon_deagle, CDEAGLE)
|
||||
|
||||
void CDEAGLE::Spawn(void)
|
||||
{
|
||||
|
@ -143,8 +143,9 @@ void CDEAGLE::DEAGLEFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
SetPlayerShieldAnim();
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
#endif
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
|
@ -164,9 +165,10 @@ void CDEAGLE::DEAGLEFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.8;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
ResetPlayerShieldAnim();
|
||||
|
@ -179,7 +181,9 @@ void CDEAGLE::Reload(void)
|
|||
|
||||
if (DefaultReload(DEAGLE_MAX_CLIP, DEAGLE_RELOAD, 2.2))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.9;
|
||||
}
|
||||
}
|
||||
|
@ -196,4 +200,4 @@ void CDEAGLE::WeaponIdle(void)
|
|||
|
||||
if (m_iWeaponState & WPNSTATE_SHIELD_DRAWN)
|
||||
SendWeaponAnim(SHIELDGUN_DRAWN_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ enum elite_e
|
|||
ELITE_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_elite, CELITE);
|
||||
LINK_ENTITY_TO_CLASS(weapon_elite, CELITE)
|
||||
|
||||
void CELITE::Spawn(void)
|
||||
{
|
||||
|
@ -160,7 +160,9 @@ void CELITE::ELITEFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
if (m_iWeaponState & WPNSTATE_ELITE_LEFT)
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
m_iWeaponState &= ~WPNSTATE_ELITE_LEFT;
|
||||
|
||||
vecDir = FireBullets3(m_pPlayer->GetGunPosition() - gpGlobals->v_right * 5, gpGlobals->v_forward, flSpread, 8192, BULLET_PLAYER_9MM, 1, 36, 0.75, m_pPlayer->pev, TRUE, m_pPlayer->random_seed);
|
||||
|
@ -168,16 +170,19 @@ void CELITE::ELITEFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK2);
|
||||
#endif
|
||||
m_iWeaponState |= WPNSTATE_ELITE_LEFT;
|
||||
|
||||
vecDir = FireBullets3(m_pPlayer->GetGunPosition() - gpGlobals->v_right * 5, gpGlobals->v_forward, flSpread, 8192, BULLET_PLAYER_9MM, 1, 36, 0.75, m_pPlayer->pev, TRUE, m_pPlayer->random_seed);
|
||||
PLAYBACK_EVENT_FULL(flags, ENT(m_pPlayer->pev), m_usFireELITE_RIGHT, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.y * 100), m_iClip, FALSE, FALSE);
|
||||
}
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
}
|
||||
|
@ -189,7 +194,9 @@ void CELITE::Reload(void)
|
|||
|
||||
if (DefaultReload(ELITE_MAX_CLIP, ELITE_RELOAD, 4.5))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.88;
|
||||
}
|
||||
}
|
||||
|
@ -211,4 +218,4 @@ void CELITE::WeaponIdle(void)
|
|||
else
|
||||
SendWeaponAnim(ELITE_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum famas_e
|
|||
FAMAS_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_famas, CFamas);
|
||||
LINK_ENTITY_TO_CLASS(weapon_famas, CFamas)
|
||||
|
||||
void CFamas::Spawn(void)
|
||||
{
|
||||
|
@ -156,8 +156,9 @@ void CFamas::FamasFire(float flSpread, float flCycleTime, BOOL fUseAutoAim, BOOL
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
#endif
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
||||
|
@ -176,9 +177,10 @@ void CFamas::FamasFire(float flSpread, float flCycleTime, BOOL fUseAutoAim, BOOL
|
|||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireFamas, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 10000000), (int)(m_pPlayer->pev->punchangle.y * 10000000), m_iClip != 0, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.1;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
|
@ -205,8 +207,9 @@ void CFamas::Reload(void)
|
|||
|
||||
if (DefaultReload(FAMAS_MAX_CLIP, FAMAS_RELOAD, 3.3))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
|
||||
#endif
|
||||
if (m_pPlayer->m_iFOV != 90)
|
||||
SecondaryAttack();
|
||||
|
||||
|
@ -226,4 +229,4 @@ void CFamas::WeaponIdle(void)
|
|||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(FAMAS_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum fiveseven_e
|
|||
FIVESEVEN_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_fiveseven, CFiveSeven);
|
||||
LINK_ENTITY_TO_CLASS(weapon_fiveseven, CFiveSeven)
|
||||
|
||||
void CFiveSeven::Spawn(void)
|
||||
{
|
||||
|
@ -142,8 +142,9 @@ void CFiveSeven::FiveSevenFire(float flSpread, float flCycleTime, BOOL fUseAutoA
|
|||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
SetPlayerShieldAnim();
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
#endif
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
|
@ -161,9 +162,10 @@ void CFiveSeven::FiveSevenFire(float flSpread, float flCycleTime, BOOL fUseAutoA
|
|||
PLAYBACK_EVENT_FULL(flags, ENT(m_pPlayer->pev), m_usFireFiveSeven, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), m_iClip != 0, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
ResetPlayerShieldAnim();
|
||||
|
@ -176,7 +178,9 @@ void CFiveSeven::Reload(void)
|
|||
|
||||
if (DefaultReload(FIVESEVEN_MAX_CLIP, FIVESEVEN_RELOAD, 2.7))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.92;
|
||||
}
|
||||
}
|
||||
|
@ -204,4 +208,4 @@ void CFiveSeven::WeaponIdle(void)
|
|||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0625;
|
||||
SendWeaponAnim(FIVESEVEN_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ enum flashbang_e
|
|||
FLASHBANG_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_flashbang, CFlashbang);
|
||||
LINK_ENTITY_TO_CLASS(weapon_flashbang, CFlashbang)
|
||||
|
||||
void CFlashbang::Spawn(void)
|
||||
{
|
||||
|
@ -158,9 +158,10 @@ bool CFlashbang::ShieldSecondaryFire(int up_anim, int down_anim)
|
|||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
#endif
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.6;
|
||||
|
@ -182,7 +183,9 @@ void CFlashbang::WeaponIdle(void)
|
|||
|
||||
if (m_flStartThrow)
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->Radio("%!MRAD_FIREINHOLE", "#Fire_in_the_hole");
|
||||
#endif
|
||||
Vector angThrow = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle;
|
||||
|
||||
if (angThrow.x < 0)
|
||||
|
@ -204,7 +207,9 @@ void CFlashbang::WeaponIdle(void)
|
|||
SendWeaponAnim(FLASHBANG_THROW, UseDecrement() != FALSE);
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
m_flStartThrow = 0;
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.75;
|
||||
|
|
|
@ -27,7 +27,7 @@ enum g3sg1_e
|
|||
G3SG1_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_g3sg1, CG3SG1);
|
||||
LINK_ENTITY_TO_CLASS(weapon_g3sg1, CG3SG1)
|
||||
|
||||
void CG3SG1::Spawn(void)
|
||||
{
|
||||
|
@ -136,7 +136,9 @@ void CG3SG1::G3SG1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
|
@ -155,9 +157,10 @@ void CG3SG1::G3SG1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
PLAYBACK_EVENT_FULL(flags, ENT(m_pPlayer->pev), m_usFireG3SG1, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), TRUE, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.8;
|
||||
|
||||
m_pPlayer->pev->punchangle.x -= UTIL_SharedRandomFloat(m_pPlayer->random_seed + 4, 2.75, 3.25) + m_pPlayer->pev->punchangle.x * 0.25;
|
||||
|
@ -172,7 +175,9 @@ void CG3SG1::Reload(void)
|
|||
if (DefaultReload(G3SG1_MAX_CLIP, G3SG1_RELOAD, 3.5))
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
|
||||
if (m_pPlayer->pev->fov != 90)
|
||||
{
|
||||
|
@ -203,4 +208,4 @@ float CG3SG1::GetMaxSpeed(void)
|
|||
return 210;
|
||||
|
||||
return 150;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum galil_e
|
|||
GALIL_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_galil, CGalil);
|
||||
LINK_ENTITY_TO_CLASS(weapon_galil, CGalil)
|
||||
|
||||
void CGalil::Spawn(void)
|
||||
{
|
||||
|
@ -123,7 +123,9 @@ void CGalil::GalilFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
Vector vecSrc = m_pPlayer->GetGunPosition();
|
||||
|
@ -142,9 +144,10 @@ void CGalil::GalilFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.9;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
|
@ -164,7 +167,9 @@ void CGalil::Reload(void)
|
|||
|
||||
if (DefaultReload(GALIL_MAX_CLIP, GALIL_RELOAD, 2.45))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
|
@ -181,4 +186,4 @@ void CGalil::WeaponIdle(void)
|
|||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(GALIL_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ enum glock18_shield_e
|
|||
GLOCK18_SHIELD_DOWN
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_glock18, CGLOCK18);
|
||||
LINK_ENTITY_TO_CLASS(weapon_glock18, CGLOCK18)
|
||||
|
||||
void CGLOCK18::Spawn(void)
|
||||
{
|
||||
|
@ -218,8 +218,10 @@ void CGLOCK18::GLOCK18Fire(float flSpread, float flCycleTime, BOOL fUseBurstMode
|
|||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
SetPlayerShieldAnim();
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
|
@ -238,9 +240,10 @@ void CGLOCK18::GLOCK18Fire(float flSpread, float flCycleTime, BOOL fUseBurstMode
|
|||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireGlock18, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), m_iClip != 0, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.5;
|
||||
|
||||
if (fUseBurstMode != FALSE)
|
||||
|
@ -268,7 +271,9 @@ void CGLOCK18::Reload(void)
|
|||
|
||||
if (DefaultReload(GLOCK18_MAX_CLIP, iAnim, 2.2))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.9;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ enum hegrenade_e
|
|||
HEGRENADE_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_hegrenade, CHEGrenade);
|
||||
LINK_ENTITY_TO_CLASS(weapon_hegrenade, CHEGrenade)
|
||||
|
||||
void CHEGrenade::Spawn(void)
|
||||
{
|
||||
|
@ -164,9 +164,10 @@ bool CHEGrenade::ShieldSecondaryFire(int up_anim, int down_anim)
|
|||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
#endif
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.6;
|
||||
|
@ -188,7 +189,9 @@ void CHEGrenade::WeaponIdle(void)
|
|||
|
||||
if (m_flStartThrow)
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->Radio("%!MRAD_FIREINHOLE", "#Fire_in_the_hole");
|
||||
#endif
|
||||
Vector angThrow = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle;
|
||||
|
||||
if (angThrow.x < 0)
|
||||
|
@ -210,7 +213,9 @@ void CHEGrenade::WeaponIdle(void)
|
|||
SendWeaponAnim(HEGRENADE_THROW, UseDecrement() != FALSE);
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
m_flStartThrow = 0;
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.75;
|
||||
|
@ -258,4 +263,4 @@ void CHEGrenade::WeaponIdle(void)
|
|||
BOOL CHEGrenade::CanDeploy(void)
|
||||
{
|
||||
return m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] != 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define KNIFE_BODYHIT_VOLUME 128
|
||||
#define KNIFE_WALLHIT_VOLUME 512
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_knife, CKnife);
|
||||
LINK_ENTITY_TO_CLASS(weapon_knife, CKnife)
|
||||
|
||||
enum knife_e
|
||||
{
|
||||
|
@ -217,9 +217,10 @@ bool CKnife::ShieldSecondaryFire(int up_anim, int down_anim)
|
|||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
#endif
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.6;
|
||||
|
@ -315,7 +316,9 @@ int CKnife::Swing(int fFirst)
|
|||
else
|
||||
EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/knife_slash2.wav", VOL_NORM, ATTN_NORM, 0, 94);
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -345,7 +348,10 @@ int CKnife::Swing(int fFirst)
|
|||
|
||||
CBaseEntity *pEntity = CBaseEntity::Instance(tr.pHit);
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
ClearMultiDamage();
|
||||
if (pEntity)
|
||||
{
|
||||
|
@ -357,8 +363,9 @@ int CKnife::Swing(int fFirst)
|
|||
ApplyMultiDamage(m_pPlayer->pev, m_pPlayer->pev);
|
||||
|
||||
float flVol = 1;
|
||||
#ifndef CLIENT_DLL
|
||||
int fHitWorld = TRUE;
|
||||
|
||||
#endif
|
||||
if (pEntity)
|
||||
{
|
||||
if (pEntity->Classify() != CLASS_NONE && pEntity->Classify() != CLASS_MACHINE)
|
||||
|
@ -377,15 +384,19 @@ int CKnife::Swing(int fFirst)
|
|||
return TRUE;
|
||||
|
||||
flVol = 0.1;
|
||||
#ifndef CLIENT_DLL
|
||||
fHitWorld = FALSE;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (fHitWorld)
|
||||
{
|
||||
TEXTURETYPE_PlaySound(&tr, vecSrc, vecSrc + (vecEnd - vecSrc) * 2, BULLET_PLAYER_CROWBAR);
|
||||
EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/knife_hitwall1.wav", VOL_NORM, ATTN_NORM, 0, 98 + RANDOM_LONG(0, 3));
|
||||
}
|
||||
#endif
|
||||
|
||||
m_trHit = tr;
|
||||
m_pPlayer->m_iWeaponVolume = flVol * KNIFE_WALLHIT_VOLUME;
|
||||
|
@ -436,21 +447,26 @@ int CKnife::Stab(int fFirst)
|
|||
EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/knife_slash1.wav", VOL_NORM, ATTN_NORM, 0, 94);
|
||||
else
|
||||
EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_WEAPON, "weapons/knife_slash2.wav", VOL_NORM, ATTN_NORM, 0, 94);
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fDidHit = TRUE;
|
||||
SendWeaponAnim(KNIFE_STABHIT, UseDecrement() != FALSE);
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
SendWeaponAnim(KNIFE_STABHIT, UseDecrement() != FALSE);
|
||||
#endif
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.1;
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.1;
|
||||
|
||||
CBaseEntity *pEntity = CBaseEntity::Instance(tr.pHit);
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
float flDamage = 65.0;
|
||||
|
||||
if (pEntity && pEntity->IsPlayer())
|
||||
|
@ -474,8 +490,9 @@ int CKnife::Stab(int fFirst)
|
|||
ApplyMultiDamage(m_pPlayer->pev, m_pPlayer->pev);
|
||||
|
||||
float flVol = 1;
|
||||
#ifndef CLIENT_DLL
|
||||
int fHitWorld = TRUE;
|
||||
|
||||
#endif
|
||||
if (pEntity)
|
||||
{
|
||||
if (pEntity->Classify() != CLASS_NONE && pEntity->Classify() != CLASS_MACHINE)
|
||||
|
@ -487,15 +504,19 @@ int CKnife::Stab(int fFirst)
|
|||
return TRUE;
|
||||
|
||||
flVol = 0.1;
|
||||
#ifndef CLIENT_DLL
|
||||
fHitWorld = FALSE;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (fHitWorld)
|
||||
{
|
||||
TEXTURETYPE_PlaySound(&tr, vecSrc, vecSrc + (vecEnd - vecSrc) * 2, BULLET_PLAYER_CROWBAR);
|
||||
EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/knife_hitwall1.wav", VOL_NORM, ATTN_NORM, 0, 98 + RANDOM_LONG(0, 3));
|
||||
}
|
||||
#endif
|
||||
|
||||
m_trHit = tr;
|
||||
m_pPlayer->m_iWeaponVolume = flVol * KNIFE_WALLHIT_VOLUME;
|
||||
|
@ -505,4 +526,4 @@ int CKnife::Stab(int fFirst)
|
|||
}
|
||||
|
||||
return fDidHit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ enum m249_e
|
|||
M249_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_m249, CM249);
|
||||
LINK_ENTITY_TO_CLASS(weapon_m249, CM249)
|
||||
|
||||
void CM249::Spawn(void)
|
||||
{
|
||||
|
@ -119,7 +119,9 @@ void CM249::M249Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
|
@ -139,9 +141,10 @@ void CM249::M249Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireM249, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), FALSE, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.6;
|
||||
|
||||
if (!FBitSet(m_pPlayer->pev->flags, FL_ONGROUND))
|
||||
|
@ -161,7 +164,9 @@ void CM249::Reload(void)
|
|||
|
||||
if (DefaultReload(M249_MAX_CLIP, M249_RELOAD, 4.7))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.2;
|
||||
m_bDelayFire = false;
|
||||
m_iShotsFired = 0;
|
||||
|
@ -178,4 +183,4 @@ void CM249::WeaponIdle(void)
|
|||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(M249_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ enum m3_e
|
|||
M3_HOLSTER
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_m3, CM3);
|
||||
LINK_ENTITY_TO_CLASS(weapon_m3, CM3)
|
||||
|
||||
void CM3::Spawn(void)
|
||||
{
|
||||
|
@ -107,10 +107,14 @@ void CM3::PrimaryAttack(void)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->FireBullets(9, m_pPlayer->GetGunPosition(), gpGlobals->v_forward, Vector(0.0675, 0.0675, 0), 3000, BULLET_PLAYER_BUCKSHOT, 0);
|
||||
#endif
|
||||
|
||||
int flags;
|
||||
#ifdef CLIENT_WEAPONS
|
||||
|
@ -124,9 +128,10 @@ void CM3::PrimaryAttack(void)
|
|||
if (m_iClip)
|
||||
m_flPumpTime = UTIL_WeaponTimeBase() + 0.5;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
if (m_iClip)
|
||||
m_flPumpTime = UTIL_WeaponTimeBase() + 0.5;
|
||||
|
||||
|
@ -158,7 +163,9 @@ void CM3::Reload(void)
|
|||
|
||||
if (!m_fInSpecialReload)
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
SendWeaponAnim(M3_START_RELOAD, UseDecrement() != FALSE);
|
||||
|
||||
m_fInSpecialReload = 1;
|
||||
|
@ -218,4 +225,4 @@ void CM3::WeaponIdle(void)
|
|||
else
|
||||
SendWeaponAnim(M3_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ enum m4a1_e
|
|||
M4A1_DETACH_SILENCER
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_m4a1, CM4A1);
|
||||
LINK_ENTITY_TO_CLASS(weapon_m4a1, CM4A1)
|
||||
|
||||
void CM4A1::Spawn(void)
|
||||
{
|
||||
|
@ -166,7 +166,9 @@ void CM4A1::M4A1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
}
|
||||
|
||||
m_iClip--;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
|
@ -195,10 +197,10 @@ void CM4A1::M4A1Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireM4A1, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), (m_iWeaponState & WPNSTATE_M4A1_SILENCED) ? true : false, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.5;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
|
@ -225,7 +227,9 @@ void CM4A1::Reload(void)
|
|||
|
||||
if (DefaultReload(M4A1_MAX_CLIP, iAnim, 3.05))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
m_bDelayFire = false;
|
||||
|
@ -246,4 +250,4 @@ void CM4A1::WeaponIdle(void)
|
|||
SendWeaponAnim(M4A1_IDLE, UseDecrement() != FALSE);
|
||||
else
|
||||
SendWeaponAnim(M4A1_UNSIL_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum mac10_e
|
|||
MAC10_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_mac10, CMAC10);
|
||||
LINK_ENTITY_TO_CLASS(weapon_mac10, CMAC10)
|
||||
|
||||
void CMAC10::Spawn(void)
|
||||
{
|
||||
|
@ -115,7 +115,9 @@ void CMAC10::MAC10Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
|
@ -134,10 +136,10 @@ void CMAC10::MAC10Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireMAC10, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), FALSE, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (!FBitSet(m_pPlayer->pev->flags, FL_ONGROUND))
|
||||
|
@ -157,7 +159,9 @@ void CMAC10::Reload(void)
|
|||
|
||||
if (DefaultReload(MAC10_MAX_CLIP, MAC10_RELOAD, 3.15))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
|
@ -173,4 +177,4 @@ void CMAC10::WeaponIdle(void)
|
|||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(MAC10_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum mp5n_e
|
|||
MP5N_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_mp5navy, CMP5N);
|
||||
LINK_ENTITY_TO_CLASS(weapon_mp5navy, CMP5N)
|
||||
|
||||
void CMP5N::Spawn(void)
|
||||
{
|
||||
|
@ -116,7 +116,9 @@ void CMP5N::MP5NFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
Vector vecSrc = m_pPlayer->GetGunPosition();
|
||||
|
@ -134,10 +136,10 @@ void CMP5N::MP5NFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (!FBitSet(m_pPlayer->pev->flags, FL_ONGROUND))
|
||||
|
@ -157,7 +159,9 @@ void CMP5N::Reload(void)
|
|||
|
||||
if (DefaultReload(MP5N_MAX_CLIP, MP5N_RELOAD, 2.63))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
|
@ -173,4 +177,4 @@ void CMP5N::WeaponIdle(void)
|
|||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(MP5N_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ enum p228_shield_e
|
|||
P228_SHIELD_DOWN
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_p228, CP228);
|
||||
LINK_ENTITY_TO_CLASS(weapon_p228, CP228)
|
||||
|
||||
void CP228::Spawn(void)
|
||||
{
|
||||
|
@ -156,8 +156,9 @@ void CP228::P228Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
SetPlayerShieldAnim();
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
|
||||
#endif
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
|
@ -175,10 +176,10 @@ void CP228::P228Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireP228, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), m_iClip != 0, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
ResetPlayerShieldAnim();
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
|
@ -198,7 +199,9 @@ void CP228::Reload(void)
|
|||
|
||||
if (DefaultReload(P228_MAX_CLIP, iAnim, 2.7))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.9;
|
||||
}
|
||||
}
|
||||
|
@ -226,4 +229,4 @@ void CP228::WeaponIdle(void)
|
|||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0625;
|
||||
SendWeaponAnim(P228_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum p90_e
|
|||
P90_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_p90, CP90);
|
||||
LINK_ENTITY_TO_CLASS(weapon_p90, CP90)
|
||||
|
||||
void CP90::Spawn(void)
|
||||
{
|
||||
|
@ -119,7 +119,9 @@ void CP90::P90Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
|
@ -138,10 +140,10 @@ void CP90::P90Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireP90, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), 5, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (!FBitSet(m_pPlayer->pev->flags, FL_ONGROUND))
|
||||
|
@ -161,7 +163,9 @@ void CP90::Reload(void)
|
|||
|
||||
if (DefaultReload(P90_MAX_CLIP, P90_RELOAD, 3.4))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
|
@ -177,4 +181,4 @@ void CP90::WeaponIdle(void)
|
|||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(P90_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ enum scout_e
|
|||
SCOUT_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_scout, CSCOUT);
|
||||
LINK_ENTITY_TO_CLASS(weapon_scout, CSCOUT)
|
||||
|
||||
void CSCOUT::Spawn(void)
|
||||
{
|
||||
|
@ -135,7 +135,9 @@ void CSCOUT::SCOUTFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
|
@ -154,10 +156,10 @@ void CSCOUT::SCOUTFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
PLAYBACK_EVENT_FULL(flags, ENT(m_pPlayer->pev), m_usFireScout, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x * 1000, vecDir.y * 1000, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.x * 100), FALSE, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.8;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
}
|
||||
|
@ -169,7 +171,9 @@ void CSCOUT::Reload(void)
|
|||
|
||||
if (DefaultReload(SCOUT_MAX_CLIP, SCOUT_RELOAD, 2))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
|
||||
if (m_pPlayer->pev->fov != 90)
|
||||
{
|
||||
|
@ -200,4 +204,4 @@ float CSCOUT::GetMaxSpeed(void)
|
|||
return 260;
|
||||
|
||||
return 220;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ enum sg550_e
|
|||
SG550_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_sg550, CSG550);
|
||||
LINK_ENTITY_TO_CLASS(weapon_sg550, CSG550)
|
||||
|
||||
void CSG550::Spawn(void)
|
||||
{
|
||||
|
@ -134,7 +134,9 @@ void CSG550::SG550Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
|
@ -152,10 +154,10 @@ void CSG550::SG550Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
PLAYBACK_EVENT_FULL(flags, ENT(m_pPlayer->pev), m_usFireSG550, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), 5, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.8;
|
||||
|
||||
m_pPlayer->pev->punchangle.x -= UTIL_SharedRandomFloat(m_pPlayer->random_seed + 4, 1.5, 1.75) + m_pPlayer->pev->punchangle.x * 0.25;
|
||||
|
@ -170,7 +172,9 @@ void CSG550::Reload(void)
|
|||
if (DefaultReload(SG550_MAX_CLIP, SG550_RELOAD, 3.35))
|
||||
{
|
||||
m_flAccuracy = 0.2;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
|
||||
if (m_pPlayer->pev->fov != 90)
|
||||
{
|
||||
|
@ -202,4 +206,4 @@ float CSG550::GetMaxSpeed(void)
|
|||
return 210;
|
||||
|
||||
return 150;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum sg552_e
|
|||
SG552_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_sg552, CSG552);
|
||||
LINK_ENTITY_TO_CLASS(weapon_sg552, CSG552)
|
||||
|
||||
void CSG552::Spawn(void)
|
||||
{
|
||||
|
@ -130,7 +130,9 @@ void CSG552::SG552Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
|
||||
|
@ -148,10 +150,10 @@ void CSG552::SG552Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireSG552, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), 5, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (m_pPlayer->pev->velocity.Length2D() > 0)
|
||||
|
@ -171,7 +173,9 @@ void CSG552::Reload(void)
|
|||
|
||||
if (DefaultReload(SG552_MAX_CLIP, SG552_RELOAD, 3))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
|
||||
if (m_pPlayer->m_iFOV != 90)
|
||||
SecondaryAttack();
|
||||
|
@ -200,4 +204,4 @@ float CSG552::GetMaxSpeed(void)
|
|||
return 235;
|
||||
|
||||
return 200;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ enum smokegrenade_e
|
|||
SMOKEGRENADE_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_smokegrenade, CSmokeGrenade);
|
||||
LINK_ENTITY_TO_CLASS(weapon_smokegrenade, CSmokeGrenade)
|
||||
|
||||
void CSmokeGrenade::Spawn(void)
|
||||
{
|
||||
|
@ -158,10 +158,10 @@ bool CSmokeGrenade::ShieldSecondaryFire(int up_anim, int down_anim)
|
|||
m_fMaxSpeed = 180;
|
||||
m_pPlayer->m_bShieldDrawn = true;
|
||||
}
|
||||
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->UpdateShieldCrosshair((m_iWeaponState & WPNSTATE_SHIELD_DRAWN) == 0);
|
||||
m_pPlayer->ResetMaxSpeed();
|
||||
|
||||
#endif
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.4;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.6;
|
||||
|
@ -183,7 +183,9 @@ void CSmokeGrenade::WeaponIdle(void)
|
|||
|
||||
if (m_flStartThrow)
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->Radio("%!MRAD_FIREINHOLE", "#Fire_in_the_hole");
|
||||
#endif
|
||||
Vector angThrow = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle;
|
||||
|
||||
if (angThrow.x < 0)
|
||||
|
@ -205,7 +207,9 @@ void CSmokeGrenade::WeaponIdle(void)
|
|||
SendWeaponAnim(SMOKEGRENADE_THROW, UseDecrement() != FALSE);
|
||||
SetPlayerShieldAnim();
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
m_flStartThrow = 0;
|
||||
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.75;
|
||||
|
@ -266,4 +270,4 @@ void CSmokeGrenade::WeaponIdle(void)
|
|||
BOOL CSmokeGrenade::CanDeploy(void)
|
||||
{
|
||||
return m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] != 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum tmp_e
|
|||
TMP_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_tmp, CTMP);
|
||||
LINK_ENTITY_TO_CLASS(weapon_tmp, CTMP)
|
||||
|
||||
void CTMP::Spawn(void)
|
||||
{
|
||||
|
@ -115,7 +115,9 @@ void CTMP::TMPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
|
||||
|
@ -132,10 +134,10 @@ void CTMP::TMPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireTMP, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), (int)(m_pPlayer->pev->punchangle.y * 100), 5, FALSE);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (!FBitSet(m_pPlayer->pev->flags, FL_ONGROUND))
|
||||
|
@ -155,7 +157,9 @@ void CTMP::Reload(void)
|
|||
|
||||
if (DefaultReload(TMP_MAX_CLIP, TMP_RELOAD, 2.12))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.2;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
|
@ -171,4 +175,4 @@ void CTMP::WeaponIdle(void)
|
|||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(TMP_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum ump45_e
|
|||
UMP45_SHOOT3
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_ump45, CUMP45);
|
||||
LINK_ENTITY_TO_CLASS(weapon_ump45, CUMP45)
|
||||
|
||||
void CUMP45::Spawn(void)
|
||||
{
|
||||
|
@ -115,7 +115,9 @@ void CUMP45::UMP45Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
|
||||
|
@ -135,9 +137,10 @@ void CUMP45::UMP45Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
|
||||
if (!FBitSet(m_pPlayer->pev->flags, FL_ONGROUND))
|
||||
|
@ -157,7 +160,9 @@ void CUMP45::Reload(void)
|
|||
|
||||
if (DefaultReload(UMP45_MAX_CLIP, UMP45_RELOAD, 3.5))
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0;
|
||||
m_iShotsFired = 0;
|
||||
}
|
||||
|
@ -173,4 +178,4 @@ void CUMP45::WeaponIdle(void)
|
|||
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 20;
|
||||
SendWeaponAnim(UMP45_IDLE1, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ enum usp_shield_e
|
|||
USP_SHIELD_DOWN
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_usp, CUSP);
|
||||
LINK_ENTITY_TO_CLASS(weapon_usp, CUSP)
|
||||
|
||||
void CUSP::Spawn(void)
|
||||
{
|
||||
|
@ -203,7 +203,9 @@ void CUSP::USPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
}
|
||||
|
||||
m_iClip--;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
m_pPlayer->m_iWeaponVolume = BIG_EXPLOSION_VOLUME;
|
||||
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
|
||||
|
@ -225,10 +227,10 @@ void CUSP::USPFire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
|
|||
|
||||
PLAYBACK_EVENT_FULL(flags, ENT(m_pPlayer->pev), m_usFireUSP, 0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, (int)(m_pPlayer->pev->punchangle.x * 100), 0, m_iClip != 0, m_iWeaponState & WPNSTATE_USP_SILENCED);
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2;
|
||||
m_pPlayer->pev->punchangle.x -= 2;
|
||||
ResetPlayerShieldAnim();
|
||||
|
@ -250,7 +252,10 @@ void CUSP::Reload(void)
|
|||
|
||||
if (DefaultReload(USP_MAX_CLIP, iAnim, 2.7))
|
||||
{
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
m_flAccuracy = 0.92;
|
||||
}
|
||||
}
|
||||
|
@ -282,4 +287,4 @@ void CUSP::WeaponIdle(void)
|
|||
else
|
||||
SendWeaponAnim(USP_UNSIL_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ enum xm1014_e
|
|||
XM1014_DRAW
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(weapon_xm1014, CXM1014);
|
||||
LINK_ENTITY_TO_CLASS(weapon_xm1014, CXM1014)
|
||||
|
||||
void CXM1014::Spawn(void)
|
||||
{
|
||||
|
@ -103,11 +103,14 @@ void CXM1014::PrimaryAttack(void)
|
|||
|
||||
m_iClip--;
|
||||
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
|
||||
#endif
|
||||
|
||||
UTIL_MakeVectors(m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle);
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->FireBullets(6, m_pPlayer->GetGunPosition(), gpGlobals->v_forward, Vector(0.0725, 0.0725, 0.0), 3048, BULLET_PLAYER_BUCKSHOT, 0);
|
||||
|
||||
#endif
|
||||
int flags;
|
||||
#ifdef CLIENT_WEAPONS
|
||||
flags = FEV_NOTHOST;
|
||||
|
@ -120,9 +123,10 @@ void CXM1014::PrimaryAttack(void)
|
|||
if (m_iClip)
|
||||
m_flPumpTime = UTIL_WeaponTimeBase() + 0.125;
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
|
||||
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
|
||||
|
||||
#endif
|
||||
if (m_iClip)
|
||||
m_flPumpTime = UTIL_WeaponTimeBase() + 0.125;
|
||||
|
||||
|
@ -152,7 +156,9 @@ void CXM1014::Reload(void)
|
|||
|
||||
if (!m_fInSpecialReload)
|
||||
{
|
||||
#ifndef CLIENT_DLL
|
||||
m_pPlayer->SetAnimation(PLAYER_RELOAD);
|
||||
#endif
|
||||
SendWeaponAnim(XM1014_START_RELOAD, UseDecrement() != FALSE);
|
||||
|
||||
m_fInSpecialReload = 1;
|
||||
|
@ -218,4 +224,4 @@ void CXM1014::WeaponIdle(void)
|
|||
else
|
||||
SendWeaponAnim(XM1014_IDLE, UseDecrement() != FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue