ClientMissionCleanup and Vehicles, 1.7.1
by Jaimi McEntire · in Torque Game Engine Advanced · 07/07/2008 (8:49 pm) · 1 replies
If you drop a vehicle into your new project, and save the mission, you will get four errors during mission load the next time you load it (when running the debug executable) - "Error, could not find ClientMissionCleanup group", due to the particle emitters for the tires. (in release mode, the particle emitters are just not created). If you get the secret button press combo down, you can get into the game, but this is annoying when you go to debug. (it's Retry - Cancel - Retry - Retry - Retry. Ok, it wasn't that hard to figure out)
This simgroup (ClientMissionCleanup) is created automatically in Common/clientScripts/mission.cs in the clientCmdMissionStart() event, but unfortunately, this is after the particle emitters for the tires are already created. To work around this, I have manually added a ClientMissionCleanup SimGroup to the mission itself
But is this correct? Is there a better place to put the auto creation of the ClientMissionCleanup group? Is there an event that gets called before the datablocks are all loaded? (clientCmdMissionStart() is called after they are loaded). At a cursory glance, the workaround doesn't seem to cause any errors, but... I'd hate to have some leaks or even worse, some particle emitters that don't get cleaned up and continue to emit particles on the next mission.
Has anyone else seen this issue or had problems with the work around?
This simgroup (ClientMissionCleanup) is created automatically in Common/clientScripts/mission.cs in the clientCmdMissionStart() event, but unfortunately, this is after the particle emitters for the tires are already created. To work around this, I have manually added a ClientMissionCleanup SimGroup to the mission itself
But is this correct? Is there a better place to put the auto creation of the ClientMissionCleanup group? Is there an event that gets called before the datablocks are all loaded? (clientCmdMissionStart() is called after they are loaded). At a cursory glance, the workaround doesn't seem to cause any errors, but... I'd hate to have some leaks or even worse, some particle emitters that don't get cleaned up and continue to emit particles on the next mission.
Has anyone else seen this issue or had problems with the work around?
Torque Owner Bill Vee
DayOfWar Studios
I don't think there will be a memory leak because ParticleEmitter::onAdd() just returns false and doesn't actually create the emitter if it can't find the ClientMissionCleanup group.