music: use vanilla's volume percentage conversion

This commit is contained in:
Max Weber
2021-07-18 17:01:54 -06:00
parent 48c6434e6d
commit 8f6082081f

View File

@@ -861,7 +861,8 @@ public class MusicPlugin extends Plugin
public void updateVar()
{
int val = getValue();
client.getVarps()[this.var.getId()] = val * 100 / this.max;
int varVal = Math.round((float) val / (max / 100.f));
client.getVarps()[this.var.getId()] = varVal;
}
public void shutDown()