Skip to content

Commit

Permalink
Core/Maps: Use IsValidMapCoord for checking Z coord instead of just s…
Browse files Browse the repository at this point in the history
…td::isfinite - only acceptable values are between -17066.6656 and 17066.6656

(cherry picked from commit 4d956c8)
  • Loading branch information
Shauren committed Feb 9, 2016
1 parent 25cdc5d commit 761c82e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
3 changes: 0 additions & 3 deletions src/server/game/Achievements/AchievementMgr.cpp
Expand Up @@ -1909,9 +1909,6 @@ bool AchievementMgr::RequirementsSatisfied(AchievementCriteriaEntry const* achie
if (!area)
break;

if (area->exploreFlag < 0)
continue;

uint32 playerIndexOffset = uint32(area->exploreFlag) / 32;
if (playerIndexOffset >= PLAYER_EXPLORED_ZONES_SIZE)
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Grids/GridDefines.h
Expand Up @@ -226,7 +226,7 @@ namespace Trinity

inline bool IsValidMapCoord(float x, float y, float z)
{
return IsValidMapCoord(x, y) && std::isfinite(z);
return IsValidMapCoord(x, y) && IsValidMapCoord(z);
}

inline bool IsValidMapCoord(float x, float y, float z, float o)
Expand Down
14 changes: 0 additions & 14 deletions src/server/scripts/Commands/cs_misc.cpp
Expand Up @@ -1060,13 +1060,6 @@ class misc_commandscript : public CommandScript
return false;
}

if (area->exploreFlag < 0)
{
handler->SendSysMessage(LANG_BAD_VALUE);
handler->SetSentErrorMessage(true);
return false;
}

int32 offset = area->exploreFlag / 32;
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
Expand Down Expand Up @@ -1104,13 +1097,6 @@ class misc_commandscript : public CommandScript
return false;
}

if (area->exploreFlag < 0)
{
handler->SendSysMessage(LANG_BAD_VALUE);
handler->SetSentErrorMessage(true);
return false;
}

int32 offset = area->exploreFlag / 32;
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
Expand Down

0 comments on commit 761c82e

Please sign in to comment.