Merge pull request #1328 from GarageGames/release-3.7

Release 3.7
This commit is contained in:
Daniel Buckmaster 2015-06-24 19:00:57 +10:00
commit 39f0e269d6
48 changed files with 317 additions and 102 deletions

View file

@ -97,7 +97,6 @@ void ForestEditorCtrl::onSleep()
bool ForestEditorCtrl::updateActiveForest( bool createNew )
{
mForest = dynamic_cast<Forest*>( Sim::findObject( "theForest" ) );
Con::executef( this, "onActiveForestUpdated", mForest ? mForest->getIdString() : "", createNew ? "1" : "0" );
if ( mTool )
@ -400,4 +399,13 @@ DefineConsoleMethod( ForestEditorCtrl, deleteMeshSafe, void, ( const char * obj
DefineConsoleMethod( ForestEditorCtrl, isDirty, bool, (), , "" )
{
return object->isDirty();
}
DefineConsoleMethod(ForestEditorCtrl, setActiveForest, void, (const char * obj), , "( Forest obj )")
{
Forest *forestObject;
if (!Sim::findObject(obj, forestObject))
return;
object->setActiveForest(forestObject);
}

View file

@ -86,6 +86,9 @@ class ForestEditorCtrl : public EditTSCtrl
/// Causes the editor to reselect the active forest.
bool updateActiveForest( bool createNew );
/// Sets the active Forest
void setActiveForest(Forest* forestObject) { mForest = forestObject; }
/// Returns the active Forest.
Forest *getActiveForest() const { return mForest; }

View file

@ -88,7 +88,7 @@ public:
const Vector<S32>& getLOSDetails() const { return mLOSDetails; }
// ForestItemData
const Box3F& getObjBox() const { return mShape ? mShape->bounds : Box3F::Invalid; }
const Box3F& getObjBox() const { return mShape ? mShape->bounds : Box3F::Zero; }
bool render( TSRenderState *rdata, const ForestItem& item ) const;
ForestCellBatch* allocateBatch() const;
bool canBillboard( const SceneRenderState *state, const ForestItem &item, F32 distToCamera ) const;