]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/g_damage.qc
Don't attempt to assign some values to the world when shooting it
[voretournament/voretournament.git] / data / qcsrc / server / g_damage.qc
index 65e2c0920287a1fba9cdb210d0a29fde8f0ae7de..a628a8921374355657ad5f16c4af335b9524415a 100644 (file)
@@ -863,7 +863,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(WEP_VALID(DEATH_WEAPONOF(deathtype))) // only for damage caused by weapons\r
+               if(targ.classname == "player" && 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