Open m4son opened 2 years ago
I have a guess why. When chase cam is external, it copies stats: https://github.com/Raptor007/aq2-tng/blob/a268e2410afff708ce93acf48102325b3f7c0558/source/g_chase.c#L138 https://github.com/Raptor007/aq2-tng/blob/a268e2410afff708ce93acf48102325b3f7c0558/source/g_chase.c#L204 But if chase cam is in-eyes, it only copies stats if the server doesn't support clientNum, which is unlikely: https://github.com/Raptor007/aq2-tng/blob/a268e2410afff708ce93acf48102325b3f7c0558/source/g_chase.c#L214 https://github.com/Raptor007/aq2-tng/blob/a268e2410afff708ce93acf48102325b3f7c0558/source/g_chase.c#L245
I believe clientNum is supposed to handle spectating such that the stats don't need to be copied, but perhaps mvdspec is missing that part. If my guess is right, the easy solution would be to always copy client->ps.stats
from targ->client->ps.stats
even when using clientNum, but I'll have to check there's no downside that made a previous coder choose not to do it this way.
Clarification: Do you mean the on-screen stats, or the console death messages?
If it's about console printing, there's probably some tweak that needs to be made in PrintDeathMessage for mvdspec, though I don't see why it would be different for in-eyes spectating: https://github.com/Raptor007/aq2-tng/blob/a268e2410afff708ce93acf48102325b3f7c0558/source/p_client.c#L641-L649
You got it right, its about console death messages.
Hm, i thought its intended that sometimes when action is far away, we dont get kill prints or was i wrong aboout this whole time :D
It's intended that in teamplay, only the killer, the killed, and anyone else not alive (whether spectating or dead) gets the messages. It's to prevent people who are alive from knowing when other players die that they didn't kill.
Spectators should always get the messages, since they're not alive players. This is being determined by other->solid == SOLID_NOT
which maybe isn't correct for mvdspec or in-eyes chase cam.
Aha, makes sense. So, mvdspec gets all the data as if he was alive player. Can we "hack" this :thinking:
It shouldn't consider them alive if they're a spectator. I think that's the bug. Maybe PrintDeathMessage needs to check !IS_ALIVE(other)
instead of just SOLID_NOT, or specifically check the spectator and mvdspec flags as it loops over players.
https://github.com/Raptor007/aq2-tng/blob/a268e2410afff708ce93acf48102325b3f7c0558/source/g_local.h#L2026
This might be a little more complicated than I thought. It's probably related to ent->client->clientNum
which is the only significant difference I can think of between in-eyes or chase cam.
What is your server's value for sv_mvd_spawn_dummy
? I suspect there's a connection to these Q2Pro issues:
https://github.com/skullernet/q2pro/issues/3
https://github.com/skullernet/q2pro/issues/36
I have checked the cvar and it's set to 1 I can check again this issue tomorrow when there are pickups played, just to make 100% sure
Well, I figured it out that this is a q2pro issue and not TNGs.
Okay, if you're sure. It might be possible for TNG to work around the issue by temporarily resetting clientNum
values in the PrintDeathMessage
loop.
We can still try :-)
Yeah I'll give it a try. If this method works, perhaps it would make sense to intercept all gi.cprintf
and adjust clientNum
, similar to how the bots branch does it:
https://github.com/Raptor007/aq2-tng/blob/deaf34cc3d69ec13567b5607041a0968abcd089a/source/acesrc/acebot_cmds.c#L200-L216
Yesterday, the caster on twitch had a problem figuring out how many players are alive on each team, since mvdspec doesn't get all the information when spectating in-eyes, while in free float he gets all the death/frags correct. Is it possible that we could fix that for in-eyes mode for mvdspec?