Ejemplo n.º 1
0
class shipptrs *shipptrs::getshipptrs()
{
	OBJHANDLE hcraft=oapiGetFocusObject();
	class shipptrs *ptr=findship(hcraft);
	if (ptr==NULL)
		ptr=new shipptrs();
	return ptr;
}
Ejemplo n.º 2
0
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
}
Ejemplo n.º 3
0
void MFDWindow::StickToVessel (bool stick)
{
	vstick = stick;
	if (!vstick) {
		SetVessel (oapiGetFocusObject());
		//SetTitle ();
	}
}