Don't reset input after sending it

This commit is contained in:
in0finite 2019-04-28 15:23:44 +02:00
parent 60c5284984
commit 787603cdb8
3 changed files with 6 additions and 10 deletions

View file

@ -53,8 +53,8 @@ namespace SanAndreasUnity.Behaviours
void FixedUpdate_Net()
{
// send input to server
//if (!NetStatus.IsServer && this.IsControlledByLocalPlayer && PedSync.Local != null)
// PedSync.Local.SendInput(this.IsWalkOn, this.IsRunOn, this.IsSprintOn, this.Movement, this.IsJumpOn);
if (!NetStatus.IsServer && this.IsControlledByLocalPlayer && PedSync.Local != null)
PedSync.Local.SendInput();
}
void Net_OnIdChanged(int newId)

View file

@ -121,14 +121,6 @@ namespace SanAndreasUnity.Behaviours
this.ReadEvents ();
if (!NetStatus.IsServer)
{
// send input to server, and then reset it
// this is done so that we can test if anything influences the ped if input is set on client
PedSync.Local.SendInput();
m_ped.ResetInput();
}
}
void ReadStates()

View file

@ -8,6 +8,10 @@
- send input to server
- don't reset ped input on clients
- input should be sent from Update(), with a specified max rate (30 fps ?)
- display a message to user when network is stopped