Fix for dynos mod actors that replace other actors
This commit is contained in:
parent
f2f911e5b0
commit
a925acba6b
|
@ -74,7 +74,7 @@ static bool DynOS_Actor_WriteBinary(const SysPath &aOutputFilename, GfxData *aGf
|
||||||
|
|
||||||
GfxData *DynOS_Actor_LoadFromBinary(const SysPath &aPackFolder, const char *aActorName) {
|
GfxData *DynOS_Actor_LoadFromBinary(const SysPath &aPackFolder, const char *aActorName) {
|
||||||
struct DynosGfxDataCache { SysPath mPackFolder; Array<Pair<const char *, GfxData *>> mGfxData; };
|
struct DynosGfxDataCache { SysPath mPackFolder; Array<Pair<const char *, GfxData *>> mGfxData; };
|
||||||
static Array<DynosGfxDataCache *> sDynosGfxDataCache;
|
static Array<DynosGfxDataCache *> sDynosGfxDataCache = {};
|
||||||
|
|
||||||
// Look for pack in cache
|
// Look for pack in cache
|
||||||
DynosGfxDataCache *_Pack = NULL;
|
DynosGfxDataCache *_Pack = NULL;
|
||||||
|
@ -128,6 +128,7 @@ GfxData *DynOS_Actor_LoadFromBinary(const SysPath &aPackFolder, const char *aAct
|
||||||
_Pack->mGfxData.Add({ aActorName, _GfxData });
|
_Pack->mGfxData.Add({ aActorName, _GfxData });
|
||||||
sDynosGfxDataCache.Add(_Pack);
|
sDynosGfxDataCache.Add(_Pack);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _GfxData;
|
return _GfxData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ void DynOS_Actor_AddCustom(const SysPath &aPackFolder, const char *aActorName) {
|
||||||
sDynosCustomActors.Add({ actorName, geoLayout });
|
sDynosCustomActors.Add({ actorName, geoLayout });
|
||||||
} else {
|
} else {
|
||||||
index = foundIndex;
|
index = foundIndex;
|
||||||
free(actorName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alloc and init the actors gfx list
|
// Alloc and init the actors gfx list
|
||||||
|
|
Loading…
Reference in New Issue