mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-12-03 17:29:11 +00:00
aim anim max time is equal to half of the anim length
This commit is contained in:
parent
bc05cb0b4c
commit
0dffb495c6
1 changed files with 7 additions and 4 deletions
|
@ -6,9 +6,12 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
|
||||
public class DriveByState : VehicleSittingState, IAimState
|
||||
{
|
||||
public float AimAnimMaxTime = 0f;
|
||||
public float AimAnimFireMaxTime = 0f;
|
||||
|
||||
|
||||
// TODO:
|
||||
// - add real aim anims ?
|
||||
// - drive-by exiting state - activated when going from drive-by to sitting state, or when trying to exit vehicle
|
||||
// - camera
|
||||
// - weapon's gun flash should depend on last time when fired, not on anim time
|
||||
|
||||
|
||||
protected override void EnterVehicleInternal()
|
||||
|
@ -94,7 +97,7 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
var ped = m_ped;
|
||||
var weapon = ped.CurrentWeapon;
|
||||
var state = m_model.LastAnimState;
|
||||
float aimAnimMaxTime = this.AimAnimMaxTime;
|
||||
float aimAnimMaxTime = state.length * 0.5f;
|
||||
|
||||
if (state.time >= aimAnimMaxTime)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue