2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-01 16:51:56 +00:00

chore: make IZoneLoadingState return reference

This commit is contained in:
Jan
2025-01-03 10:42:37 +01:00
parent fa6f9451d2
commit 9068e96dfa
14 changed files with 117 additions and 120 deletions

View File

@ -409,11 +409,11 @@ namespace
bool LoadAccuracyGraphs(WeaponFullDef& weaponFullDef, MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context)
{
auto* accuracyGraphLoader = context.GetZoneAssetLoaderState<AccuracyGraphLoader>();
auto& accuracyGraphLoader = context.GetZoneAssetLoaderState<AccuracyGraphLoader>();
if (weaponFullDef.weapDef.aiVsAiAccuracyGraphName && weaponFullDef.weapDef.aiVsAiAccuracyGraphName[0])
{
const auto* graph = accuracyGraphLoader->LoadAiVsAiGraph(searchPath, weaponFullDef.weapDef.aiVsAiAccuracyGraphName);
const auto* graph = accuracyGraphLoader.LoadAiVsAiGraph(searchPath, weaponFullDef.weapDef.aiVsAiAccuracyGraphName);
if (!graph)
return false;
@ -427,7 +427,7 @@ namespace
if (weaponFullDef.weapDef.aiVsPlayerAccuracyGraphName && weaponFullDef.weapDef.aiVsPlayerAccuracyGraphName[0])
{
const auto* graph = accuracyGraphLoader->LoadAiVsPlayerGraph(searchPath, weaponFullDef.weapDef.aiVsPlayerAccuracyGraphName);
const auto* graph = accuracyGraphLoader.LoadAiVsPlayerGraph(searchPath, weaponFullDef.weapDef.aiVsPlayerAccuracyGraphName);
if (!graph)
return false;