mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-13 15:16:28 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user