Add base variables for warping cinematics

I literally only did this because I have an ultra-wide monitor and the letterboxing bothered me
This commit is contained in:
Kae 2023-06-29 00:13:43 +10:00
parent e809aad072
commit 9486a56508
2 changed files with 19 additions and 7 deletions

View File

@ -0,0 +1,11 @@
{
// Disables scissoring and letterboxing on vanilla and modded warp cinematics
"warpCinematicBase" : {
"scissor" : false,
"letterbox" : false
},
"deployCinematicBase" : {
"scissor" : false,
"letterbox" : false
}
}

View File

@ -183,13 +183,14 @@ void UniverseClient::update() {
m_warpDelay.reset();
if (m_warping) {
m_warpCinemaCancelTimer = GameTimer(assets->json("/client.config:playerWarpCinemaMinimumTime").toFloat());
String cinematic;
if (m_mainPlayer->isDeploying())
cinematic = assets->json("/client.config:deployCinematic").toString();
else
cinematic = assets->json("/client.config:warpCinematic").toString();
cinematic = cinematic.replaceTags(StringMap<String>{{"species", m_mainPlayer->species()}});
m_mainPlayer->setPendingCinematic(Json(move(cinematic)));
bool isDeploying = m_mainPlayer->isDeploying();
String cinematicJsonPath = isDeploying ? "/client.config:deployCinematic" : "/client.config:warpCinematic";
String cinematicAssetPath = assets->json(cinematicJsonPath).toString()
.replaceTags(StringMap<String>{{"species", m_mainPlayer->species()}});
Json cinematic = jsonMerge(assets->json(cinematicJsonPath + "Base"), assets->json(cinematicAssetPath));
m_mainPlayer->setPendingCinematic(cinematic);
}
}
}