Skip to content

Machinegun cold/heat damage multipliers based on accumulated spread

Dr. Jaska requested to merge drjaska/mgdamageaccumulation into drjaska/mgspreaddecay

Follow-up to !889

Cold/Heat Damage Multiplier

It is now possible to configure additional damage increases reductions based on the spread accumulated. Based on if the "barrel" is "cold" or "hot".

There are 2 cvars which take multiplier numbers. The full scale of spread accumulation acts as a spectrum scale and the multipliers are applied as % based on how close spread accumulation is to their end of the spectrum. If there is 0 spread accumulation 100% of the "cold barrel" damage multiplier is used and 0% of the "heated up barrel" damage multiplier is used. If the spread accumulation is half way through the spectrum then 50% of each is applied. 25% accumulation means 75% of cold is applied and 25% of heat is applied.

Example where low end has halved damage and high end has tripled damage with 50% spread accumulation:

0.5 * 0.5) + (0.5 * 3) = 0.25 + 1.5 = 1.75 damage multiplier

Example where low end has halved damage and high end has tripled damage with 90% spread accumulation:

(0.1 * 0.5) + (0.9 * 3) = 0.05 + 2.7 = 2.75 damage multiplier

As spread accumulation and its spectrum is calculated as distance between lower value of spread_min and spread_max to support inverse spread, spread accumulation can be easily used to calculate the damage multiplier regardless if spread is inverse or not.

Edited by Dr. Jaska

Merge request reports