Closed darkshade9 closed 2 years ago
This looks like something to be solved in TNG, and may be related to some of the code mentioned in issue #27.
I think I see it. My guess is the hurt brush flag spawnflags & 16
is meant to specify whether damage is dealt once per second or 10 times per second, but instead of 10 per second it may be happening on every frame:
https://github.com/Raptor007/aq2-tng/blob/35db97fcd9dd9ff349697907639345b0553790bd/source/g_trigger.c#L475-L478
Most likely this would be the fix:
if (self->spawnflags & 16)
self->timestamp = level.time + 1;
else
self->timestamp = level.time + 0.1;
But I'd like to test a few maps with hurt brushes to make sure this is a good fix that doesn't cause other problems.
Yes, this fix seems to work. Didn't break any edge cases that I could find.
It looks like that's been set to FRAMETIME since waaay back before sv_fps was added, when they were expecting it to be a hard-coded constant 0.1: https://github.com/Raptor007/aq2-tng/blame/40c9508c6768149c7d9c11974bc65a221cdb77dd/source/g_trigger.c#L462-L465
Good catch there, it felt like a framing issue sped up by the sv_fps addition. The cacti in tequila didn't seem to do much more damage but the spiked door in police did an absolute massive amount.
I think the cacti in tequila use spawnflags & 16
to deal damage once per second, so they shouldn't have been effected by this sv_fps issue. Actually I think most map hurt brushes do, which is probably why this problem was not noticed sooner.
I left an issue on q2pro's Github but I thought I'd also bring it up here since TNG is one of the exclusive users of sv_fps. There's a significant difference in hurt brush rate of damage and sv_fps, as show in this video:
https://youtu.be/9DgUibXAysk
I don't have a 'control' test at the moment to test on a server that does not have variable FPS enabled, but I'm certain that this is doing a lot more player damage than on a server that doesn't have it.
If this is unrelated to TNG at all feel free to close and hope that Q2Pro could address it somehow?