//----------------------------------------------------------------------------- float CWeaponAlyxGun::GetMaxRestTime( void ) { if ( IsAlyxInInjuredMode() ) return 3.0f; return BaseClass::GetMaxRestTime(); }
//========================================================= //========================================================= float CWeaponAlyxGun::GetMinRestTime() { if ( IsAlyxInInjuredMode() ) return 1.5f; return BaseClass::GetMinRestTime(); }
//----------------------------------------------------------------------------- const Vector& CWeaponAlyxGun::GetBulletSpread( void ) { static const Vector cone = VECTOR_CONE_2DEGREES; static const Vector injuredCone = VECTOR_CONE_6DEGREES; if ( IsAlyxInInjuredMode() ) return injuredCone; return cone; }
//========================================================= //========================================================= const Vector& CWeaponAlyxGun::GetBulletSpread() { static Vector Spread = VECTOR_CONE_2DEGREES; static Vector InjuredAlyxSpread = VECTOR_CONE_6DEGREES; #ifndef CLIENT_DLL if ( GetOwner() && GetOwner()->Classify() == CLASS_PLAYER_ALLY_VITAL ) { if ( IsAlyxInInjuredMode() ) return InjuredAlyxSpread; else return Spread; } // El dueño de esta arma es el jugador. if ( GetOwner() && GetOwner()->IsPlayer() ) { // Valor predeterminado. Spread = VECTOR_CONE_5DEGREES; CIN_Player *pPlayer = ToInPlayer(GetOwner()); const char *crosshair = pPlayer->GetConVar("crosshair"); // Esta agachado y con la mira puesta. Las balas se esparcirán al minimo. if ( pPlayer->IsDucked() && crosshair == "0" ) Spread = VECTOR_CONE_1DEGREES; // Esta agachado. 3 grados de esparcimiento. else if ( pPlayer->IsDucked() ) Spread = VECTOR_CONE_3DEGREES; // Esta con la mira. 2 grados de esparcimiento. else if ( crosshair == "0" ) Spread = VECTOR_CONE_2DEGREES; } #endif return Spread; }
//----------------------------------------------------------------------------- // Purpose: Whether or not Alyx is injured //----------------------------------------------------------------------------- bool CAI_BehaviorAlyxInjured::IsInjured( void ) const { return IsAlyxInInjuredMode(); }