Game Development Community

Recording particles

by Luis Anton · in Torque Game Engine · 05/27/2004 (12:02 am) · 13 replies

Hi!

Is recording working properly? I am having troubles trying to record missions where there are particle emitters... the system crashes when playing those recordings. Is there any known bug related to the recording system?

#1
05/27/2004 (12:28 am)
Did you try it via command line arguments?, it works fine then even by particles.
#2
06/02/2004 (12:04 am)
Uh... I cannot find the command line argument for this :#) Isn't there a --help or something?

However, why does it work using command line arguments and not in the proper application?
#3
08/20/2007 (3:06 pm)
We are seeing the same bug. The problem appears to be in particleemitter.cpp and tries to find the ClientMissionCleanup group and fails.


Commenting out that code appears to fix the problem (but may cause a memory leak).

Any suggestions for a proper fix.
#4
12/25/2007 (9:11 pm)
Did you guys ever find a fix for this or a cause? I am seeing the same in TGEA.
#5
12/25/2007 (9:31 pm)
Lol, bugs from 3 years ago still haven't been addressed. =)
#6
02/07/2008 (7:37 am)
I'm also seeing this in TGEA 1.0.3.
#7
03/30/2008 (2:24 pm)
I've met this in TGEA 1.7.0 Beta 2 although its saving and loading a mission - not related to recording as far as I understand. I will try to investigate further..
#8
08/08/2008 (6:36 pm)
I see this error when stopping a mission (to clean it up). The message is "could not find ClientMissionCleanup" which is asserted from method bool ParticleEmitter::onAdd().

What is ClientMissionCleanup supposed to do because it also causes a crash when ending a mission if a particle was deleted by MissionCleanup for all objects.

bool ParticleEmitter::onAdd()
{
   if( !Parent::onAdd() )
      return false;

   // add to client side mission cleanup
   SimGroup *cleanup = dynamic_cast<SimGroup *>( Sim::findObject( "ClientMissionCleanup") );
   if( cleanup != NULL )
   {
      cleanup->addObject( this );
   }
   else
   {
      AssertFatal( false, "Error, could not find ClientMissionCleanup group" );
      return false;
   }
#9
10/16/2008 (2:21 pm)
Hey guys, don't feel like the Lone Ranger. I also found it impossible to debug
any mission with an object containing a particle emitter.

I brought this to GG attention and they said you should not be defining objects inside the
mission file.

My solution was to add one line to my mission file.

new SimGroup( ClientMissionCleanup );  // <--- Add this
   new SimGroup(PlayerDropPoints) {

And then when everything is loaded and you are ready to enter the game -
in common/clientScripts/mission.cs (TGEA 1.7.1)
in the function clientCmdMissionStart
I check first before creating the default ClientMissionCleanup group. Just so I don't create a second one.

function clientCmdMissionStart(%seq)
{
   // The client recieves a mission start right before
   // being dropped into the game.
   if(!(isObject(ClientMissionCleanup)) )    // <--- Add this
      new SimGroup( ClientMissionCleanup );
}
#10
12/21/2008 (3:56 am)
Thanks for the tip Mary. I'm using TGEA 1.8.0 and it is doing the very same thing. Your workaround solved the issue for me.

Thanks again!
#11
12/25/2008 (10:58 am)
That fixes that problem in 1.8.0. Was a simple fix. Thanks for allowing us to use it.
Now to go find my other error....
#12
04/20/2010 (1:48 pm)
Thanks, this fixed the same issue in T3D
#13
09/21/2013 (1:02 pm)
Mary's fix still works 5 years later in T3D MIT 3.0