Adds test shapes of Kork and SpaceOrc

Sidestep of memleak from CSF at the moment
Minor fixes and corrections with asset importing and loose files
WIP of updated options menu
This commit is contained in:
Areloch 2019-05-28 17:24:29 -05:00
parent 98c4606b3c
commit ae857faae2
40 changed files with 765 additions and 182 deletions

View file

@ -121,12 +121,17 @@ void MaterialAsset::initializeAsset()
compileShader();
if (!Platform::isFullPath(mScriptFile))
mScriptFile = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptFile;
if (Platform::isFile(mScriptFile))
Con::executeFile(mScriptFile, false, false);
}
void MaterialAsset::onAssetRefresh()
{
mScriptFile = expandAssetFilePath(mScriptFile);
if (Platform::isFile(mScriptFile))
Con::executeFile(mScriptFile, false, false);
@ -151,12 +156,8 @@ void MaterialAsset::setScriptFile(const char* pScriptFile)
// Fetch image file.
pScriptFile = StringTable->insert(pScriptFile);
// Ignore no change,
if (pScriptFile == mScriptFile)
return;
// Update.
mScriptFile = getOwned() ? expandAssetFilePath(pScriptFile) : StringTable->insert(pScriptFile);
mScriptFile = getOwned() ? expandAssetFilePath(pScriptFile) : pScriptFile;
// Refresh the asset.
refreshAsset();