From: otta8634 Date: Sun, 16 Feb 2025 09:30:28 +0000 (+0800) Subject: Disallow stealing the nb ball while dead X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=01a4bbd52c34401c3832711340d0eaad643cb468;p=xonotic%2Fxonotic-data.pk3dir.git Disallow stealing the nb ball while dead Previously the ball could be stolen if the Ball Stealer secondary shot landed after the player who fired it was fragged. Now if it lands it'll still do knockback, but just not steal the ball. --- diff --git a/qcsrc/common/gamemodes/gamemode/nexball/sv_weapon.qc b/qcsrc/common/gamemodes/gamemode/nexball/sv_weapon.qc index d3d3a6a9d..7bb6c98c1 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/sv_weapon.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/sv_weapon.qc @@ -87,7 +87,7 @@ void W_Nexball_Touch(entity this, entity toucher) { toucher.velocity = toucher.velocity + normalize(this.velocity) * toucher.damageforcescale * autocvar_g_balance_nexball_secondary_force; UNSET_ONGROUND(toucher); - if(!attacker.ballcarried) + if(!attacker.ballcarried && !IS_DEAD(attacker)) { LogNB("stole", attacker); _sound(toucher, CH_TRIGGER, ball.noise2, VOL_BASE, ATTEN_NORM);