feat(sync): locked speed overrides recipient's speed data

When the driver/passenger locks a speed, the data from the player who locked the speed is gathered and sent to the other player. This way the players will have the same data on both ends.
This commit is contained in:
Dan
2021-03-03 11:59:59 +00:00
parent eacb42851c
commit 95d8feb6a6
2 changed files with 32 additions and 12 deletions

View File

@@ -103,7 +103,5 @@ end )
RegisterNetEvent( "wk_wars2x_sync:receiveLockAntennaSpeed" )
AddEventHandler( "wk_wars2x_sync:receiveLockAntennaSpeed", function( antenna, data )
RADAR:SetAntennaSpeed( antenna, data[1] )
RADAR:SetAntennaDir( antenna, data[2] )
RADAR:LockAntennaSpeed( antenna )
RADAR:LockAntennaSpeed( antenna, data )
end )