Beispiel #1
0
void CGameAISystem::Update(float frameTime)
{
	FUNCTION_PROFILER(gEnv->pSystem, PROFILE_AI);

	UpdateModules(frameTime);
	UpdateSubSystems(frameTime);

	if(m_pCorpsesManager)
	{
		m_pCorpsesManager->Update( frameTime );
	}
}
Beispiel #2
0
static void SignalDebugData( struct TDebug *obj )
{
    int thread;
    char debtype;
    struct TCreateProcessEvent cpe;
    struct TCreateThreadEvent cte;
    struct TLoadDllEvent lde;
    struct TExceptionEvent ee;
    struct TKernelExceptionEvent kev;
    int ExitCode;
    int handle;
    struct TDebugThread *newt;

    RdosWaitMilli( 5 );

    debtype = RdosGetDebugEvent( obj->FHandle, &thread );

    switch (debtype) {
        case EVENT_EXCEPTION:
            RdosGetDebugEventData( obj->FHandle, &ee );
            HandleException( obj, &ee, thread );
            break;

        case EVENT_CREATE_THREAD:
            RdosGetDebugEventData( obj->FHandle, &cte );
            HandleCreateThread( obj, &cte );
            obj->FThreadChanged = TRUE;
            break;

        case EVENT_CREATE_PROCESS:
            RdosGetDebugEventData( obj->FHandle, &cpe );
            HandleCreateProcess( obj, &cpe );
            break;

        case EVENT_TERMINATE_THREAD:
            HandleTerminateThread( obj, thread );
            obj->FThreadChanged = TRUE;
            if( obj->CurrentThread->ThreadID == thread )
                obj->CurrentThread = 0;
            break;

        case EVENT_TERMINATE_PROCESS:
            RdosGetDebugEventData( obj->FHandle, &ExitCode );
            HandleTerminateProcess( obj, ExitCode);
            obj->FInstalled = FALSE;
            RdosSetSignal( obj->UserSignal );
            break;

        case EVENT_LOAD_DLL:
            RdosGetDebugEventData( obj->FHandle, &lde );
            HandleLoadDll( obj, &lde );
            obj->FModuleChanged = TRUE;
            break;

        case EVENT_FREE_DLL:
            RdosGetDebugEventData( obj->FHandle, &handle );
            HandleFreeDll( obj, handle );
            obj->FModuleChanged = TRUE;
            break;

        case EVENT_KERNEL:
            RdosGetDebugEventData( obj->FHandle, &kev );
            HandleKernelException( obj, &kev, thread );
            break;                    
    }

    RdosClearDebugEvent( obj->FHandle );

    if( debtype == EVENT_EXCEPTION || debtype == EVENT_KERNEL ) {
        if( obj->CurrentThread ) {
            DeactivateBreaks( obj->CurrentThread, obj->BreakList, obj->WatchList );

            if( thread != obj->CurrentThread->ThreadID ) {
                newt = LockThread( obj, thread );
                if( newt )
                    obj->NewThread = newt;
                UnlockThread( obj );
            }
            UpdateModules( obj );
        }

        RdosSetSignal( obj->UserSignal );
    }
    else
        RdosContinueDebugEvent( obj->FHandle, thread );
}