aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NorthstarDLL/NorthstarDLL.vcxproj1
-rw-r--r--NorthstarDLL/NorthstarDLL.vcxproj.filters3
-rw-r--r--NorthstarDLL/client/audio.cpp2
-rw-r--r--NorthstarDLL/mods/modmanager.cpp3
-rw-r--r--NorthstarDLL/mods/modmanager.h1
-rw-r--r--NorthstarDLL/reloadturrets.cpp11
6 files changed, 21 insertions, 0 deletions
diff --git a/NorthstarDLL/NorthstarDLL.vcxproj b/NorthstarDLL/NorthstarDLL.vcxproj
index 3ed99d25..e26f5762 100644
--- a/NorthstarDLL/NorthstarDLL.vcxproj
+++ b/NorthstarDLL/NorthstarDLL.vcxproj
@@ -509,6 +509,7 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="plugins\plugins.cpp" />
+ <ClCompile Include="reloadturrets.cpp" />
<ClCompile Include="scripts\client\clientchathooks.cpp" />
<ClCompile Include="scripts\client\cursorposition.cpp" />
<ClCompile Include="scripts\client\scriptbrowserhooks.cpp" />
diff --git a/NorthstarDLL/NorthstarDLL.vcxproj.filters b/NorthstarDLL/NorthstarDLL.vcxproj.filters
index 10f6d796..44687ba6 100644
--- a/NorthstarDLL/NorthstarDLL.vcxproj.filters
+++ b/NorthstarDLL/NorthstarDLL.vcxproj.filters
@@ -1441,6 +1441,9 @@
<ClCompile Include="mods\reload\reloadmodweapons_misc.cpp">
<Filter>Source Files\mods\reload</Filter>
</ClCompile>
+ <ClCompile Include="reloadturrets.cpp">
+ <Filter>Source Files\mods\reload</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<MASM Include="audio_asm.asm">
diff --git a/NorthstarDLL/client/audio.cpp b/NorthstarDLL/client/audio.cpp
index ea1f6416..39327900 100644
--- a/NorthstarDLL/client/audio.cpp
+++ b/NorthstarDLL/client/audio.cpp
@@ -264,6 +264,8 @@ EventOverrideData::EventOverrideData(const std::string& data, const fs::path& pa
bool CustomAudioManager::TryLoadAudioOverride(const fs::path& defPath)
{
+ return true;
+
if (IsDedicatedServer())
return true; // silently fail
diff --git a/NorthstarDLL/mods/modmanager.cpp b/NorthstarDLL/mods/modmanager.cpp
index 6d36a975..0af73e04 100644
--- a/NorthstarDLL/mods/modmanager.cpp
+++ b/NorthstarDLL/mods/modmanager.cpp
@@ -1040,6 +1040,8 @@ void ModManager::ReloadNecessaryModAssets(bool bDeferred, const ModAssetsToReloa
DeferredReloadWeaponSprings();
DeferredReloadWeapons(pAssetsToReload->setsWeaponSettings);
+
+ // player/ai/turret settings and aibehaviors automatically reload themselves on level change already, don't need to reload here
}
else
{
@@ -1057,6 +1059,7 @@ void ModManager::ReloadNecessaryModAssets(bool bDeferred, const ModAssetsToReloa
TryImmediateReloadWeapons(pAssetsToReload->setsWeaponSettings);
+ // TODO player/ai/turret settings and aibehavior
// need to reimplement mat_reloadmaterials for this
// if (m_AssetTypesToReload.bMaterials)
diff --git a/NorthstarDLL/mods/modmanager.h b/NorthstarDLL/mods/modmanager.h
index 9eccffc5..3002a099 100644
--- a/NorthstarDLL/mods/modmanager.h
+++ b/NorthstarDLL/mods/modmanager.h
@@ -153,6 +153,7 @@ class ModManager
bool bMaterials = false; // vmts
bool bPlayerSettings = false;
bool bAiSettings = false;
+ bool bTurretSettings = false;
bool bDamageDefs = false; // damagedefs
bool bWeaponSprings = false;
bool bAmmoSuckBehaviours = false;
diff --git a/NorthstarDLL/reloadturrets.cpp b/NorthstarDLL/reloadturrets.cpp
new file mode 100644
index 00000000..611f8ae3
--- /dev/null
+++ b/NorthstarDLL/reloadturrets.cpp
@@ -0,0 +1,11 @@
+ON_DLL_LOAD_CLIENT("client.dll", ClientModReloadTurretSettings, (CModule module))
+{
+ // always reload turret settings on level load (ai and player settings do this already)
+ module.Offset(0x584B85).Patch("EB"); // jle => jmp
+}
+
+ON_DLL_LOAD_CLIENT("server.dll", ServerModReloadTurretSettings, (CModule module))
+{
+ // always reload turret settings on level load (ai and player settings do this already)
+ module.Offset(0x667115).Patch("EB"); // jle => jmp
+}