diff --git a/Source/Contents/Navigation/NavigationRoute.cpp b/Source/Contents/Navigation/NavigationRoute.cpp index 2af9297b4..c29c7ddd2 100644 --- a/Source/Contents/Navigation/NavigationRoute.cpp +++ b/Source/Contents/Navigation/NavigationRoute.cpp @@ -68,7 +68,7 @@ void CNavigationManager::DrawRoute(const float* matrix) { const int lastX = last.x; const int lastY = last.y; - if (minX < lastX && lastX < maxX && minY < lastY && lastY < maxY) { + if (minX < lastX && maxX > lastX && minY < lastY && maxY > lastY) { visible = 1; std::uint32_t color; if (this->drawDestination && std::strcmp(g_session.m_navigationPlayerMap, this->data.GetInfo()->GetName()) == 0) { @@ -88,27 +88,26 @@ void CNavigationManager::DrawRoute(const float* matrix) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (mode && mode->scene && mode->scene->ground) { GroundGeometry* ground = mode->scene->ground; - const std::string name = FormatOwnedString("유저인터페이스\\navigation_interface3\\location%d.tga", g_locationFrame); - CTexture* texture = g_texMgr.Load(name.c_str(), 0, false, true, false); - ground->DrawTerrainOverlay(matrix, lastX, lastY, color, texture); + ground->DrawTerrainOverlay( + matrix, lastX, lastY, color, + g_texMgr.Load(FormatOwnedString("유저인터페이스\\navigation_interface3\\location%d.tga", g_locationFrame).c_str(), 0, false, true, false) + ); } } - const DWORD now = timeGetTime(); - const int blink = static_cast((now % 1000) / 100); + const int blink = static_cast(timeGetTime() % 1000 / 100); auto& points = this->movementRoute.points; if (points.size() - 1 != 0) { - CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); for (unsigned index = 0; index < points.size() - 1; index += 2) { const int x = points[index].x; const int y = points[index].y; - if (minX < x && x < maxX && minY < y && y < maxY) { + if (minX < x && maxX > x && minY < y && maxY > y) { ++visible; CTexture* texture = g_texMgr.Load(this->labels[points[index + 1].metadata].c_str(), 0, false, true, false); - constexpr float uv[8] = {0, 0, 1, 0, 0, 1, 1, 1}; + constexpr float uv[8] = {0, 0, 1, 0, 0, 1, 1, 1}; const std::uint32_t color = blink == static_cast(index) % 10 ? 0xEEFFFFFF : 0x99FFFFFF; - this->ground->DrawGridDecal(matrix, x, y, color, *texture, uv); + this->ground->DrawCellDecal(matrix, x, y, color, *texture, uv); } } } diff --git a/Source/UI/Party/UIRegisterPartyWnd.cpp b/Source/UI/Party/UIRegisterPartyWnd.cpp index 3619c78b3..3cfae26e9 100644 --- a/Source/UI/Party/UIRegisterPartyWnd.cpp +++ b/Source/UI/Party/UIRegisterPartyWnd.cpp @@ -90,7 +90,7 @@ void UIRegisterPartyWnd::OnCreate(int, int) { this->minimum->maximum = 3; this->minimum->Background(232, 232, 232); char number[10] = {}; - StringFormat(number, sizeof(number), _TRUNCATE, "%d", std::max((level - 5), 1)); + StringFormat(number, sizeof(number), _TRUNCATE, "%d", level - 5 > 1 ? level - 5 : 1); this->minimum->SetText(number); this->AddChild(this->minimum); @@ -100,8 +100,9 @@ void UIRegisterPartyWnd::OnCreate(int, int) { this->maximum->invalidatesParent = 1; this->maximum->maximum = 3; this->maximum->Background(232, 232, 232); - StringFormat(number, sizeof(number), _TRUNCATE, "%d", level + 5); - this->maximum->SetText(number); + char maximumNumber[10] = {}; + StringFormat(maximumNumber, sizeof(maximumNumber), _TRUNCATE, "%d", level + 5); + this->maximum->SetText(maximumNumber); this->AddChild(this->maximum); auto* typeLabel = new UIStaticText();