]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/g_damage.qc
Damage leaning: Only lean the player if damage was caused by a weapon. This should...
[voretournament/voretournament.git] / data / qcsrc / server / g_damage.qc
index 86e1f1b47607d5b61f805238749bc775c87cb276..fc12a332b45f367fda5ca0e5586f8aeea33e6d0d 100644 (file)
@@ -867,7 +867,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 \r
                // lean the player based on the amount of damage taken\r
                if(cvar("g_leanplayer_damage"))\r
-               if(deathtype != DEATH_DIGESTION && deathtype != DEATH_STOMACHKICK && deathtype != DEATH_REGURGITATION) // prevents some bugs\r
+               if(WEP_VALID(DEATH_WEAPONOF(deathtype))) // only for damage caused by weapons\r
                {\r
                        targ.leanangle_damage_loc = hitloc - targ.origin;\r
                        targ.leanangle_damage_force += force * cvar("g_leanplayer_damage"); // keep existing force if any\r