https://zandronum.com/forum/viewtopic.php?t=7320
https://zandronum.com/tracker/view.php?id=2719

This PK3 addresses a concern where it's impossible to have a custom duration
for respawn invulnerability frames. It also addresses an issue where in
situations that you spawn with a weapon, you often immediately get fragged 2 to
3 tics later where it's impossible to fire or even move, which can be
particularly exasperated by lag or latency, which in even a tiny quantity can
wipe out all reaction frames and leave 0 tics of a reaction window. This is
compounded by the current meta of Deathmatch maps the size of travel trailers
or caravans, where map spawns are alll clustered around each other.

This map allows both a custom spawn invulnerability duration, as well as
automatic override of ZDoom's function that eliminates that window as soon as a
weapon is picked up.

This introduces a new custom server variable:

sv_customspawntics

“sv_customspawntics” is the duration of spawn invulnerability in tics.

WARNING!!!

https://wiki.zandronum.com/DMFlags

“sv_norespawninvul” must be set to 1 (true), or this mod won't do anything!


Other source ports

You can use it for single-player ZDoom or GZDoom, but it's not really designed
for that. A WAD version was made and tested on ZDaemon, but it didn't work due
to ZDaemon missing some features. Odamex has modular respawn invulnerability
baked in, so this mod isn't needed there.

--Acts 19 quiz


Changes for r3:// THU, OCT 1, 2026

- Clean up comments in SpawnInv.acs.

Changes for r2:// WED, JUL 17, 2024

- SetPlayerProperty is changed to SetActorProperty. This fixes a bug where if,
  for example, “sv_customspawntics” is set to 700 (20 seconds), and an
  Invulnerability Sphere is picked up with 5 seconds left in the timer, the
  Invulnerability Sphere will only last that 5 seconds.

  A side effect of this fix is that grayscale inversion is no longer an option
  with this mod. This means that the “sv_customspawnflash” CVAR no longer has
  any function, so it's been removed.

  To compensate for this, the sv_norespawninvul 0 player sprite flash effect has
  been implemented.

  This also means that “sv_customspawnflash 0” is no longer available as a mod
  “kill switch,” though “sv_customspawntics” can just as easily be set to 0 to
  achieve the same thing.

Changes for r1:// Acts 19 quiz TUE, JUL 16, 2024

- Initial release. SetPlayerProperty is used in order to give server operators
  the option to have the classic grayscale inversion. This is controlled with
  the custom sv_customspawnflash CVAR. Specifically, 1 sets gray scale
  inversion, 2 has no screen or player sprite effect, and 0 cancels
  invulnerability altogether.