//------------------------------------------------------------------------------ // Purpose : Draw attack beam and do damage / decals // Input : // Output : //------------------------------------------------------------------------------ void CNPC_Stalker::KillAttackBeam(void) { if ( !m_pBeam ) return; // Kill sound StopSound(m_pBeam->entindex(), "NPC_Stalker.BurnWall" ); StopSound(m_pBeam->entindex(), "NPC_Stalker.BurnFlesh" ); UTIL_Remove( m_pLightGlow ); UTIL_Remove( m_pBeam); m_pBeam = NULL; m_bPlayingHitWall = false; m_bPlayingHitFlesh = false; SetThink(&CNPC_Stalker::CallNPCThink); if ( m_flNextNPCThink > gpGlobals->curtime ) { SetNextThink( m_flNextNPCThink ); } // Beam has to recharge m_fBeamRechargeTime = gpGlobals->curtime + STALKER_LASER_RECHARGE; ClearCondition( COND_CAN_RANGE_ATTACK1 ); RelaxAim(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CUnitBase::AimGun() { if( GetEnemy() ) { Vector vecShootOrigin = Weapon_ShootPosition(); Vector vecShootDir = GetShootEnemyDir( vecShootOrigin, false ); SetAim(vecShootDir); } else { RelaxAim(); } }
//--------------------------------------------------------- //--------------------------------------------------------- void CNPC_Dog::NPCThink( void ) { BaseClass::NPCThink(); if ( m_hPhysicsEnt == NULL ) { ClearBeams(); m_bHasObject = false; } if ( m_bHasObject == true ) { RelaxAim(); PullObject( true ); } // update follower bones m_BoneFollowerManager.UpdateBoneFollowers(this); }