From: terencehill Date: Sun, 7 Feb 2021 11:32:31 +0000 (+0100) Subject: LMS: don't show "respawning in x seconds" after losing your last life (the same trick... X-Git-Tag: xonotic-v0.8.5~574 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=a484f02bf41c9209e15fd5383edce791655a28b2 LMS: don't show "respawning in x seconds" after losing your last life (the same trick is used in CA) --- diff --git a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc index ba45f6e7e..d35da5186 100644 --- a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc +++ b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc @@ -174,6 +174,13 @@ MUTATOR_HOOKFUNCTION(lms, PlayerDies) { entity frag_target = M_ARGV(2, entity); + float tl = GameRules_scoring_add(frag_target, LMS_LIVES, 0); + if (tl <= 0) + { + frag_target.respawn_flags = RESPAWN_SILENT; + // prevent unwanted sudden rejoin as spectator and movement of spectator camera + frag_target.respawn_time = time + 2; + } frag_target.respawn_flags |= RESPAWN_FORCE; }