2
0
Fork 0
mirror of https://github.com/GTA-ASM/SanAndreasUnity synced 2025-03-05 07:37:17 +00:00

extract method

This commit is contained in:
in0finite 2019-07-11 23:53:34 +02:00
parent 63ce71bec6
commit b467859ce5
2 changed files with 13 additions and 10 deletions
Assets/Scripts/Behaviours/Ped/States
Docs

View file

@ -44,14 +44,7 @@ namespace SanAndreasUnity.Behaviours.Peds.States
VehicleEnteringState.PreparePedForVehicle(m_ped, vehicle, seat);
if (seat.IsDriver)
{
m_model.PlayAnim(AnimGroup.Car, AnimIndex.Sit, PlayMode.StopAll);
}
else
{
m_model.PlayAnim(AnimGroup.Car, AnimIndex.SitPassenger, PlayMode.StopAll);
}
this.UpdateAnimsWhilePassenger();
}
@ -95,6 +88,18 @@ namespace SanAndreasUnity.Behaviours.Peds.States
}
protected virtual void UpdateAnimsWhilePassenger()
{
if (this.CurrentVehicleSeat.IsDriver)
{
m_model.PlayAnim(AnimGroup.Car, AnimIndex.Sit, PlayMode.StopAll);
}
else
{
m_model.PlayAnim(AnimGroup.Car, AnimIndex.SitPassenger, PlayMode.StopAll);
}
}
public override void UpdateCameraZoom()
{

View file

@ -16,8 +16,6 @@
- sometimes, current vehicle is null on client
- vehicle states should handle situation when current vehicle is null (on client)
- play horn sound ?
***