X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator%2Fgamemode_freezetag.qc;fp=qcsrc%2Fserver%2Fmutators%2Fmutator%2Fgamemode_freezetag.qc;h=36546c43a03bebc34c5875416e7b26473a5a364d;hb=bcfb2c28a83d43a76cdc18de1f00b4d191da55e5;hp=2ea70c1f1ac16971c6af11a3aa33a4b3f3b0f9d5;hpb=0df9efc608a567dcbff2f81680174626a43e78aa;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc index 2ea70c1f1..36546c43a 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -20,10 +20,10 @@ void freezetag_count_alive_players() } }); FOREACH_CLIENT(IS_REAL_CLIENT(it), { - it.redalive_stat = redalive; - it.bluealive_stat = bluealive; - it.yellowalive_stat = yellowalive; - it.pinkalive_stat = pinkalive; + STAT(REDALIVE, it) = redalive; + STAT(BLUEALIVE, it) = bluealive; + STAT(YELLOWALIVE, it) = yellowalive; + STAT(PINKALIVE, it) = pinkalive; }); eliminatedPlayers.SendFlags |= 1; @@ -465,10 +465,10 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST) if(n && STAT(FROZEN, player) == 1) // OK, there is at least one teammate reviving us { - player.revive_progress = bound(0, player.revive_progress + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1); - player.health = max(1, player.revive_progress * ((warmup_stage) ? warmup_start_health : start_health)); + STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1); + player.health = max(1, STAT(REVIVE_PROGRESS, player) * ((warmup_stage) ? warmup_start_health : start_health)); - if(player.revive_progress >= 1) + if(STAT(REVIVE_PROGRESS, player) >= 1) { freezetag_Unfreeze(player); freezetag_count_alive_players(); @@ -493,18 +493,18 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST) } FOREACH_CLIENT(IS_PLAYER(it) && it.reviving, { - it.revive_progress = player.revive_progress; + STAT(REVIVE_PROGRESS, it) = STAT(REVIVE_PROGRESS, player); it.reviving = false; }); } else if(!n && STAT(FROZEN, player) == 1) // only if no teammate is nearby will we reset { - player.revive_progress = bound(0, player.revive_progress - frametime * autocvar_g_freezetag_revive_clearspeed, 1); - player.health = max(1, player.revive_progress * ((warmup_stage) ? warmup_start_health : start_health)); + STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) - frametime * autocvar_g_freezetag_revive_clearspeed, 1); + player.health = max(1, STAT(REVIVE_PROGRESS, player) * ((warmup_stage) ? warmup_start_health : start_health)); } else if(!n && !STAT(FROZEN, player)) { - player.revive_progress = 0; // thawing nobody + STAT(REVIVE_PROGRESS, player) = 0; // thawing nobody } return true;