void ComputeAngularSpeed(EThrusters _eThusters, EThrusters _eOppositeThusers, float _fDeltaAcceleration, ref float _rfAxisLocalSpeed, ref float _rfAxisLocalAcceleration, float _fPowerMultiplier = 1.0f) { if (IsThusterEnabled(_eThusters) && !IsThusterEnabled(_eOppositeThusers) && _rfAxisLocalSpeed > -m_fAngularMaxSpeed) { _rfAxisLocalAcceleration -= m_fAngularAcceleration * m_faThruserPowerRatios[(int)_eThusters] * _fPowerMultiplier; // Handbreaking if (_rfAxisLocalSpeed > 0.0f) { _rfAxisLocalSpeed = ComputeDamping(_rfAxisLocalSpeed, _fDeltaAcceleration * m_fAngularHandbreakpower); } } else if (IsThusterEnabled(_eOppositeThusers) && !IsThusterEnabled(_eThusters) && _rfAxisLocalSpeed < m_fAngularMaxSpeed) { _rfAxisLocalAcceleration += m_fAngularAcceleration * m_faThruserPowerRatios[(int)_eOppositeThusers] * _fPowerMultiplier; // Handbreaking if (_rfAxisLocalSpeed < 0.0f) { _rfAxisLocalSpeed = ComputeDamping(_rfAxisLocalSpeed, _fDeltaAcceleration * m_fAngularHandbreakpower); } } else if (_rfAxisLocalSpeed != 0.0f) { _rfAxisLocalSpeed = ComputeDamping(_rfAxisLocalSpeed, _fDeltaAcceleration); } }
public float GetThustersPowerRatio(EThrusters _eThusters) { return (m_faThruserPowerRatios[(int)_eThusters]); }
public bool IsThusterEnabled(EThrusters _eThuster) { return (m_baThustersEnabled[(int)_eThuster].Get()); }
public void SetThrusterEnabled(EThrusters _eThusters, float _bPowerRatio) { m_baThustersEnabled[(int)_eThusters].Set(_bPowerRatio > 0.0f); m_faThruserPowerRatios[(int)_eThusters] = _bPowerRatio; }
void ComputeAngularSpeed(EThrusters _eThusters, EThrusters _eOppositeThusers, float _fDeltaAcceleration, ref float _rfAxisLocalSpeed, ref float _rfAxisLocalAcceleration, float _fPowerMultiplier = 1.0f) { if ( IsThusterEnabled(_eThusters) && !IsThusterEnabled(_eOppositeThusers) && _rfAxisLocalSpeed > -m_fAngularMaxSpeed) { _rfAxisLocalAcceleration -= m_fAngularAcceleration * m_faThruserPowerRatios[(int)_eThusters] * _fPowerMultiplier; // Handbreaking if (_rfAxisLocalSpeed > 0.0f) { _rfAxisLocalSpeed = ComputeDamping(_rfAxisLocalSpeed, _fDeltaAcceleration * m_fAngularHandbreakpower); } } else if (IsThusterEnabled(_eOppositeThusers) && !IsThusterEnabled(_eThusters) && _rfAxisLocalSpeed < m_fAngularMaxSpeed) { _rfAxisLocalAcceleration += m_fAngularAcceleration * m_faThruserPowerRatios[(int)_eOppositeThusers] * _fPowerMultiplier; // Handbreaking if (_rfAxisLocalSpeed < 0.0f) { _rfAxisLocalSpeed = ComputeDamping(_rfAxisLocalSpeed, _fDeltaAcceleration * m_fAngularHandbreakpower); } } else if (_rfAxisLocalSpeed != 0.0f) { _rfAxisLocalSpeed = ComputeDamping(_rfAxisLocalSpeed, _fDeltaAcceleration); } }
public float GetThustersPowerRatio(EThrusters _eThusters) { return(m_faThruserPowerRatios[(int)_eThusters]); }
public bool IsThusterEnabled(EThrusters _eThuster) { return(m_baThustersEnabled[(int)_eThuster].Get()); }