mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 06:34:16 +00:00
Send heading
This commit is contained in:
parent
929bb22fb5
commit
9096954525
2 changed files with 7 additions and 4 deletions
|
@ -30,19 +30,19 @@ namespace SanAndreasUnity.Net
|
|||
|
||||
}
|
||||
|
||||
public void SendInput(bool isWalkOn, bool isRunOn, bool isSprintOn, Vector3 movementInput, bool isJumpOn)
|
||||
public void SendInput(bool isWalkOn, bool isRunOn, bool isSprintOn, Vector3 movementInput, bool isJumpOn, Vector3 heading)
|
||||
{
|
||||
this.CmdSendingInput(isWalkOn, isRunOn, isSprintOn, movementInput, isJumpOn);
|
||||
this.CmdSendingInput(isWalkOn, isRunOn, isSprintOn, movementInput, isJumpOn, heading);
|
||||
}
|
||||
|
||||
public void SendInput()
|
||||
{
|
||||
Ped ped = m_ped;
|
||||
this.SendInput(ped.IsWalkOn, ped.IsRunOn, ped.IsSprintOn, ped.Movement, ped.IsJumpOn);
|
||||
this.SendInput(ped.IsWalkOn, ped.IsRunOn, ped.IsSprintOn, ped.Movement, ped.IsJumpOn, ped.Heading);
|
||||
}
|
||||
|
||||
[Command]
|
||||
void CmdSendingInput(bool isWalkOn, bool isRunOn, bool isSprintOn, Vector3 movementInput, bool isJumpOn)
|
||||
void CmdSendingInput(bool isWalkOn, bool isRunOn, bool isSprintOn, Vector3 movementInput, bool isJumpOn, Vector3 heading)
|
||||
{
|
||||
if (null == m_ped)
|
||||
return;
|
||||
|
@ -54,6 +54,7 @@ namespace SanAndreasUnity.Net
|
|||
ped.IsSprintOn = isSprintOn;
|
||||
ped.Movement = movementInput;
|
||||
ped.IsJumpOn = isJumpOn;
|
||||
ped.Heading = heading;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
- send input to server
|
||||
|
||||
- set default IP in JoinGame window to 127.0.0.1
|
||||
|
||||
- display a message to user when network is stopped
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue