mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
Don't reset input after sending it
This commit is contained in:
parent
60c5284984
commit
787603cdb8
3 changed files with 6 additions and 10 deletions
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue