mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
store vehicle parent offset
This commit is contained in:
parent
c6143c3647
commit
62d6925020
2 changed files with 7 additions and 1 deletions
|
@ -9,6 +9,8 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
|
||||
public class VehicleSittingState : BaseVehicleState
|
||||
{
|
||||
Vector3 m_vehicleParentOffset = Vector3.zero;
|
||||
|
||||
|
||||
|
||||
public override void OnBecameActive()
|
||||
|
@ -20,6 +22,7 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
|
||||
public override void OnBecameInactive()
|
||||
{
|
||||
m_vehicleParentOffset = Vector3.zero;
|
||||
this.Cleanup();
|
||||
|
||||
base.OnBecameInactive();
|
||||
|
@ -47,10 +50,11 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
{
|
||||
Vehicle vehicle = this.CurrentVehicle;
|
||||
Vehicle.Seat seat = this.CurrentVehicleSeat;
|
||||
m_vehicleParentOffset = m_model.VehicleParentOffset;
|
||||
|
||||
BaseVehicleState.PreparePedForVehicle(m_ped, vehicle, seat);
|
||||
|
||||
this.UpdateAnimsWhilePassenger();
|
||||
//this.UpdateAnimsWhilePassenger();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
- sometimes, current vehicle is null on client
|
||||
|
||||
- test situation when player connects, and there are peds sitting in vehicles
|
||||
|
||||
***
|
||||
|
||||
- is weapon sound 3d ?
|
||||
|
|
Loading…
Reference in a new issue