]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix vaporizer secondary causing player hurt sounds, fix impact effects in the sky
authorMario <zacjardine@y7mail.com>
Thu, 27 Nov 2014 03:43:06 +0000 (14:43 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 27 Nov 2014 03:43:06 +0000 (14:43 +1100)
qcsrc/client/damage.qc
qcsrc/server/cl_player.qc

index 32849c2ac6d3858a738bbd92f4a89f3185a33d81..64e12620dae961523bbafae3674579a9561e3744 100644 (file)
@@ -345,6 +345,6 @@ void Ent_DamageInfo(float isNew)
                        w_backoff = -1 * normalize(force);
                setorigin(self, w_org + w_backoff * 2); // for sound() calls
 
-               WEP_ACTION(hitwep, WR_IMPACTEFFECT);
+               if(!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)) { WEP_ACTION(hitwep, WR_IMPACTEFFECT); }
        }
 }
index 6fa60f96840de79488d5e768499cdc779fbd3aea..42863d61b7b6fd264b531a0a749edf2da6910169 100644 (file)
@@ -431,7 +431,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                                        }
 
                                        if(sound_allowed(MSG_BROADCAST, attacker))
-                                       if(!DEATH_ISWEAPON(deathtype, WEP_BLASTER) || attacker != self || self.health < 2 * WEP_CVAR_PRI(blaster, damage) * autocvar_g_balance_selfdamagepercent + 1) // WEAPONTODO: create separate limit for pain notification with laser
+                                       if((self.health < 2 * WEP_CVAR_PRI(blaster, damage) * autocvar_g_balance_selfdamagepercent + 1) || !((get_weaponinfo(DEATH_WEAPONOF(deathtype))).spawnflags & WEP_FLAG_CANCLIMB) || attacker != self) // WEAPONTODO: create separate limit for pain notification with laser
                                        if(self.health > 1)
                                        // exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two
                                        {