]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/sv_main.qc
Use pow() for all scale differences, which should make them much more correct, and...
[voretournament/voretournament.git] / data / qcsrc / server / sv_main.qc
index 02ebff8c7bdde04468b53f5d4c5fc83117853861..2b86df7e56e9d66d403d47cc7beb3d32150d306d 100644 (file)
@@ -74,14 +74,10 @@ void CreatureFrame (void)
                                        dm = (dm - cvar("g_balance_falldamage_deadminspeed")) * cvar("g_balance_falldamage_factor");\r
                                else\r
                                        dm = min((dm - cvar("g_balance_falldamage_minspeed")) * cvar("g_balance_falldamage_factor"), cvar("g_balance_falldamage_maxdamage"));\r
+                               if(cvar("g_healthsize")) // if we are smaller or larger, we take more or less falling damage\r
+                                       dm *= (1 + cvar("g_healthsize_movementfactor")) - cvar("g_healthsize_movementfactor") * self.scale; \r
                                if (dm > 0)\r
-                               {\r
                                        Damage (self, world, world, dm, DEATH_FALL, self.origin, '0 0 0');\r
-                                       // this must be allowed to cut the normal pain sounds (played after them and on the same channel)\r
-                                       // there's no way to detect falling damage and prevent the pain sounds for this to be played instead\r
-                                       if(self.health > 0)\r
-                                               PlayerSound(self, playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
-                               }\r
                                else if(vlen(self.velocity) > 100000 && cvar("developer"))\r
                                {\r
                                        dprint(strcat(self.netname, " became too fast, please investigate: ", vtos(self.spawnorigin), "\n"));\r