Make falling damage depend on size (especially since we can run slower or faster...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 20:02:39 +0000 (23:02 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 20:02:39 +0000 (23:02 +0300)
data/qcsrc/server/sv_main.qc

index 1a26c72facdfccac0f6c464766f5470b49adfc21..4fadff7683237ceddfb238bf1f8db4a6fd9a7b23 100644 (file)
@@ -70,6 +70,8 @@ void CreatureFrame (void)
                        if(!(g_cts && !cvar("g_cts_selfdamage")))\r
                        {\r
                                dm = vlen(self.oldvelocity) - vlen(self.velocity); // dm is now the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage.\r
+                               if(self.scale) // we are smaller or larger, so we take more or less falling damage\r
+                                       dm *= (1 + cvar("g_healthsize_movementfactor")) - cvar("g_healthsize_movementfactor") * self.scale; \r
                                if (self.deadflag)\r
                                        dm = (dm - cvar("g_balance_falldamage_deadminspeed")) * cvar("g_balance_falldamage_factor");\r
                                else\r