I know how to use oapiGetVesselInterface() to get a generic vessel class interface but how do I go about achieving the same effect with a custom vessel class so that I can access my vessel specific functions and handles?
When I trey to declare my custom vessel interface and assign it I get an error that says "can not convert ____ to VESSEL"
Example...
It's that last line that's the problem.
I want the CSM_ServiceMod interface so that I can assign class specific variable (animation states and the like) but Orbiter wont let me.
When I trey to declare my custom vessel interface and assign it I get an error that says "can not convert ____ to VESSEL"
Example...
Code:
// Create service module as seperate vessel
strcpy (name, GetName());
strcat (name, "_ServiceMod");
oapiCreateVessel (name, "AAPO/CSM_ServiceMod", vs); // create service module vessel
OBJHANDLE oh_servicemod = oapiGetObjectByName (name); // get handle of service module vessel
VESSEL *v = oapiGetVesselInterface (oh_servicemod); // get interface for service module
CSM_ServiceMod *sm = v; // **Problem Line**
It's that last line that's the problem.
I want the CSM_ServiceMod interface so that I can assign class specific variable (animation states and the like) but Orbiter wont let me.