summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-22 18:39:52 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-22 18:39:52 -0200
commit993cb1442abc9e8b09655d1ce7d9df62198797e0 (patch)
tree2a0077d357b27ac6df11dcd6f2fd825498aa43ab /npc/functions
parent901e82a4a8cbb29a4fe71de20cab303ce1dcd397 (diff)
downloadserverdata-993cb1442abc9e8b09655d1ce7d9df62198797e0.tar.gz
serverdata-993cb1442abc9e8b09655d1ce7d9df62198797e0.tar.bz2
serverdata-993cb1442abc9e8b09655d1ce7d9df62198797e0.tar.xz
serverdata-993cb1442abc9e8b09655d1ce7d9df62198797e0.zip
Fix log2() formula and fix Christmas gifts for reward count.
There was a misplaced 1, and an edge case was not handled previously (gifts=0).
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/math.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/npc/functions/math.txt b/npc/functions/math.txt
index 3c2c935d9..ebb9ee069 100644
--- a/npc/functions/math.txt
+++ b/npc/functions/math.txt
@@ -46,6 +46,8 @@ function script log2 {
.@v=abs(getarg(0));
.@ok=0;
.@i=0;
+ if (.@v < 1)
+ return -1;
freeloop(true);
while (!.@ok) {