View Single Post
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 03-13-2022 , 12:12   [L4D2] Every height and the fall damage it deals
Reply With Quote #1

This was fetched from No Mercy Rooftop Finale, and tested on the out of map falling area all the way to the skybox.

Given that you're only falling without moving forward, backward, left or right.

I wanted to get a more accurate checker but until then, enjoy.

Feel free to help me fetch the actual formula in a way that works.

The syntax is:

{ height, damage },
{ height, damage },

Here's a duplicate disabled version of it, note that the precision it was generated with was 2.5 units.

Code:
	// 137.5 is the lowest point of fall damage, making you take 0.000000 damage.
	float fDistancesVsDamages[][] = {
		{157.5,   2.777781    },
		{ 177.5,  11.111101   },
		{ 197.5,  24.999961   },
		{ 220.0,  44.444358   },
		{ 242.5,  69.44429    },
		{ 265.0,  99.999771   },
		{ 290.0,  136.110794  },
		{ 315.0,  177.777343  },
		{ 340.0,  224.99942   },
		{ 367.5,  277.777038  },
		{ 397.5,  336.110198  },
		{ 425.0,  399.998962  },
		{ 455.0,  469.443115  },
		{ 485.0,  544.442932  },
		{ 517.5,  624.998352  },
		{ 550.0,  711.10913   },
		{ 582.5,  802.775573  },
		{ 617.5,  899.99768   },
		{ 652.5,  1002.775695 },
		{ 687.5,  1111.109375 },
		{ 725.0,  1224.998413 },
		{ 762.5,  1344.443115 },
		{ 802.5,  1469.443481 },
		{ 840.0,  1599.999389 },
		{ 882.5,  1736.111083 },
		{ 922.5,  1877.777832 },
		{ 965.0,  2025.000976 },
		{ 1007.5, 2177.779052 },
		{ 1052.5, 2336.112548 },
		{ 1097.5, 2500.002441 },
		{ 1142.5, 2669.447265 },
		{ 1190.0, 2844.447998 },
		{ 1237.5, 3025.00415  },
		{ 1285.0, 3211.115722 },
		{ 1335.0, 3402.783691 },
		{ 1385.0, 3600.006591 },
		{ 1437.5, 3802.785156 },
		{ 1487.5, 4011.11914  },
		{ 1540.0, 4225.008789 },
		{ 1595.0, 4444.454589 },
		{ 1650.0, 4669.455078 },
		{ 1705.0, 4900.012207 },
		{ 1762.5, 5136.124023 },
		{ 1820.0, 5377.791015 },
		{ 1877.5, 5625.014648 },
		{ 1937.5, 5877.793457 },
		{ 1997.5, 6136.128417 },
		{ 2057.5, 6400.018554 },
		{ 2120.0, 6669.463378 },
		{ 2182.5, 6944.464843 },
		{ 2245.0, 7225.022949 },
		{ 2310.0, 7511.135253 },
		{ 2375.0, 7802.802246 },
		{ 2440.0, 8100.025878 },
		{ 2507.5, 8402.804687 },
		{ 2577.5, 8711.138671 },
		{ 2645.0, 9025.02539  },
		{ 2715.0, 9344.46875  },
		{ 2785.0, 9669.467773 },
		{ 2857.5, 10000.021484},
		{ 2930.0, 10336.130859},
		{ 3002.5, 10677.794921},
		{ 3077.5, 11025.015625},
		{ 3152.5, 11377.791992},
		{ 3227.5, 11736.123046},
		{ 3305.0, 12100.010742},
		{ 3382.5, 12469.452148},
		{ 3462.5, 12844.450195},
		{ 3540.0, 13225.004882},
		{ 3622.5, 13611.111328},
		{ 3702.5, 14002.777343},
		{ 3785.0, 14399.995117},
		{ 3867.5, 14802.771484},
		{ 3952.5, 15211.103515},
		{ 4037.5, 15624.988281},
		{ 4122.5, 16044.430664},
		{ 4210.0, 16469.425781},
		{ 4297.5, 16899.980468},
		{ 4385.0, 17336.089843},
		{ 4475.0, 17777.751953},
		{ 4565.0, 18224.970703},
		{ 4657.5, 18677.74414 },
		{ 4747.5, 19136.076171},
		{ 4840.0, 19599.96289 },
		{ 4935.0, 20069.402343},
		{ 5030.0, 20544.40039 },
		{ 5125.0, 21024.949218},
		{ 5222.5, 21511.058593},
		{ 5320.0, 22002.724609},
		{ 5417.5, 22499.941406},
		{ 5517.5, 23002.714843},
		{ 5617.5, 23511.042968},
		{ 5717.5, 24024.929687},
		{ 5820.0, 24544.371093},
		{ 5922.5, 25069.365234},
		{ 6025.0, 25599.917968},
		{ 6130.0, 26136.023437},
		{ 6235.0, 26677.685546},
		{ 6340.0, 27224.90625 },
		{ 6447.5, 27777.679687},
		{ 6557.5, 28336.003906},
		{ 6665.0, 28899.890625},
		{ 6775.0, 29469.330078},
		{ 6885.0, 30044.326171},
		{ 6997.5, 30624.880859},
		{ 7110.0, 31210.980468},
		{ 7222.5, 31802.642578},
		{ 7337.5, 32399.863281},
		{ 7452.5, 33002.636718},
		{ 7567.5, 33610.96875 },
		{ 7685.0, 33764.0625  }
	};
Attached Files
File Type: log karma_var.log (241.8 KB, 55 views)
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 03-13-2022 at 13:21.
eyal282 is offline