protected virtual void SwitchToAimState() { if (m_ped.IsAimOn && m_ped.IsHoldingWeapon) { BaseAimMovementState.SwitchToAimMovementStateBasedOnInput(m_ped); } }
protected virtual void RotatePedInDirectionOfAiming() { if (m_ped.CurrentWeapon.HasFlag(GunFlag.AIMWITHARM)) { return; } BaseAimMovementState.RotatePedInDirectionOfAiming(m_ped); }
void UpdateAnimsInternal(bool bUpdateFiring) { if (this.CurrentVehicleSeat != null) { var animId = new Importing.Animation.AnimId("drivebys", this.GetAnimBasedOnAimDir()); m_model.PlayAnim(animId); m_model.LastAnimState.wrapMode = WrapMode.ClampForever; if (bUpdateFiring) { if (m_ped.CurrentWeapon != null) { m_ped.CurrentWeapon.AimAnimState = m_model.LastAnimState; this.UpdateAimAnim(() => BaseAimMovementState.TryFire(m_ped, this.WeaponAttackParams)); } } m_model.VehicleParentOffset = m_model.GetAnim(animId.AnimName).RootEnd; m_model.RootFrame.transform.localPosition = Vector3.zero; } }
protected override void RotatePedInDirectionOfAiming() { BaseAimMovementState.RotatePedInDirectionOfAiming(m_ped); }
protected virtual void UpdateArmTransformsForAWA() { BaseAimMovementState.UpdateArmTransformsForAWA(m_ped); }
protected virtual void UpdateAimAnim(AnimationState state) { BaseAimMovementState.UpdateAimAnim(m_ped, state, this.AimAnimMaxTime, this.AimAnimFireMaxTime, () => this.TryFire()); }
/// <summary> /// Update anims for AWA (AIMWITHARM) weapons. /// </summary> protected virtual AnimationState UpdateAnimsAWA() { return(BaseAimMovementState.UpdateAnimsAWA(m_ped, this.aimWithArm_LowerAnim)); }
protected virtual void RotateSpine() { BaseAimMovementState.RotateSpineToMatchAimDirection(m_ped); }
protected virtual bool SwitchToOtherAimMovementState() { BaseAimMovementState.SwitchToAimMovementStateBasedOnInput(m_ped); return(!this.IsActiveState); }
public virtual void StopFiring() { BaseAimMovementState.SwitchToAimMovementStateBasedOnInput(m_ped); }
public virtual Vector3 GetFireDirection() { return(BaseAimMovementState.GetFireDirection(m_ped, () => false, this.WeaponAttackParams)); }
public virtual Vector3 GetFirePosition() { return(BaseAimMovementState.GetFirePosition(m_ped)); }