[BUG] setting player positions not updating spectating
#1

Topic isn't quite descriptive, but let me explain.


playerA PlayerSpectatePlayer on playerB

playerB's position gets moved far away using SetPlayerPos OR the player's state is changed.

Spectate mode doesn't update, camera goes to blueberry or something. PlayerSpectatePlayer is required to restart the spectating.

-- Please fix for 0.3.7.
Reply
#2

it's possible to fix via script
Reply
#3

^ it's possible to fix your brains via rusty metal bar.

Yes it is another issue which can be "patched" but also could be solved in different manner. It is an annoying bug, and just pisses me to implement it in every other game mode I create.
Reply
#4

Quote:
Originally Posted by SPAWN_METAL
Посмотреть сообщение
it's possible to fix via script
Yep you can hook SetPlayerPos and other state-changing functions and callbacks. Then in the hook check for any players spectating the player, and reset their camera, eventually with a short timer.

This however is a heavy piece of code, bloating the script a lot and eventually slowing it down, just for fixing a small streaming problem.
Reply
#5

I already fixed it evidently? If the player's state changed, respec them and check for if in vehicle / player.

Maybe if it was implemented in a_adminspec.pwn (i believe?) people wouldn't complain.

I'm just reporting, I've never really seen anyone else report this even tho they have reported all the other "fix it yourself" bugs.
Reply
#6

Nobody reported this because there is already a fix for this that can be scripted.
Reply
#7

Quote:
Originally Posted by Admigo
Посмотреть сообщение
Nobody reported this because there is already a fix for this that can be scripted.
The same can be said for your PreloadAnim 'bug' report.
Reply
#8

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
The same can be said for your PreloadAnim 'bug' report.
Sure you can say that. But even with preloading animations i got that issue.
Sure it would be nice if those bugs getting fixed.
Reply
#9

preloading animations need time to load
Reply
#10

The problem exists because the player that is being spectated has teleported outside of the streaming range of the spectator, and therefore the spectator's client no longer knows where the other player is.

Knowing this, there is a much less complex/more reliable method than hooking SetPlayerPos and setting a timer - use OnPlayerStreamOut and check if forplayerid was spectating playerid. If so, call PlayerSpectatePlayer again.

The problem isn't really a bug in the spectate code but rather a side-effect of the player streaming system. If it were 'fixed' in the SA-MP server, it would be the exact same code that I described above.

I agree that a fix for all of these little bugs would be appreciated but c'mon, we have the opportunity for some cool new things in 0.3.7 - let's not waste their time with tiny things we can fix ourselves.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)