Skip to content

Sync distance of unoccupied vehicles and peds should match stream distance #375

Open

Description

@ArranTuna

Describe the bug

@lil-Toady said:

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.

Additional context
From https://bugs.mtasa.com/view.php?id=6287

Activity

  1. added this to the Backlog milestone on Sep 6, 2018
  2. added
    bugSomething isn't working
    and removed
    enhancementNew feature or request
    on Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsync

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions