]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Properly fix the damage leaning bug
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 17:00:44 +0000 (19:00 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 17:00:44 +0000 (19:00 +0200)
data/qcsrc/server/g_damage.qc

index 22ed5de1ab1a68d1641b6abae6f25c32aacf35d8..86e1f1b47607d5b61f805238749bc775c87cb276 100644 (file)
@@ -867,9 +867,9 @@ 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
                {\r
-                       if(hitloc != targ.origin) // prevents a bug\r
-                               targ.leanangle_damage_loc = hitloc - targ.origin;\r
+                       targ.leanangle_damage_loc = hitloc - targ.origin;\r
                        targ.leanangle_damage_force += force * cvar("g_leanplayer_damage"); // keep existing force if any\r
 \r
                        // bound angles to the specified limit\r