samp-incognito / samp-streamer-plugin

Streamer Plugin for SA-MP (San Andreas Multiplayer)
Apache License 2.0
231 stars 92 forks source link

CreateDynamicActor VirtualWorld #253

Closed AbyssMorgan closed 6 years ago

AbyssMorgan commented 6 years ago

virtualworld = -1 not working on CreateDynamicActor Actor is visible only in virtualworld 0

IstuntmanI commented 6 years ago

We already talked about that in some issue/pull request. Actors aren't handled in the same way as pickups, actors can't be visible in all worlds. CreatePickup works with virtualworld = -1 (=> visible in all worlds), but SetActorVirtualWorld isn't working with virtualworld = -1.

So, basically, actor's virtual world isn't a vector, but just an int. AFAIK dynamic actors can have only one world. I think that if you have more worlds for an actor it will be available only in the first world.

This could be fixed if we had per-player actors, but we only have the global actors with no virtualworld = -1 support. To support multiple virtual worlds for an actor we would need to have an internal actor ID pool for every dynamic actor ID and it would need to be created in every required world, which isn't ideal.

ghost commented 6 years ago

@IstuntmanI , can't just use raknet packets and send actor create packets manually just like how kurta made setgravity per player? : p

IstuntmanI commented 6 years ago

Well, Streamer Plugin isn't doing that. Also, RPCs can change IDs in a new SA-MP version. The greatest advantage of Streamer Plugin now is that it is compatible with any new SA-MP version, as long as it doesn't have code breaking changes. I tried to stay away from plugins that use memory hacking or RPC/packet handling.

samp-incognito commented 6 years ago

Unless it's added as a YSF feature or added to SA-MP, it can't be fixed here, unfortunately.