Fix sending submit button event

This commit is contained in:
in0finite 2019-04-30 23:29:21 +02:00
parent a7e0c91f31
commit e99839de0a
4 changed files with 18 additions and 5 deletions

View file

@ -492,7 +492,10 @@ namespace SanAndreasUnity.Behaviours.Peds.States
{ {
// try to enter vehicle // try to enter vehicle
m_ped.TryEnterVehicleInRange (); if (m_isServer)
m_ped.TryEnterVehicleInRange ();
else
base.OnSubmitPressed();
} }

View file

@ -91,7 +91,10 @@ namespace SanAndreasUnity.Behaviours.Peds.States
public override void OnSubmitPressed() { public override void OnSubmitPressed() {
// try to enter vehicle // try to enter vehicle
m_ped.TryEnterVehicleInRange (); if (m_isServer)
m_ped.TryEnterVehicleInRange ();
else
base.OnSubmitPressed();
} }

View file

@ -35,7 +35,10 @@ namespace SanAndreasUnity.Behaviours.Peds.States
public override void OnSubmitPressed () public override void OnSubmitPressed ()
{ {
m_ped.TryEnterVehicleInRange (); if (m_isServer)
m_ped.TryEnterVehicleInRange ();
else
base.OnSubmitPressed();
} }
public override void OnJumpPressed () public override void OnJumpPressed ()

View file

@ -8,9 +8,13 @@
- adapt states: - adapt states:
- send button input events to server: - send button input events to server: submit,
- When ped enters vehicle, he changes parent. Is this allowed in Mirror ? Possible solution would be to only change parent of ped model. - When ped enters vehicle, he changes parent. Is this allowed in Mirror ? Possible solution would be to only change parent of ped model. Also, while ped is in vehicle, network transform should not sync.
- disable vehicle's rigid body on clients ; apply linear and angular velocity manually ? ;
- sync car color
- stats window - stats window