From: Dark Blue Date: Mon, 7 Aug 2023 16:46:01 +0000 (+0300) Subject: Nades: Improved onspawn nade refiring X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=952a96c0f09ae22408b583858a925b2397717d9a;p=xonotic%2Fxonotic-data.pk3dir.git Nades: Improved onspawn nade refiring --- diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 12997c0b5..eb7d1fa9b 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -1671,9 +1671,13 @@ MUTATOR_HOOKFUNCTION(nades, PlayerSpawn) { entity player = M_ARGV(0, entity); - player.nade_refire = (autocvar_g_nades_onspawn) - ? time + autocvar_g_nades_nade_refire - : time + autocvar_g_spawnshieldtime; + if (autocvar_g_nades_onspawn) + { + if (StatusEffects_active(STATUSEFFECT_SpawnShield, player)) + player.nade_refire = time + autocvar_g_spawnshieldtime; + } + else + player.nade_refire = time + autocvar_g_nades_nade_refire; if(autocvar_g_nades_bonus_client_select) STAT(NADE_BONUS_TYPE, player) = CS_CVAR(player).cvar_cl_nade_type;