Fix addSoftcap not affecting currentAt or nextAt

This commit is contained in:
Anthony Lawn 2022-12-12 14:18:08 -06:00 committed by thepaperpilot
parent b8e498250b
commit 97faa20056

View file

@ -507,6 +507,8 @@ export function addSoftcap(
): ScalingFunction { ): ScalingFunction {
return { return {
...scaling, ...scaling,
currentAt: conversion => softcap(scaling.currentAt(conversion), unref(cap), Decimal.recip(unref(power))),
nextAt: conversion => softcap(scaling.nextAt(conversion), unref(cap), Decimal.recip(unref(power))),
currentGain: conversion => currentGain: conversion =>
softcap(scaling.currentGain(conversion), unref(cap), unref(power)) softcap(scaling.currentGain(conversion), unref(cap), unref(power))
}; };