You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sync distance of unoccupied vehicles and peds should match stream distance #375
You can have unoccupied vehicles and peds streamed in when nobody really syncs them, that can cause troubles if you interact with them (shoot?).
To Reproduce
Script from Drakath:
function distancedSync()
for i, player in ipairs(getElementsByType("player")) do
setElementPosition(player, 2243, 1532, 11.5)
setElementRotation(player, 0, 0, 90)
giveWeapon(player, 38, 9999, true)
end
local ped = createPed (0, 2114, 1532, 11.5, 0)
setTimer ( function (ped)
setElementRotation(ped, 0, 0, -90)
setPedAnimation (ped, "ped", "run_old", -1, true, true, true)
end, 1000, 1, ped)
end
addEventHandler("onResourceStart", root, distancedSync)
--This ped will be invincible
Expected behavior
@lil-Toady said:
Raise sync distance to match stream distance and make the streamer load elements the player syncs even if they are out of local stream distance. So anything a player can see is always synced.
A cool solution instead would be for the streamer not to stream in peds/vehicles if they aint being synced by anyone.
Activity