]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
stop the slap if player dies! Why did I not do this before >:(
authorFruitieX <fruitiex@gmail.com>
Fri, 15 Apr 2011 18:07:38 +0000 (21:07 +0300)
committerFruitieX <fruitiex@gmail.com>
Fri, 15 Apr 2011 18:07:38 +0000 (21:07 +0300)
qcsrc/server/w_shotgun.qc

index 38ae17a24f579e6ef4ea2d05a849f4a812e3dd1f..adcb7db4ddfe355c157063504da72ed7f317fdad 100644 (file)
@@ -77,7 +77,7 @@ void shotgun_meleethink (void)
                Damage (trace_ent, self.owner, self.owner, autocvar_g_balance_shotgun_secondary_damage * min(1, f + 1), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
                remove(self);
        }
-       else if(time >= self.cnt + meleetime) // missed, remove ent
+       else if(time >= self.cnt + meleetime || self.owner.deadflag != DEAD_NO) // missed or owner died, remove ent
                remove(self);
        else // continue swinging the weapon in hope of hitting someone :)
                self.nextthink = time;