Xonotic Forums
Prevent respawn of players like in CA - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12)
+--- Thread: Prevent respawn of players like in CA (/showthread.php?tid=7232)

Prevent respawn of players like in CA - Lyberta - 03-04-2017

So I've spent like 5 hours searching through every line of CA gametype to see how it disables respawn of players. I can't replicate it. I was sure it is in PlayerDies or ForbidRespawn but the second is only called when client changes team from spectators. How to disallow respawn after death?

RE: Prevent respawn of players like in CA - Mario - 03-04-2017

Gametypes are a tough place to start if you're just getting used to the language and our codebase (both of which are large tasks). They have bits and pieces in a few places, not very organized yet.

CA in particular has a lot of weird hacks throughout the codebase to support what it does (keeping players as spectators but keeping their score and team). the .caplayer field for example tells other code not to change the player in too many ways.
The part that blocks joining though, would be in the CA mutator file, in the PutClientInServer hook. It transmutes the player back into an observer when they try to join.