From 0a09aaba2e72306af3e3b57cca26afac664e90ba Mon Sep 17 00:00:00 2001 From: Azaezel Date: Mon, 12 Mar 2018 04:37:41 -0500 Subject: [PATCH] nother set of generic 'object' varnames, all of which referenced different things --- Engine/source/gui/worldEditor/worldEditor.cpp | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Engine/source/gui/worldEditor/worldEditor.cpp b/Engine/source/gui/worldEditor/worldEditor.cpp index 7846ec094..da87b6bda 100644 --- a/Engine/source/gui/worldEditor/worldEditor.cpp +++ b/Engine/source/gui/worldEditor/worldEditor.cpp @@ -3036,25 +3036,25 @@ bool WorldEditor::alignByAxis( S32 axis ) if(mSelected->size() < 2) return true; - SceneObject* object = dynamic_cast< SceneObject* >( ( *mSelected )[ 0 ] ); - if( !object ) + SceneObject* primaryObj = dynamic_cast< SceneObject* >( ( *mSelected )[ 0 ] ); + if( !primaryObj) return false; submitUndo( mSelected, "Align By Axis" ); // All objects will be repositioned to line up with the // first selected object - Point3F pos = object->getPosition(); + Point3F pos = primaryObj->getPosition(); for(S32 i=0; isize(); ++i) { - SceneObject* object = dynamic_cast< SceneObject* >( ( *mSelected )[ i ] ); - if( !object ) + SceneObject* additionalObj = dynamic_cast< SceneObject* >( ( *mSelected )[ i ] ); + if( !additionalObj) continue; - Point3F objPos = object->getPosition(); + Point3F objPos = additionalObj->getPosition(); objPos[axis] = pos[axis]; - object->setPosition(objPos); + additionalObj->setPosition(objPos); } return true; @@ -4050,8 +4050,8 @@ DefineEngineMethod( WorldEditor, createPolyhedralObject, SceneObject*, ( const c // Create the object. - SceneObject* object = dynamic_cast< SceneObject* >( classRep->create() ); - if( !Object ) + SceneObject* polyObj = dynamic_cast< SceneObject* >( classRep->create() ); + if( !polyObj) { Con::errorf( "WorldEditor::createPolyhedralObject - Could not create SceneObject with class '%s'", className ); return NULL; @@ -4069,7 +4069,7 @@ DefineEngineMethod( WorldEditor, createPolyhedralObject, SceneObject*, ( const c for( U32 i = 0; i < numPoints; ++ i ) { static StringTableEntry sPoint = StringTable->insert( "point" ); - object->setDataField( sPoint, NULL, EngineMarshallData( points[ i ] ) ); + polyObj->setDataField( sPoint, NULL, EngineMarshallData( points[ i ] ) ); } // Add the plane data. @@ -4085,7 +4085,7 @@ DefineEngineMethod( WorldEditor, createPolyhedralObject, SceneObject*, ( const c char buffer[ 1024 ]; dSprintf( buffer, sizeof( buffer ), "%g %g %g %g", plane.x, plane.y, plane.z, plane.d ); - object->setDataField( sPlane, NULL, buffer ); + polyObj->setDataField( sPlane, NULL, buffer ); } // Add the edge data. @@ -4104,24 +4104,24 @@ DefineEngineMethod( WorldEditor, createPolyhedralObject, SceneObject*, ( const c edge.vertex[ 0 ], edge.vertex[ 1 ] ); - object->setDataField( sEdge, NULL, buffer ); + polyObj->setDataField( sEdge, NULL, buffer ); } // Set the transform. - object->setTransform( savedTransform ); - object->setScale( savedScale ); + polyObj->setTransform( savedTransform ); + polyObj->setScale( savedScale ); // Register and return the object. - if( !object->registerObject() ) + if( !polyObj->registerObject() ) { Con::errorf( "WorldEditor::createPolyhedralObject - Failed to register object!" ); - delete object; + delete polyObj; return NULL; } - return object; + return polyObj; } //-----------------------------------------------------------------------------