agmodx icon indicating copy to clipboard operation
agmodx copied to clipboard

Make mp_respawn_fix 1 a bit faster

Open gundogfan opened this issue 1 year ago • 2 comments

I got some complaints about this command on my sv. When disabled obviosuly those with high FPS will respawn just too fast, but when enabled it's even worse, it's too slow.

With mp_respawn_fix 1 respawning takes almost 2 seconds while fps_max 125 takes 1.2 seconds approx. It may not be a big difference (less than a second) but especially for Crossfire players it's insanely slow, at high level it's impossible to stop the respawn killing spree if it takes you almost 2 seconds to go back in track and kill the one controlling the map.

Is it possible to pair it with the respawning time of 125fps? or even better, 250fps. Not saying 500 cause yeah it'll be too much.

gundogfan avatar Mar 02 '23 17:03 gundogfan

Well, I did set the value according to players who play at 125fps, which is 0.95 seconds. The calculation of that value takes into consideration the old behaviour which expect 120 frames from the player to be able to spawn, which means:

  • If you play at 60fps, you would be able to spawn after 120/60 = 2 seconds.
  • If you play at 72fps (default HL fps value), you would be able to spawn after 120/72 = 1.65 seconds.
  • If you play at 125fps, you would be able to spawn after 120/125 = 0.96 seconds.
  • If you play at 144fps, you would be able to spawn after 120/144 = 0.83 seconds.
  • If you play at 500fps, you would be able to spawn after 120/500 = 0.24 seconds.
  • If you play at 1000fps, you would be able to spawn after 120/1000 = 0.12 seconds.

You can modify the mp_respawn_fix delay value if you don't feel comfortable with mp_respawn_delay CVar.

Original code involved:

https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/player.cpp#L1295-L1297

Hope this clarifies a little bit what this does.

rtxa avatar Mar 03 '23 14:03 rtxa

mp_respawn_delay doesn't seem to work, it's as if the cvar didn't exist.

L 03/06/2023 - 04:05:48: [admincmd.amxx] Cmd: "HL1 ARGENTINA #3 (TDM/Arena)<0><><>" set cvar (name "mp_respawn_fix") (value "1") [AMXX] Cvar "mp_respawn_fix" changed to "1" [AMXX] Unknown cvar: mp_respawn_delay

gundogfan avatar Mar 06 '23 07:03 gundogfan