mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Merge pull request #1592 from Azaezel/alpha41/crashTestDummies
Some checks failed
Linux Build / ${{matrix.config.name}} (map[build_type:Release cc:gcc cxx:g++ generator:Ninja name:Ubuntu Latest GCC]) (push) Has been cancelled
MacOSX Build / ${{matrix.config.name}} (map[build_type:Release cc:clang cxx:clang++ generator:Ninja name:MacOSX Latest Clang]) (push) Has been cancelled
Windows Build / ${{matrix.config.name}} (map[build_type:Release cc:cl cxx:cl environment_script:C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat generator:Visual Studio 17 2022 name:Windows Latest MSVC]) (push) Has been cancelled
Some checks failed
Linux Build / ${{matrix.config.name}} (map[build_type:Release cc:gcc cxx:g++ generator:Ninja name:Ubuntu Latest GCC]) (push) Has been cancelled
MacOSX Build / ${{matrix.config.name}} (map[build_type:Release cc:clang cxx:clang++ generator:Ninja name:MacOSX Latest Clang]) (push) Has been cancelled
Windows Build / ${{matrix.config.name}} (map[build_type:Release cc:cl cxx:cl environment_script:C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat generator:Visual Studio 17 2022 name:Windows Latest MSVC]) (push) Has been cancelled
crashfixes
This commit is contained in:
commit
aa9a8154e1
2 changed files with 10 additions and 19 deletions
|
|
@ -242,6 +242,7 @@ afxMagicMissileData::afxMagicMissileData()
|
||||||
caster_safety_time = U32_MAX;
|
caster_safety_time = U32_MAX;
|
||||||
|
|
||||||
mProjectileShapeAsset.registerRefreshNotify(this);
|
mProjectileShapeAsset.registerRefreshNotify(this);
|
||||||
|
projectileShape = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxMagicMissileData::afxMagicMissileData(const afxMagicMissileData& other, bool temp_clone) : GameBaseData(other, temp_clone)
|
afxMagicMissileData::afxMagicMissileData(const afxMagicMissileData& other, bool temp_clone) : GameBaseData(other, temp_clone)
|
||||||
|
|
@ -531,26 +532,16 @@ bool afxMagicMissileData::preload(bool server, String &errorStr)
|
||||||
Con::errorf(ConsoleLogEntry::General, "afxMagicMissileData::preload: Invalid packet, bad datablockid(lightDesc): %d", lightDescId);
|
Con::errorf(ConsoleLogEntry::General, "afxMagicMissileData::preload: Invalid packet, bad datablockid(lightDesc): %d", lightDescId);
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 assetStatus = ShapeAsset::getAssetErrCode(mProjectileShapeAsset);
|
if (getProjectileShape())
|
||||||
if (assetStatus == AssetBase::Ok || assetStatus == AssetBase::UsingFallback)
|
|
||||||
{
|
{
|
||||||
projectileShape = getProjectileShape();
|
TSShapeInstance* pDummy = new TSShapeInstance(getProjectileShape(), !server);
|
||||||
if (bool(projectileShape) == false)
|
delete pDummy;
|
||||||
|
}
|
||||||
|
else if (mProjectileShapeAsset.notNull())
|
||||||
{
|
{
|
||||||
errorStr = String::ToString("afxMagicMissileData::preload: Couldn't load shape \"%s\"", _getProjectileShapeAssetId());
|
errorStr = String::ToString("afxMagicMissileData::preload: Couldn't load shape \"%s\"", _getProjectileShapeAssetId());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/* From stock Projectile code...
|
|
||||||
activateSeq = projectileShape->findSequence("activate");
|
|
||||||
maintainSeq = projectileShape->findSequence("maintain");
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bool(projectileShape)) // create an instance to preload shape data
|
|
||||||
{
|
|
||||||
TSShapeInstance* pDummy = new TSShapeInstance(projectileShape, !server);
|
|
||||||
delete pDummy;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1449,7 +1449,7 @@ GuiControl* GuiInspectorTypeRangedS32::constructEditControl()
|
||||||
if (scaledValidator)
|
if (scaledValidator)
|
||||||
{
|
{
|
||||||
retCtrl->setField("range", String::ToString("%d %d", scaledValidator->getMin(), scaledValidator->getMax()));
|
retCtrl->setField("range", String::ToString("%d %d", scaledValidator->getMin(), scaledValidator->getMax()));
|
||||||
if (validator->getFidelity() > 1)
|
if (scaledValidator->getScaleFactor() > 1)
|
||||||
retCtrl->setField("increment", String::ToString("%d", scaledValidator->getScaleFactor()));
|
retCtrl->setField("increment", String::ToString("%d", scaledValidator->getScaleFactor()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue