1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-21 16:13:55 +00:00

Fixed a bug with layers without a "best" value tried to update it

This commit is contained in:
Acamaeda 2020-09-27 16:21:14 -04:00
parent cfc23834d4
commit fc18275f8c

View file

@ -277,7 +277,7 @@ function fullLayerReset(layer) {
function addPoints(layer, gain) {
player[layer].points = player[layer].points.add(gain).max(0)
player[layer].best = player[layer].best.max(player[layer].points)
if (player[layer].best) player[layer].best = player[layer].best.max(player[layer].points)
if (player[layer].total) player[layer].total = player[layer].total.add(gain)
}