diff --git a/config/objects/rewardableGeneric.json b/config/objects/rewardableGeneric.json index 85a3f1270..5c48c25b4 100644 --- a/config/objects/rewardableGeneric.json +++ b/config/objects/rewardableGeneric.json @@ -49,7 +49,7 @@ }, "secondary" : { "@gainedSkill" : 1 - } + }, "message" : 171 // Witch teaches you skill } ], diff --git a/lib/IGameCallback.cpp b/lib/IGameCallback.cpp index 4efa55cab..503d1a8d7 100644 --- a/lib/IGameCallback.cpp +++ b/lib/IGameCallback.cpp @@ -97,7 +97,7 @@ void CPrivilegedInfoCallback::getTilesInRange(std::unordered_set & tiles, for (int yd = std::max(pos.y - radious, 0); yd <= std::min(pos.y + radious, gs->map->height - 1); yd++) { int3 tilePos(xd,yd,pos.z); - double distance = pos.dist(tilePos, distanceFormula); + int distance = pos.dist(tilePos, distanceFormula); if(distance <= radious) { diff --git a/lib/int3.h b/lib/int3.h index aa060703a..014c5c8fa 100644 --- a/lib/int3.h +++ b/lib/int3.h @@ -110,7 +110,7 @@ public: switch(formula) { case DIST_2D: - return static_cast(dist2d(o)); + return std::round(dist2d(o)); case DIST_MANHATTAN: return static_cast(mandist2d(o)); case DIST_CHEBYSHEV: