Game Development Community

GetScheduleDuration / GetTimeSinceStart Function Fixes

by Cinder Games · in Torque Game Engine · 02/13/2008 (3:58 pm) · 2 replies

GetScheduleDuration and GetTimeSinceStart schedule functions no longer work!!
These are two simple functions i wrote in 2005 which were added to the SDK.

Somewhere along the lines, my extra code added to simmanager.cc disappeared

in simManager.cc around line 79 in PostEvent

event->time = time;
[b]   event->startTime=gCurrentTime; //Ramen Hack[/b]
   event->destObject = destObject;

This one line needs to be added in giving start time a real number to use. Without it, starttime is never given a value, and you get an erroneous value.

I've added this back into my code and confirmed it works.

#1
12/19/2008 (10:29 am)
Just wanted to let the powers to be know that this issue still exists in TGEA 1.8 beta. I've also confirmed that Ramen-sama's fix above does indeed work as stated.

Hopefully this patch will get re-applied to Torque soon!


- Houdini
#2
03/01/2010 (12:34 pm)
The bug is present into TGB 1.7.4 also. I applied the fix and now it works well. :-)

Thanks for sharing.