Color properties now update in realtime while the user is choosing a color from the color dialog; also some misc bugfixes

This commit is contained in:
parax0
2016-03-28 03:28:33 -06:00
parent e461039882
commit f9a2d019e1
9 changed files with 70 additions and 33 deletions

View File

@@ -280,6 +280,7 @@ void CScene::ClearScene()
mNodes.clear();
mAreaAttributesObjects.clear();
mNodeMap.clear();
mScriptMap.clear();
mNumNodes = 0;
mpArea = nullptr;
@@ -335,7 +336,7 @@ CScriptNode* CScene::NodeForInstanceID(u32 InstanceID)
CScriptNode* CScene::NodeForInstance(CScriptObject *pObj)
{
return NodeForInstanceID(pObj->InstanceID());
return (pObj ? NodeForInstanceID(pObj->InstanceID()) : nullptr);
}
CLightNode* CScene::NodeForLight(CLight *pLight)

View File

@@ -536,7 +536,7 @@ void CScriptNode::GeneratePosition()
{
if (!mHasValidPosition)
{
// Default to center of the active area; this is to preven recursion issues
// Default to center of the active area; this is to prevent recursion issues
CTransform4f& AreaTransform = mpScene->ActiveArea()->Transform();
mPosition = CVector3f(AreaTransform[0][3], AreaTransform[1][3], AreaTransform[2][3]);
mHasValidPosition = true;