View Single Post
minmay

JCF Member

Joined: Aug 2002

Posts: 1,184

minmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesome

Oct 31, 2013, 03:45 PM
minmay is offline
Reply With Quote
Quote:
Originally Posted by minmay View Post
Is there any reliable way to check if a non-local player is spectating via AngelScript?
Quote:
Originally Posted by Violet CLM View Post
Testing their position for being inside the level (instead of at 0,0) seems to be the preferred method at present.
A note to anyone wanting to use this, from my observation it only works for servers. Clients don't always get the spectating player's position updated and end up holding onto their old position (unless they pass near 0,0?). Even if the server has alwaysupdatepos on.

EDIT: After some testing it looks like spectating players hold onto their blink value and it gets sent to other players, but doesn't decrement. I can set it to -210 (any lower, or above 0, and it gets reset before it can get sent to other players). Currently I'm using that to test for spectating; if it's possible for it to get sent to other players while lower than -209, then I don't seem to be catching it in onPlayer, and even if it is I can just make sure the value stays at -210 for two consecutive frames.

Last edited by minmay; Oct 31, 2013 at 04:31 PM.