Decompile 2 functions in Source/Contents/NavigationRequest.cpp
Batch #15911 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_19420 FindNaviObjectByName: logic confirmed by peer review - fn_19598 CNavigationManager::RequestRoute: logic confirmed by peer review Peer-reviewed-by: Yommy, alisonrag, Toshiro Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
de733c14b3
commit
c62a2808a0
1 changed files with 16 additions and 15 deletions
|
|
@ -14,8 +14,9 @@
|
|||
// FUNCTION: fn_19420
|
||||
__declspec(noinline) CNavi_Object* FindNaviObjectByName(const char* name, const std::vector<CNavi_Object*>& objects) {
|
||||
for (std::vector<CNavi_Object*>::const_iterator it = objects.begin(); it != objects.end(); ++it) {
|
||||
const CNavi_Object* object = *it;
|
||||
if (name) {
|
||||
if ((*it)->name == std::string(name)) {
|
||||
if (object->name == std::string(name)) {
|
||||
return *it;
|
||||
}
|
||||
}
|
||||
|
|
@ -215,20 +216,20 @@ int CNavigationManager::RequestRoute(int cellX, int cellY) {
|
|||
int startX = 0;
|
||||
int startY = 0;
|
||||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
if (mode == nullptr) {
|
||||
return -95;
|
||||
if (mode != nullptr) {
|
||||
mode->PlayerCell(&startX, &startY);
|
||||
this->UpdateGround();
|
||||
if (!this->BuildRoute(startX, startY, destX, destY, false)) {
|
||||
return -99;
|
||||
}
|
||||
this->data.SetDestination(target, destX, destY);
|
||||
this->drawRoute = true;
|
||||
this->routeFlag = true;
|
||||
this->drawDestination = true;
|
||||
this->viewMode = 2;
|
||||
return 9;
|
||||
}
|
||||
mode->PlayerCell(&startX, &startY);
|
||||
this->UpdateGround();
|
||||
if (!this->BuildRoute(startX, startY, destX, destY, false)) {
|
||||
return -99;
|
||||
}
|
||||
this->data.SetDestination(target, destX, destY);
|
||||
this->drawRoute = true;
|
||||
this->routeFlag = true;
|
||||
this->drawDestination = true;
|
||||
this->viewMode = 2;
|
||||
return 9;
|
||||
return -95;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B8E350
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue