static void InternalCloseODE() { unsigned int uiCurrentMode = (--g_uiODEInitCounter == 0) ? OIM__MIN : OIM__MAX; for (; uiCurrentMode != OIM__MAX; ++uiCurrentMode) { if (IsODEModeInitialized((EODEINITMODE)uiCurrentMode)) { // Must be called before CloseODEForMode() ResetODEModeInitialized((EODEINITMODE)uiCurrentMode); // Must be called after ResetODEModeInitialized() CloseODEForMode((EODEINITMODE)uiCurrentMode); } } }
void dCloseODE() { dIASSERT(g_uiODEInitCounter != 0); // dCloseODE must not be called without dInitODE2 or if dInitODE2 fails unsigned int uiCurrentMode = (--g_uiODEInitCounter == 0) ? OIM__MIN : OIM__MAX; for (; uiCurrentMode != OIM__MAX; ++uiCurrentMode) { if (IsODEModeInitialized((EODEINITMODE)uiCurrentMode)) { // Must be called before CloseODEForMode() ResetODEModeInitialized((EODEINITMODE)uiCurrentMode); // Must be called after ResetODEModeInitialized() CloseODEForMode((EODEINITMODE)uiCurrentMode); } } }