Spynext maintains original sound position for spectators
There's two things about spynext that I find wrong. one of them is definitely a bug, the other I'm not sure about. Both are related to spectating, but I believe it should be tracked separately from bug 409 and bug 146. Anyway:
1) If you're a spectator and you use spynext, you can see a "ghost" of yourself from the other player's POV if you are in their line of sight to the x/y position you had changed your view from. The "ghost" can also move if you try inputting movement. Best way to test this is in coop with two clients, one as spectator and another in-game.
2) Sound is played relative to the normal player's position and not the person who is being spied on. I'm not sure if this decision was deliberately made by a dev before spectating was introduced to prevent some sort of unfair advantage in-game, but it is very annoying when you're spectating.
1) This isn't supposed to happen, but I can understand why it's doing that. Unless it also shows "ghosts" of OTHER spectators, then I'm bewildered.
2) Vanilla spynext also does this. This should be fixed, especially for spectators.
(In reply to comment #1)
> 2) Vanilla spynext also does this. This should be fixed, especially for
This causes a fundamental problem. Should we respect how vanilla operates spynext, or do we update the code to be more in line with modern FPS's? Perhaps an amalgamation where vanilla-style spynext applies while in-game, while a modern spynext applies to those who are spectating?
Yup, (1) is a bug
reassigning to GhostlyDeath
At line 907, add the following (Huge gaps are tabs)
// GhostlyDeath -- Don't draw yourself if you are spectating
if (thing->player && (thing->player == &consoleplayer()) && consoleplayer().spectator)
This will fix bug 1, and the sound issues could probably just be changing consoleplayer() to displayplayer()
I don't recommend changing the way sound works when using spynext in coop. Having sound from your perspective when spynext-ing a coop partner allows you to still maintain some status on what's going on where you are standing. For example, it's good to be able to hear when enemies are firing at you so you can un-spynext. Having played countless hours of vanilla coop, I know how useful this is. This behavior is useless for spectators, though, so your sound should change depending on your POV.
(In reply to comment #5)
> in client/src/r_things.cpp
> At line 907, add the following (Huge gaps are tabs)
> // GhostlyDeath -- Don't draw yourself if you are spectating
> if (thing->player && (thing->player == &consoleplayer()) &&
> This will fix bug 1, and the sound issues could probably just be changing
> consoleplayer() to displayplayer()
applied in r765
updating description to "Spynext maintains original sound position"
updating description to "Spynext maintains original sound position for spectators"
Fixed in r915 and tested, works as expected