Fixing minor bugs in scripts
This commit is contained in:
1 parent
80133aa8c8
commit
87fb6d4655
14 files changed
+490
-234
No files matched your search
+31
-1
@@ -247,6 +247,7 @@ namespace ZL
|
||||
"resources/navigation/uni_interior4_locked.json" //17
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
uniInteriorParams.navigationJsonPaths = {
|
||||
"resources/navigation/uni_interior3_darklands_all_open.json",
|
||||
@@ -310,7 +311,16 @@ namespace ZL
|
||||
locations["uni_exterior"]->setup(uniExteriorParams, &menuManager.questJournal);
|
||||
locations["uni_exterior"]->scriptEngine.setGlobalStore(&globalInts);
|
||||
locations["uni_exterior"]->scriptEngine.setGlobalFloatStore(&globalFloats);
|
||||
locations["uni_exterior"]->requestNightDayTransition = [this](bool isNight, bool isDawn) { this->menuManager.isNight = isNight; this->menuManager.isDawn = isDawn; };
|
||||
locations["uni_exterior"]->requestNightDayTransition = [this](bool isNight, bool isDawn) {
|
||||
this->menuManager.isNight = isNight;
|
||||
this->menuManager.isDawn = isDawn;
|
||||
/*for (auto& locPair : locations) {
|
||||
if (locPair.second) {
|
||||
locPair.second->isNight = isNight;
|
||||
locPair.second->isDawn = isDawn;
|
||||
}
|
||||
}*/
|
||||
};
|
||||
locations["uni_exterior"]->requestDarklandsTransition = [this]() { return startDarklandsTransition(); };
|
||||
locations["uni_exterior"]->requestClosePhone = [this]() { menuManager.closePhoneEntirely(); };
|
||||
locations["uni_exterior"]->requestReturnToMainMenu = [this]() { menuManager.showMainMenu(); };
|
||||
@@ -407,7 +417,12 @@ namespace ZL
|
||||
currentLocation->player->targetFacingAngle = destRotY;
|
||||
}
|
||||
currentLocation->cameraAzimuth = destRotY;
|
||||
currentLocation->isDarklands = isDarklands;
|
||||
currentLocation->isNight = menuManager.isNight;
|
||||
currentLocation->isDawn = menuManager.isDawn;
|
||||
currentLocation->scriptEngine.callLocationEnterCallback();
|
||||
|
||||
|
||||
menuManager.onLocationChanged(destName);
|
||||
};
|
||||
|
||||
@@ -863,6 +878,7 @@ namespace ZL
|
||||
currentLocation->dialogueSystem.startCutscene("lection_cutscene001"); //.startDialogue("test_cutscene_pan_dialogue");
|
||||
break;
|
||||
|
||||
|
||||
case SDLK_n:
|
||||
if (editorMode == EditorMode::None)
|
||||
editorMode = EditorMode::Navigation;
|
||||
@@ -1239,6 +1255,18 @@ namespace ZL
|
||||
|
||||
bool Game::startDarklandsTransition()
|
||||
{
|
||||
if (!menuManager.isNight)
|
||||
{
|
||||
currentLocation->dialogueSystem.startDialogue("darklands_day_dialog001");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (menuManager.isDawn)
|
||||
{
|
||||
currentLocation->dialogueSystem.startDialogue("darklands_morning_dialog001");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (darklandsFlashActive) return false;
|
||||
darklandsFlashActive = true;
|
||||
darklandsFlashFadingIn = true;
|
||||
@@ -1271,6 +1299,7 @@ namespace ZL
|
||||
if (currentLocation)
|
||||
{
|
||||
//currentLocation->dialogueSystem.startDialogue("dialog_video001");
|
||||
currentLocation->isNight = menuManager.isNight;
|
||||
currentLocation->scriptEngine.callTriggerNightEnterCallback();
|
||||
}
|
||||
} else {
|
||||
@@ -1280,6 +1309,7 @@ namespace ZL
|
||||
menuManager.setDarklandsMode(isDarklands);
|
||||
|
||||
if (currentLocation) {
|
||||
currentLocation->isDarklands = isDarklands;
|
||||
if (isDarklands)
|
||||
currentLocation->scriptEngine.callDarklandsEnterCallback();
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user