Save scriptstrings per zone and not per asset since that solves all problems with multiple assets of the same zone referencing the same struct in memory that has scriptstring indices

This commit is contained in:
Jan
2020-10-23 15:54:27 +02:00
parent f8e7a10789
commit eed7164b5b
36 changed files with 387 additions and 447 deletions

View File

@ -2,13 +2,11 @@
#include "Loading/ContentLoaderBase.h"
#include "Loading/IContentLoadingEntryPoint.h"
#include "Game/IW4/IW4.h"
#include "Loading/IZoneScriptStringProvider.h"
namespace IW4
{
class ContentLoader final : public ContentLoaderBase, public IContentLoadingEntryPoint, public IZoneScriptStringProvider
class ContentLoader final : public ContentLoaderBase, public IContentLoadingEntryPoint
{
std::vector<std::string> m_script_strings;
XAsset* varXAsset;
ScriptStringList* varScriptStringList;
@ -21,6 +19,5 @@ namespace IW4
ContentLoader();
void Load(Zone* zone, IZoneInputStream* stream) override;
std::string& GetZoneScriptString(scr_string_t scrString) override;
};
}