It's not a bug with the code base and that isn't the proper way to fix it.
This is how Valve's games handle it:
https://github.com/ValveSoftware/source-sdk-2013/search?utf8=%E2%9C%93&q=m_iv_angEyeAngles

On Sun, May 31, 2015 at 2:21 AM, Peter McKeown <pmckeown2...@hotmail.com>
wrote:

> Greetings everyone,
>
> There is a bug with the codebase where in some situations the first person
> spectating of other players can become very laggy, as interpolation for
> m_angEyeAngles stops.
>
> This bug is present in TF2's code as well as I've seen it there too. The
> issue is that the player's ShouldInterpolate() doesn't take into account if
> the local player is spectating this player or not, causing it to no longer
> have it's interpolated variables (like m_iv_angEyeAngles) processed. I've
> been hunting this bug for a while in my mod and finally solved it, and I
> figured I'd share the solution here:
>
> In c_baseplayer.cpp, go to the ShouldInterpolate() function, and add this
> at the bottom above BaseClass::ShouldInterpolate():
>
> if ( GetLocalPlayer() && GetLocalPlayer()->GetObserverTarget() == this )
>         return true;
>
> This will fix it. Hope this helps!
>
> Note: I didn't look too much into this, but the spectating of players is
> done via CalcView which doesn't appear to change what
> render->GetViewEntity() would return - the entity returned by this always
> interpolated, which would seem to be the intended way for this to work, but
> doesn't.
>
> Regards,
>
> Peter
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to