Esempio n. 1
0
void AICommand::Save(Serializer::Writer &wr)
{
	Space *space = Pi::game->GetSpace();
	wr.Int32(m_cmdName);
	wr.Int32(space->GetIndexForBody(m_ship));
	if (m_child) m_child->Save(wr);
	else wr.Int32(CMD_NONE);
}
Esempio n. 2
0
void AIParagonCmdDock::Save(Serializer::Writer &wr)
{
	if (m_child) { delete m_child; m_child = 0; }
	AICommand::Save(wr);
	Space* space = Pi::game->GetSpace();
	wr.Int32(space->GetIndexForBody(m_station));
	wr.Int32(static_cast<int>(m_state));
	wr.Int32(m_approachPoints.size());
	for(auto iter : m_approachPoints) {
		wr.Vector3d(iter.pos);
		wr.Vector3d(iter.xaxis);
		wr.Vector3d(iter.yaxis);
		wr.Vector3d(iter.zaxis);
	}
	wr.Int32(m_nextApproachPoint);
}