Working on navigation system

This commit is contained in:
Vladislav Khorev committed 2026-05-08 20:26:15 +03:00
1 parent d4bc73f732
commit a479fa4ac1
8 files changed
+481 -30

No files matched your search

+23
View File
@@ -473,6 +473,12 @@ namespace ZL
onPointerUp(ZL::UiManager::MOUSE_FINGER_ID, eventX, eventY, mx, my);
}
}
else if (event.button.button == SDL_BUTTON_RIGHT
&& event.type == SDL_MOUSEBUTTONUP
&& navigationEditorMode
&& currentLocation) {
currentLocation->navigationEditorHandleRightClick();
}
}
else if (event.type == SDL_MOUSEMOTION) {
int eventX = event.motion.x;
@@ -514,6 +520,17 @@ namespace ZL
currentLocation->dialogueSystem.startDialogue("test_cutscene_pan_dialogue");
break;
case SDLK_n:
navigationEditorMode = !navigationEditorMode;
if (currentLocation) {
currentLocation->navigationEditorMode = navigationEditorMode;
if (navigationEditorMode) {
currentLocation->navigationEditorBuildNavMeshes();
}
}
std::cout << "[NAV_EDITOR] Mode: " << (navigationEditorMode ? "ON" : "OFF") << std::endl;
break;
case SDLK_o:
//y = y + 0.002;
//currentLocation->player->hp = 200;
@@ -543,6 +560,12 @@ namespace ZL
activateSlowMoEffect();
break;
case SDLK_b:
if (navigationEditorMode && currentLocation) {
currentLocation->navigationEditorSave();
}
break;
case SDLK_j:
menuManager.toggleQuestJournal();
break;