mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-03-05 07:37:17 +00:00
send aim/fire button events
This commit is contained in:
parent
953c57ee9b
commit
d21a9f5c44
2 changed files with 24 additions and 2 deletions
Assets/Scripts
|
@ -211,12 +211,14 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
|
||||
public virtual void OnFireButtonPressed()
|
||||
{
|
||||
|
||||
if (m_shouldSendButtonEvents)
|
||||
PedSync.Local.OnFireButtonPressed();
|
||||
}
|
||||
|
||||
public virtual void OnAimButtonPressed()
|
||||
{
|
||||
|
||||
if (m_shouldSendButtonEvents)
|
||||
PedSync.Local.OnAimButtonPressed();
|
||||
}
|
||||
|
||||
public virtual void OnSubmitPressed()
|
||||
|
|
|
@ -81,6 +81,7 @@ namespace SanAndreasUnity.Net
|
|||
v.Braking = braking;
|
||||
}
|
||||
|
||||
|
||||
public void OnCrouchButtonPressed() => this.CmdOnCrouchButtonPressed();
|
||||
|
||||
[Command]
|
||||
|
@ -99,6 +100,25 @@ namespace SanAndreasUnity.Net
|
|||
m_ped.OnSubmitPressed();
|
||||
}
|
||||
|
||||
public void OnFireButtonPressed() => this.CmdOnFireButtonPressed();
|
||||
|
||||
[Command]
|
||||
void CmdOnFireButtonPressed()
|
||||
{
|
||||
if (m_ped != null)
|
||||
m_ped.OnFireButtonPressed();
|
||||
}
|
||||
|
||||
public void OnAimButtonPressed() => this.CmdOnAimButtonPressed();
|
||||
|
||||
[Command]
|
||||
void CmdOnAimButtonPressed()
|
||||
{
|
||||
if (m_ped != null)
|
||||
m_ped.OnAimButtonPressed();
|
||||
}
|
||||
|
||||
|
||||
public void PedStartedEnteringVehicle(Ped ped)
|
||||
{
|
||||
NetStatus.ThrowIfNotOnServer();
|
||||
|
|
Loading…
Add table
Reference in a new issue