For my new demo manager, I have written a custom demo driver. Its purpose
is simply to take into account pausing and timedilation (allowing you to
pause and speed up/slow down demos).
(Note: that ut demo manager 2.0 also has file analyzing and such
A pic to make you feel guilty (note that speed and pause will be removed from this menu) if you dont help :
)
It works perfectly for one demo. Unfortuantely after completion, when
loading another demo (or even exiting the game), it will crash in garbage
collection with the following error:
The code that I use is the quite simple:
(header file):
(source file):
Thanks in advance to any who can help me. If no one can, I will be forced
to forfeit this feature
is simply to take into account pausing and timedilation (allowing you to
pause and speed up/slow down demos).
(Note: that ut demo manager 2.0 also has file analyzing and such
A pic to make you feel guilty (note that speed and pause will be removed from this menu) if you dont help :
)
It works perfectly for one demo. Unfortuantely after completion, when
loading another demo (or even exiting the game), it will crash in garbage
collection with the following error:
Code:
Log: 0.0ms Unloading: Package SaveMe
Log: Closing down demo driver.
Critical: FMallocWindows::Free
Critical: FMallocWindows::Free
Critical: FMallocWindows::Realloc
Critical: 00000008 0 FArray
Critical: FArray::Realloc
Critical: 0*2
Critical: FMallocWindows::Free
Critical: ULevelBase::Destroy
Critical: ULevel::Destroy
Critical: UObject::ConditionalDestroy
Critical: (Level ctf-orbital.MyLevel)
Critical: DispatchDestroy
Critical: (29599: Level ctf-orbital.MyLevel)
Critical: DispatchDestroys
Critical: UObject::PurgeGarbage
Critical: UObject::CollectGarbage
Critical: Cleanup
Critical: UGameEngine::LoadMap
Critical: AttemptLoadPending
Critical: TickPending
Critical: UGameEngine::Tick
Critical: UpdateWorld
Critical: MainLoop
Exit: Executing UObject::StaticShutdownAfterError
The code that I use is the quite simple:
(header file):
Code:
class UDEMO_API UuDemoDriver : public UDemoRecDriver
{
DECLARE_CLASS(UuDemoDriver,UDemoRecDriver,CLASS_Transient|CLASS_Config,udemo
)
void TickDispatch( FLOAT DeltaTime );
};
Code:
#include "udemoprivate.h" //this has an include of the header above.
void UuDemoDriver::TickDispatch( FLOAT DeltaTime ){
guard(UuDemoDriver::TickDispatch);
//note that GetLevel() returns Notify->NotifyGetLevel(), only it has an
assertion that would crash if I just checked it alone.
if
(Notify->NotifyGetLevel()&&GetLevel()->GetLevelInfo()&&GetLevel()->GetLevelI
nfo()->LevelAction==0){
if (GetLevel()->GetLevelInfo()->Pauser!=TEXT(""))
return;
DeltaTime*=GetLevel()->GetLevelInfo()->TimeDilation;
}
Super::TickDispatch(DeltaTime);
unguard;
}
IMPLEMENT_CLASS(UuDemoDriver);
to forfeit this feature