mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-24 17:31:50 +00:00
Fixed a bug with layers without a "best" value tried to update it
This commit is contained in:
parent
cfc23834d4
commit
fc18275f8c
1 changed files with 1 additions and 1 deletions
|
@ -277,7 +277,7 @@ function fullLayerReset(layer) {
|
||||||
|
|
||||||
function addPoints(layer, gain) {
|
function addPoints(layer, gain) {
|
||||||
player[layer].points = player[layer].points.add(gain).max(0)
|
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)
|
if (player[layer].total) player[layer].total = player[layer].total.add(gain)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue