mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-30 15:00:13 -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>([]() {
|
||||
UpdatePatchCustomEquipmentDlists();
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnAssetAltChange>([]() {
|
||||
UpdatePatchCustomEquipmentDlists();
|
||||
});
|
||||
}
|
||||
|
||||
void RegisterResetNaviTimer() {
|
||||
|
@ -1439,6 +1439,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) {
|
||||
bool curAltAssets = CVarGetInteger(CVAR_ENHANCEMENT("AltAssets"), 0);
|
||||
if (prevAltAssets != curAltAssets) {
|
||||
prevAltAssets = curAltAssets;
|
||||
UpdatePatchCustomEquipmentDlists();
|
||||
Ship::Context::GetInstance()->GetResourceManager()->SetAltAssetsEnabled(curAltAssets);
|
||||
gfx_texture_cache_clear();
|
||||
SOH::SkeletonPatcher::UpdateSkeletons();
|
||||
|
@ -1319,9 +1319,7 @@ void DrawEnhancementsMenu() {
|
||||
if (ImGui::BeginMenu("Graphics"))
|
||||
{
|
||||
if (ImGui::BeginMenu("Mods")) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", CVAR_ENHANCEMENT("AltAssets"), false, false)) {
|
||||
UpdatePatchCustomEquipmentDlists();
|
||||
}
|
||||
UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", CVAR_ENHANCEMENT("AltAssets"), false, false);
|
||||
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::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