class shipptrs *shipptrs::getshipptrs() { OBJHANDLE hcraft=oapiGetFocusObject(); class shipptrs *ptr=findship(hcraft); if (ptr==NULL) ptr=new shipptrs(); return ptr; }
shipptrs::shipptrs() { OBJHANDLE hcraft=oapiGetFocusObject();//Sets up new shipptrs for focus object ZeroMemory(shipname, SHIPNAME_LENGTH); oapiGetObjectName(hcraft,shipname,SHIPNAME_LENGTH - 1); // Why is this -1? subcreate(); state=new transxstate(hcraft,this);//A new plan base for this vessel }
void MFDWindow::StickToVessel (bool stick) { vstick = stick; if (!vstick) { SetVessel (oapiGetFocusObject()); //SetTitle (); } }