]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Damage leaning: Only lean the player if damage was caused by a weapon. This should...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 18 Nov 2011 23:25:55 +0000 (01:25 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 18 Nov 2011 23:25:55 +0000 (01:25 +0200)
data/defaultVT.cfg
data/qcsrc/server/g_damage.qc

index e02ac84357c1e033e5c1e4c9378c98148e0ff377..b23a2d44be12575f08535d94c83669dcf7e42bfa 100644 (file)
@@ -306,7 +306,7 @@ set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the p
 set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"\r
 set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"\r
 \r
-set g_leanplayer_damage 0.1 "lean players that are shot by this amount, based on the force they take"\r
+set g_leanplayer_damage 0.3 "lean players that are shot by this amount, based on the force they take"\r
 set g_leanplayer_damage_fade 0.95 "how fast players return to normal angles, based on damage taken"\r
 set g_leanplayer_damage_max 10 "damage leaning is limited to this amount"\r
 set g_leanplayer_acceleration 0.05 "lean players as they accelerate, by this amount"\r
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