HeatThreshold will always be 0.0.
Given a weapon's RoundsPerClip and ShotDelay, it will take RoundsPerClip*ShotDelay seconds to fire all rounds nonstop.
If TotalHeat is 1.0, then OldHeatPerShot is 1.0/RoundsPerClip.
HeatRecoveryRate is 1.0/ReloadTime per second, so it is necessary to calculate HeatPerSecond.
It takes 1.0 seconds to shoot 1.0/ShotDelay rounds, using 1.0/(RoundsPerClip*ShotDelay) HeatPerSecond.
It is necessary that NewHeatPerSecond be HeatPerSecond+HeatRecoveryRate.
Once calculated, NewHeatPerSecond/(1.0/ShotDelay) is the desired HeatPerShot.
Putting it all together:
HeatPerShot = NewHeatPerSecond/(1.0/ShotDelay)
HeatPerShot = (HeatPerSecond+HeatRecoveryRate)/(1.0/ShotDelay)
HeatPerShot = ((1.0/(RoundsPerClip*ShotDelay))+HeatRecoveryRate)/(1.0/ShotDelay)
HeatPerShot = ((1.0/(RoundsPerClip*ShotDelay))+HeatRecoveryRate)*(ShotDelay/1.0)
HeatPerShot = ((1.0/RoundsPerClip)+(ShotDelay*HeatRecoveryRate))