mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-30 23:10:14 -05:00
Prevent Alt Toggle Crash
This commit is contained in:
parent
f3410ae3ec
commit
f87f988920
@ -852,6 +852,10 @@ void RegisterPatchCustomEquipmentDlistsHandler() {
|
|||||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneSpawnActors>([]() {
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneSpawnActors>([]() {
|
||||||
UpdatePatchCustomEquipmentDlists();
|
UpdatePatchCustomEquipmentDlists();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnAssetAltChange>([]() {
|
||||||
|
UpdatePatchCustomEquipmentDlists();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterResetNaviTimer() {
|
void RegisterResetNaviTimer() {
|
||||||
|
@ -1439,6 +1439,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) {
|
|||||||
bool curAltAssets = CVarGetInteger(CVAR_ENHANCEMENT("AltAssets"), 0);
|
bool curAltAssets = CVarGetInteger(CVAR_ENHANCEMENT("AltAssets"), 0);
|
||||||
if (prevAltAssets != curAltAssets) {
|
if (prevAltAssets != curAltAssets) {
|
||||||
prevAltAssets = curAltAssets;
|
prevAltAssets = curAltAssets;
|
||||||
|
UpdatePatchCustomEquipmentDlists();
|
||||||
Ship::Context::GetInstance()->GetResourceManager()->SetAltAssetsEnabled(curAltAssets);
|
Ship::Context::GetInstance()->GetResourceManager()->SetAltAssetsEnabled(curAltAssets);
|
||||||
gfx_texture_cache_clear();
|
gfx_texture_cache_clear();
|
||||||
SOH::SkeletonPatcher::UpdateSkeletons();
|
SOH::SkeletonPatcher::UpdateSkeletons();
|
||||||
|
@ -1319,9 +1319,7 @@ void DrawEnhancementsMenu() {
|
|||||||
if (ImGui::BeginMenu("Graphics"))
|
if (ImGui::BeginMenu("Graphics"))
|
||||||
{
|
{
|
||||||
if (ImGui::BeginMenu("Mods")) {
|
if (ImGui::BeginMenu("Mods")) {
|
||||||
if (UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", CVAR_ENHANCEMENT("AltAssets"), false, false)) {
|
UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", CVAR_ENHANCEMENT("AltAssets"), false, false);
|
||||||
UpdatePatchCustomEquipmentDlists();
|
|
||||||
}
|
|
||||||
UIWidgets::Tooltip("Toggle between standard assets and alternate assets. Usually mods will indicate if this setting has to be used or not.");
|
UIWidgets::Tooltip("Toggle between standard assets and alternate assets. Usually mods will indicate if this setting has to be used or not.");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Disable Bomb Billboarding", CVAR_ENHANCEMENT("DisableBombBillboarding"), true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Disable Bomb Billboarding", CVAR_ENHANCEMENT("DisableBombBillboarding"), true, false);
|
||||||
UIWidgets::Tooltip("Disables bombs always rotating to face the camera. To be used in conjunction with mods that want to replace bombs with 3D objects.");
|
UIWidgets::Tooltip("Disables bombs always rotating to face the camera. To be used in conjunction with mods that want to replace bombs with 3D objects.");
|
||||||
|
Loading…
Reference in New Issue
Block a user