Send heading

This commit is contained in:
in0finite 2019-04-28 00:19:22 +02:00
parent 929bb22fb5
commit 9096954525
2 changed files with 7 additions and 4 deletions

View file

@ -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() public void SendInput()
{ {
Ped ped = m_ped; 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] [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) if (null == m_ped)
return; return;
@ -54,6 +54,7 @@ namespace SanAndreasUnity.Net
ped.IsSprintOn = isSprintOn; ped.IsSprintOn = isSprintOn;
ped.Movement = movementInput; ped.Movement = movementInput;
ped.IsJumpOn = isJumpOn; ped.IsJumpOn = isJumpOn;
ped.Heading = heading;
} }

View file

@ -8,6 +8,8 @@
- send input to server - send input to server
- set default IP in JoinGame window to 127.0.0.1
- display a message to user when network is stopped - display a message to user when network is stopped