本文整理汇总了C++中PLAYBACK_EVENT_FULL函数的典型用法代码示例。如果您正苦于以下问题:C++ PLAYBACK_EVENT_FULL函数的具体用法?C++ PLAYBACK_EVENT_FULL怎么用?C++ PLAYBACK_EVENT_FULL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PLAYBACK_EVENT_FULL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: min
bool AvHBaseBuildable::Regenerate(float inRegenerationAmount, bool inPlaySound)
{
bool theDidHeal = false;
float theMaxHealth = this->mBaseHealth;
if(!this->GetIsBuilt())
{
float theNormalizedBuildPercentage = this->GetNormalizedBuildPercentage();
theMaxHealth = (kBaseHealthPercentage + theNormalizedBuildPercentage*(1.0f - kBaseHealthPercentage))*this->mBaseHealth;
}
// If we aren't at full health, heal health
if(this->pev->health < theMaxHealth)
{
this->pev->health = min(theMaxHealth, this->pev->health + inRegenerationAmount);
this->HealthChanged();
theDidHeal = true;
}
// Play regen event
if(theDidHeal)
{
if(inPlaySound)
{
// Play regeneration event
PLAYBACK_EVENT_FULL(0, this->edict(), gRegenerationEventID, 0, this->pev->origin, (float *)&g_vecZero, 1.0f, 0.0, /*theWeaponIndex*/ 0, 0, 0, 0 );
}
}
return theDidHeal;
}
示例2: PLAYBACK_EVENT_FULL
//=========================================================
void CQuakeRocket::Explode()
{
//We use the angles field to send the rocket velocity.
PLAYBACK_EVENT_FULL( FEV_GLOBAL, edict(), g_sExplosion, 0.0, (float *)&pev->origin, (float *)&pev->velocity, 0.0, 0.0, 0, 0, 0, 0 );
UTIL_Remove( this );
}
示例3: W_FireSuperSpikes
// Nailgun
void CBasePlayer::W_FireSpikes(int iQuadSound)
{
// If we're wielding the Super nailgun and we've got ammo for it, fire Super nails
if(*m_pCurrentAmmo >= 2 && m_iQuakeWeapon == IT_SUPER_NAILGUN)
{
W_FireSuperSpikes(iQuadSound);
return;
}
// Swap to next best weapon if this one just ran out
if(*m_pCurrentAmmo < 1)
{
m_iQuakeWeapon = W_BestWeapon();
W_SetCurrentAmmo();
return;
}
PLAYBACK_EVENT_FULL(FEV_NOTHOST, edict(), m_usSpike, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, iQuadSound, 0, m_iNailOffset > 0.0 ? 1 : 0, 0);
// Fire left then right
if(m_iNailOffset == 2)
m_iNailOffset = -2;
else
m_iNailOffset = 2;
if(gpGlobals->deathmatch != 4)
*m_pCurrentAmmo -= 1;
m_flNextAttack = UTIL_WeaponTimeBase() + 0.1;
// Fire the nail
UTIL_MakeVectors(pev->v_angle);
Vector vecDir = GetAutoaimVector(AUTOAIM_5DEGREES);
CQuakeNail *pNail = CQuakeNail::CreateNail(pev->origin + Vector(0, 0, 10) + (gpGlobals->v_right * m_iNailOffset), vecDir, this);
}
示例4: EMIT_SOUND_DYN
void CFuncVehicle::UpdateSound()
{
if (!pev->noise)
return;
#ifdef REGAMEDLL_FIXES
float flpitch = VEHICLE_STARTPITCH + (Q_abs(pev->speed) * (VEHICLE_MAXPITCH - VEHICLE_STARTPITCH) / VEHICLE_MAXSPEED);
#else
float flpitch = VEHICLE_STARTPITCH + (Q_abs(int(pev->speed)) * (VEHICLE_MAXPITCH - VEHICLE_STARTPITCH) / VEHICLE_MAXSPEED);
#endif
if (flpitch > 200)
flpitch = 200;
if (!m_soundPlaying)
{
if (m_sounds < 5)
{
EMIT_SOUND_DYN(ENT(pev), CHAN_ITEM, "plats/vehicle_brake1.wav", m_flVolume, ATTN_NORM, 0, 100);
}
EMIT_SOUND_DYN(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noise), m_flVolume, ATTN_NORM, 0, int(flpitch));
m_soundPlaying = 1;
}
else
{
unsigned short us_sound = ((unsigned short)(m_sounds) & 0x0007) << 12;
unsigned short us_pitch = ((unsigned short)(flpitch / 10.0) & 0x003F) << 6;
unsigned short us_volume = ((unsigned short)(m_flVolume * 40) & 0x003F);
unsigned short us_encode = us_sound | us_pitch | us_volume;
PLAYBACK_EVENT_FULL(FEV_UPDATE, edict(), m_usAdjustPitch, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, us_encode, 0, 0, 0);
}
}
示例5: Vector
void CGrenade::SG_Detonate(void)
{
TraceResult tr;
Vector vecSpot = pev->origin + Vector(0, 0, 8);
UTIL_TraceLine(vecSpot, vecSpot + Vector(0, 0, -40), ignore_monsters, ENT(pev), &tr);
EMIT_SOUND(ENT(pev), CHAN_WEAPON, "weapons/sg_explode.wav", VOL_NORM, ATTN_NORM);
edict_t *pentFind = NULL;
while ((pentFind = FIND_ENTITY_BY_STRING(pentFind, "classname", "grenade")) != NULL)
{
if (FNullEnt(pentFind))
break;
CBaseEntity *pEnt = CBaseEntity::Instance(pentFind);
if (pEnt)
{
float fDistance = (pEnt->pev->origin - pev->origin).Length();
if (fDistance != 0 && fDistance <= 250 && gpGlobals->time < pEnt->pev->dmgtime)
m_bLightSmoke = true;
}
}
m_bDetonated = true;
PLAYBACK_EVENT_FULL(0, NULL, m_usEvent, 0, pev->origin, (float *)&g_vecZero, 0, 0, 0, 1, m_bLightSmoke, FALSE);
m_vSmokeDetonate = pev->origin;
pev->velocity = Vector(RANDOM_FLOAT(-175.0, 175.0), RANDOM_FLOAT(-175.0, 175.0), RANDOM_FLOAT(250.0, 350.0));
pev->nextthink = gpGlobals->time + 0.1;
SetThink(&CGrenade::SG_Smoke);
}
示例6: UTIL_MakeVectors
void CGrenade::SG_Smoke(void)
{
Vector vecDir;
float flSmokeInterval[2];
int iMaxSmokePuffs;
if (UTIL_PointContents(pev->origin) != CONTENTS_WATER)
{
UTIL_MakeVectors(pev->angles);
vecDir = gpGlobals->v_forward * RANDOM_FLOAT(3, 8);
iMaxSmokePuffs = (int)(RANDOM_FLOAT(1.5, 3.5) * 100);
flSmokeInterval[0] = vecDir.x * cos((float)m_angle * (180 / M_PI)) - vecDir.y * sin((float)m_angle * (180 / M_PI));
flSmokeInterval[1] = vecDir.x * sin((float)m_angle * (180 / M_PI)) + vecDir.y * cos((float)m_angle * (180 / M_PI));
m_angle = (m_angle + 30) % 360;
PLAYBACK_EVENT_FULL(0, NULL, m_usEvent, 0, pev->origin, m_vSmokeDetonate, flSmokeInterval[0], flSmokeInterval[1], iMaxSmokePuffs, 4, m_bLightSmoke, 6);
}
else
UTIL_Bubbles(pev->origin - Vector(64, 64, 64), pev->origin + Vector(64, 64, 64), 100);
if (m_SGSmoke <= 20)
{
pev->nextthink = gpGlobals->time + 1;
SetThink(&CGrenade::SG_Smoke);
m_SGSmoke++;
}
else
{
pev->effects |= EF_NODRAW;
UTIL_Remove(this);
}
}
示例7: PLAYBACK_EVENT_FULL
// Return TRUE if the weapon still has ammo
BOOL CBasePlayer::W_CheckNoAmmo()
{
if(m_pCurrentAmmo && *m_pCurrentAmmo > 0)
return TRUE;
if(m_iQuakeWeapon == IT_AXE)
return TRUE;
#ifdef THREEWAVE
if(m_iQuakeWeapon == IT_EXTRA_WEAPON)
return TRUE;
#endif
if(m_iQuakeWeapon == IT_LIGHTNING)
{
PLAYBACK_EVENT_FULL(FEV_NOTHOST, edict(), m_usLightning, 0, (float *)&pev->origin, (float *)&pev->angles, 0.0, 0.0, 0, 1, 0, 0);
if(m_pActiveItem)
((CQuakeGun *)m_pActiveItem)->DestroyEffect();
}
m_iQuakeWeapon = W_BestWeapon();
W_SetCurrentAmmo();
return FALSE;
}
示例8: SetThink
void CDisplacer::FireThink( void )
{
int flags;
flags = 0;
SetThink ( NULL );
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usFireDisplacer, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0);
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.0;
m_pPlayer->m_iWeaponVolume = LOUD_GUN_VOLUME;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 35/30;
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= DISPLACER_PRIMARY_USAGE;
Vector anglesAim = m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle;
UTIL_MakeVectors( anglesAim );
anglesAim.x = -anglesAim.x;
Vector vecSrc = m_pPlayer->GetGunPosition( ) - gpGlobals->v_up * 2;
Vector vecDir = gpGlobals->v_forward;
#ifndef CLIENT_DLL
CDisplacerBall *pBall = CDisplacerBall::BallCreate();
pBall->pev->owner = m_pPlayer->edict();
pBall->pev->origin = vecSrc;
pBall->pev->angles = anglesAim;
pBall->pev->avelocity.z = 10;
#endif
}
示例9: min
bool AvHBaseBuildable::Regenerate(float inRegenerationAmount, bool inPlaySound, bool dcHealing)
{
bool theDidHeal = false;
if ( gpGlobals->time > this->mTimeOfLastDCRegeneration + BALANCE_VAR(kDefenseChamberThinkInterval) - 0.05f || (dcHealing == false)) {
if ( dcHealing )
this->mTimeOfLastDCRegeneration = gpGlobals->time;
float theMaxHealth = this->mBaseHealth;
if(!this->GetIsBuilt())
{
float theNormalizedBuildPercentage = this->GetNormalizedBuildPercentage();
theMaxHealth = (kBaseHealthPercentage + theNormalizedBuildPercentage*(1.0f - kBaseHealthPercentage))*this->mBaseHealth;
}
// If we aren't at full health, heal health
if(this->pev->health < theMaxHealth)
{
this->pev->health = min(theMaxHealth, this->pev->health + inRegenerationAmount);
this->HealthChanged();
theDidHeal = true;
}
// Play regen event
if(theDidHeal)
{
if(inPlaySound)
{
// Play regeneration event
PLAYBACK_EVENT_FULL(0, this->edict(), gRegenerationEventID, 0, this->pev->origin, (float *)&g_vecZero, 1.0f, 0.0, /*theWeaponIndex*/ 0, 0, 0, 0 );
}
}
}
return theDidHeal;
}
示例10: GetClassPtr
//=========================================================
CQuakeRocket *CQuakeRocket::CreateRocket( Vector vecOrigin, Vector vecAngles, CBaseEntity *pOwner )
{
CQuakeRocket *pRocket = GetClassPtr( (CQuakeRocket *)NULL );
UTIL_SetOrigin( pRocket->pev, vecOrigin );
SET_MODEL(ENT(pRocket->pev), "models/rocket.mdl");
pRocket->Spawn();
pRocket->pev->classname = MAKE_STRING("missile");
pRocket->pev->owner = pOwner->edict();
// Setup
pRocket->pev->movetype = MOVETYPE_FLYMISSILE;
pRocket->pev->solid = SOLID_BBOX;
// Velocity
pRocket->pev->velocity = vecAngles * 1000;
pRocket->pev->angles = UTIL_VecToAngles( vecAngles );
// Touch
pRocket->SetTouch( CQuakeRocket::RocketTouch );
// Safety Remove
pRocket->pev->nextthink = gpGlobals->time + 5;
pRocket->SetThink( SUB_Remove );
// Effects
// pRocket->pev->effects |= EF_LIGHT;
PLAYBACK_EVENT_FULL (FEV_GLOBAL, pRocket->edict(), g_sTrail, 0.0,
(float *)&pRocket->pev->origin, (float *)&pRocket->pev->angles, 0.7, 0.0, pRocket->entindex(), ROCKET_TRAIL, 0, 0);
return pRocket;
}
示例11: min
void AvHHive::DonateUse(CBaseEntity* inActivator, CBaseEntity* inCaller, USE_TYPE inUseType, float inValue)
{
// Player is trying to donate his resources to the pool
if(this->GetIsActive())
{
AvHPlayer* inActivatingPlayer = dynamic_cast<AvHPlayer*>(inActivator);
if(inActivatingPlayer && (inActivator->pev->team == this->pev->team))
{
// Take some resources, give some resources
const float kResourcesToDonatePerUse = .4f;
float theResourcesToGive = min(inActivatingPlayer->GetResources(), kResourcesToDonatePerUse);
if(theResourcesToGive > 0.0f)
{
AvHTeam* theTeam = inActivatingPlayer->GetTeamPointer();
if(theTeam)
{
inActivatingPlayer->SetResources(inActivatingPlayer->GetResources() - theResourcesToGive);
theTeam->SetTeamResources(theTeam->GetTeamResources() + theResourcesToGive);
if(g_engfuncs.pfnRandomLong(0, 20) == 0)
{
PLAYBACK_EVENT_FULL(0, this->edict(), gRegenerationEventID, 0, this->pev->origin, (float *)&g_vecZero, 1.0f, 0.0, /*theWeaponIndex*/ 0, 0, 0, 0 );
// Just say "resources donated"
inActivatingPlayer->PlaybackNumericalEvent(kNumericalInfoResourcesDonatedEvent, 0);
}
}
}
}
}
}
示例12: PlayEmptySound
void CM249::M249Fire(float flSpread, float flCycleTime, BOOL fUseAutoAim)
{
m_bDelayFire = true;
m_iShotsFired++;
m_flAccuracy = ((m_iShotsFired * m_iShotsFired * m_iShotsFired) / 175.0) + 0.4;
if (m_flAccuracy > 0.9)
m_flAccuracy = 0.9;
if (m_iClip <= 0)
{
if (m_fFireOnEmpty)
{
PlayEmptySound();
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.2;
}
return;
}
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;
m_pPlayer->m_iWeaponFlash = BRIGHT_GUN_FLASH;
Vector vecSrc = m_pPlayer->GetGunPosition();
Vector vecDir = m_pPlayer->FireBullets3(vecSrc, gpGlobals->v_forward, flSpread, 8192, 2, BULLET_PLAYER_556MM, 32, 0.97, m_pPlayer->pev, FALSE, m_pPlayer->random_seed);
int flags;
#ifdef CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
#endif
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))
KickBack(1.8, 0.65, 0.45, 0.125, 5.0, 3.5, 8);
else if (m_pPlayer->pev->velocity.Length2D() > 0)
KickBack(1.1, 0.5, 0.3, 0.06, 4.0, 3.0, 8);
else if (FBitSet(m_pPlayer->pev->flags, FL_DUCKING))
KickBack(0.75, 0.325, 0.25, 0.025, 3.5, 2.5, 9);
else
KickBack(0.8, 0.35, 0.3, 0.03, 3.75, 3.0, 9);
}
示例13: UTIL_MakeVectors
void CSqueak::PrimaryAttack()
{
if ( m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] )
{
Vector forward = m_pPlayer->GetAimForwardWithOffset();
Vector forwardDeg = m_pPlayer->GetAimForwardWithOffset( true );
UTIL_MakeVectors( forwardDeg );
TraceResult tr;
Vector trace_origin;
// HACK HACK: Ugly hacks to handle change in origin based on new physics code for players
// Move origin up if crouched and start trace a bit outside of body ( 20 units instead of 16 )
trace_origin = m_pPlayer->pev->origin;
if ( m_pPlayer->pev->flags & FL_DUCKING )
{
trace_origin = trace_origin - ( VEC_HULL_MIN - VEC_DUCK_HULL_MIN );
}
// find place to toss monster
UTIL_TraceLine( trace_origin + forward * 20, trace_origin + forward * 64, dont_ignore_monsters, NULL, &tr );
int flags;
#ifdef CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
#endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usSnarkFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 );
if ( tr.fAllSolid == 0 && tr.fStartSolid == 0 && tr.flFraction > 0.25 )
{
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifndef CLIENT_DLL
CBaseEntity *pSqueak = CBaseEntity::Create( "monster_snark", tr.vecEndPos, forwardDeg, m_pPlayer->edict() );
pSqueak->pev->velocity = forward * 200 + m_pPlayer->pev->velocity;
#endif
// play hunt sound
#ifndef CLIENT_DLL
EMIT_SOUND_DYN( ENT( pev ), CHAN_VOICE, gameplayMods::snarkPenguins.isActive() ? RANDOM_SOUND_ARRAY( pPinguHuntSounds ) : RANDOM_SOUND_ARRAY_PAYNED_DIE_MONSTER( pHuntSounds ), 1, ATTN_NORM, 0, 100 );
#endif // !CLIENT_DLL
m_pPlayer->m_iWeaponVolume = QUIET_GUN_VOLUME;
if ( !gameplayMods::infiniteAmmo.isActive() ) {
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
}
m_fJustThrown = 1;
m_flNextPrimaryAttack = GetNextAttackDelay(0.3);
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.0;
}
}
}
示例14: PlayEmptySound
void CAWP::AWPFire( float flSpread, float flCycleTime, BOOL fUseSemi )
{
if( m_pPlayer->pev->fov == 90 )
{
flSpread += AWP_AJUSTED_SPREAD;
}
else
{
m_pPlayer->m_fResumeZoom = TRUE;
m_pPlayer->m_iLastZoom = m_pPlayer->m_iFOV;
m_pPlayer->m_iFOV = m_pPlayer->pev->fov = 90;
}
if( m_iClip <= 0 )
{
if( m_fFireOnEmpty )
{
PlayEmptySound();
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.2;
}
/*! @todo Implements me :
if( TheBots )
TheBots->OnEvent( EVENT_WEAPON_FIRED_ON_EMPTY, m_pPlayer->pev, NULL ); */
return;
}
m_iClip--;
m_pPlayer->pev->effects |= EF_MUZZLEFLASH;
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;
UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle );
m_pPlayer->m_flEjectBrass = gpGlobals->time + AWP_EJECT_BRASSE_TIME;
Vector vecDir = m_pPlayer->FireBullets3(
m_pPlayer->GetGunPosition(), gpGlobals->v_forward,
flSpread, 8192.0, AWP_PENETRATION, BULLET_PLAYER_338MAG, AWP_DAMAGE, AWP_RANGE_MODIFIER, m_pPlayer->pev, 0, m_pPlayer->random_seed );
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(),
m_usAwp, 0.0, (float *)&g_vecZero, (float *)&g_vecZero,
vecDir.x, vecDir.y, m_pPlayer->pev->punchangle.x * 100, m_pPlayer->pev->punchangle.x * 100, FALSE, FALSE );
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + flCycleTime;
if ( !m_iClip && m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] <= 0 )
{
m_pPlayer->SetSuitUpdate( "!HEV_AMO0", FALSE, 0 );
}
m_pPlayer->pev->punchangle.x -= 2.0;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + AWP_IDLE_TIME;
}
示例15: UTIL_MakeVectors
void CSqueak::PrimaryAttack()
{
if ( m_pPlayer->m_rgAmmo[ m_iPrimaryAmmoType ] )
{
UTIL_MakeVectors( m_pPlayer->pev->v_angle );
TraceResult tr;
Vector trace_origin;
// HACK HACK: Ugly hacks to handle change in origin based on new physics code for players
// Move origin up if crouched and start trace a bit outside of body ( 20 units instead of 16 )
trace_origin = m_pPlayer->pev->origin;
/* Removed by Pcjoe
if ( m_pPlayer->pev->flags & FL_DUCKING )
{
trace_origin = trace_origin - ( VEC_HULL_MIN - VEC_DUCK_HULL_MIN );
}*/
// find place to toss monster
UTIL_TraceLine( trace_origin + gpGlobals->v_forward * 20, trace_origin + gpGlobals->v_forward * 64, dont_ignore_monsters, NULL, &tr );
int flags;
#ifdef CLIENT_WEAPONS
flags = FEV_NOTHOST;
#else
flags = 0;
#endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usSnarkFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 );
if ( tr.fAllSolid == 0 && tr.fStartSolid == 0 && tr.flFraction > 0.25 )
{
// player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
#ifndef CLIENT_DLL
CBaseEntity *pSqueak = CBaseEntity::Create( "monster_snark", tr.vecEndPos, m_pPlayer->pev->v_angle, m_pPlayer->edict() );
pSqueak->pev->velocity = gpGlobals->v_forward * 200 + m_pPlayer->pev->velocity;
#endif
// play hunt sound
float flRndSound = RANDOM_FLOAT ( 0 , 1 );
if ( flRndSound <= 0.5 )
EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, "squeek/sqk_hunt2.wav", 1, ATTN_NORM, 0, 105);
else
EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, "squeek/sqk_hunt3.wav", 1, ATTN_NORM, 0, 105);
m_pPlayer->m_iWeaponVolume = QUIET_GUN_VOLUME;
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
m_fJustThrown = 1;
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.3;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.0;
}
}
}