diff --git a/Source/Contents/Navigation/NavigationSource.cpp b/Source/Contents/Navigation/NavigationSource.cpp index 61007472b..8ea09b953 100644 --- a/Source/Contents/Navigation/NavigationSource.cpp +++ b/Source/Contents/Navigation/NavigationSource.cpp @@ -14,6 +14,7 @@ template __declspec(noinline) bool std::_Traits_equal>(const char*, std::size_t, const char*, std::size_t) noexcept; template __declspec(noinline) std::vector::vector(const std::size_t, const char&, const std::allocator&); +template __declspec(noinline) void std::vector::push_back(const PathCell&); // GLOBAL: gl_24627 CNavigationManager g_navigationManager; @@ -654,7 +655,7 @@ int CNavigationManager::RouteFromPlayer() { if (this->data.GetInfo() == info) { const int type = this->savedTarget.type; if (type != 2 && type != 0) { - int code = type == 1 ? 6 : -96; + int code = type != 1 ? -96 : 6; if (type == 3) { code = 8; } @@ -679,7 +680,7 @@ int CNavigationManager::RouteFromPlayer() { this->currentTarget = this->savedTarget; this->LoadTargetPreview(); const int targetType = this->savedTarget.type; - result = targetType == 2 ? 7 : -96; + result = targetType != 2 ? -96 : 7; this->drawRoute = true; this->routeFlag = true; this->drawDestination = true; @@ -733,8 +734,7 @@ int CNavigationManager::RouteFromPlayer() { NaviCell cellX; NaviCell cellY; if (start.x == this->nodes[0]->GetCell(&cellX)->x && start.y == this->nodes[0]->GetCell(&cellY)->y) { - PathCell point = {start.x, start.y, 0, 0}; - this->movementRoute.points.push_back(point); + this->movementRoute.points.push_back({start.x, start.y, 0, 0}); } else if (!this->BuildRoute(start.x, start.y, this->nodes[0]->GetCell(&cellX)->x, this->nodes[0]->GetCell(&cellY)->y, true)) { goto search; }