Game Development Community

SceneGraph Issue / Oddity

by James Urquhart · in Torque Game Engine · 02/17/2006 (2:26 pm) · 0 replies

Hey,

I just noticed this minor oddity in the scenegraph code.

void SceneGraph::scopeScene(const Point3F& scopePosition,
                            const F32      scopeDistance,
                            NetConnection* netConnection)
{
   ...

   SceneObject* pTraversalRoot = startObject;
   U32          rootZone       = startZone;
   bool* zoneScopeState = new bool[mCurrZoneEnd]; // <<

Wouldn't it be better to use the FrameAllocator to allocate the zoneScopeState? I'm pretty sure this function is called often - say, every frame.
Of course, considering it appears to work fine as it is, its probably not worth changing. But still, its something to look out for :)