]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_instagib.qc
Merge branch 'master' into TimePath/global_self
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_instagib.qc
index 30810c82e4c7f84f6ec99de7df65f07b6afc8036..384c297808aa29ea61d34f8bd5ed0fd57bb06ea7 100644 (file)
@@ -249,12 +249,17 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerDamage)
 
        if(IS_PLAYER(frag_target))
        {
-               if ((frag_deathtype == DEATH_FALL)  ||
-                       (frag_deathtype == DEATH_DROWN) ||
-                       (frag_deathtype == DEATH_SLIME) ||
-                       (frag_deathtype == DEATH_LAVA))
+               if(frag_deathtype == DEATH_FALL)
+                       frag_damage = 0; // never count fall damage
+
+               if(!autocvar_g_instagib_damagedbycontents)
+               switch(frag_deathtype)
                {
-                       frag_damage = 0;
+                       case DEATH_DROWN:
+                       case DEATH_SLIME:
+                       case DEATH_LAVA:
+                               frag_damage = 0;
+                               break;
                }
 
                if(IS_PLAYER(frag_attacker))
@@ -337,6 +342,9 @@ MUTATOR_HOOKFUNCTION(instagib_FilterItem)
        {
                entity e = spawn();
                setorigin(e, self.origin);
+               e.noalign = self.noalign;
+        e.cnt = self.cnt;
+        e.team = self.team;
                SELFCALL(e, spawnfunc_item_minst_cells());
                SELFCALL_DONE();
                return true;