[swift] cleanup functions

This commit is contained in:
Mathew Sutcliffe
2014-06-22 01:56:11 +01:00
parent 601923504b
commit 2ecf316d9a
2 changed files with 28 additions and 0 deletions

View File

@@ -150,6 +150,13 @@ const char * XPMPMultiplayerInit(
else return "";
}
void XPMPMultiplayerCleanup(void)
{
XPLMUnregisterDrawCallback(XPMPControlPlaneCount, xplm_Phase_Gauges, 0, 0);
XPLMUnregisterDrawCallback(XPMPControlPlaneCount, xplm_Phase_Gauges, 1, (void *) -1);
XPLMUnregisterDrawCallback(XPMPRenderMultiplayerPlanes, xplm_Phase_Airplanes, 0, 0);
}
// We use this array to track Austin's planes, since we have to mess with them.
static vector<string> gPlanePaths;
@@ -210,6 +217,11 @@ const char * XPMPMultiplayerEnable(void)
return "";
}
void XPMPMultiplayerDisable(void)
{
XPLMReleasePlanes();
}
// This routine checks plane loading and grabs anyone we're missing.
void XPMPLoadPlanesIfNecessary(void)