Game Development Community

Keep the engine from removing the path markers

by Caleb · in Torque Game Engine · 03/21/2007 (9:43 am) · 1 replies

Like the name says, How do I keep the engine from removing the path markers when the world editor closes?
I thought of a really good, easy way of doing path finding, but it can't work without the path nodes.

In the SimPath.cc file there are two functions, Marker::onEditorEnable and Marker::onEditorDisable. These seem to remove and add the path nodes. What I was doing was changing the code to look like this:
/// Enable scoping so we can see this thing on the client.
void Marker::onEditorEnable()
{
   mNetFlags.set(Ghostable);
   setScopeAlways();

   removeFromScene();

   addToScene();
}

/// Disable scoping so we can see this thing on the client
void Marker::onEditorDisable()
{
   //mNetFlags.clear(Ghostable);
   //clearScopeAlways();
   //removeFromScene();
}

And then I commented out "wireWedge(.25, Point3F(0, 0, 0));", in Marker::renderObject.
It works fine until I close the game. There is a error report message when the game closes. It hasn't crashed while the game is running yet, but I don't want to take the chance. So if someone knows a better way of doing what I'm trying to do, Please let me know.

#1
03/27/2007 (9:14 pm)
I hope I'm not being asinine...but this never happens to me. You save your mission before closing?