Example #1
0
void Player::NotifyRemoved(const Body* const removedBody)
{
	if (GetNavTarget() == removedBody)
		SetNavTarget(0);

	else if (GetCombatTarget() == removedBody) {
		SetCombatTarget(0);

		if (!GetNavTarget() && removedBody->IsType(Object::SHIP))
			SetNavTarget(static_cast<const Ship*>(removedBody)->GetHyperspaceCloud());
	}

	Ship::NotifyRemoved(removedBody);
}
Example #2
0
//XXX ui stuff
void Player::OnEnterHyperspace()
{
	s_soundHyperdrive.Play("Hyperdrive_Jump");
	SetNavTarget(0);
	SetCombatTarget(0);

	Pi::game->GetWorldView()->HideTargetActions(); // hide the comms menu
	m_controller->SetFlightControlState(CONTROL_MANUAL); //could set CONTROL_HYPERDRIVE
	ClearThrusterState();
	Pi::game->WantHyperspace();
}
Example #3
0
void Player::OnEnterHyperspace()
{
	SetNavTarget(0);
	SetCombatTarget(0);

	if (Pi::player->GetFlightControlState() == Player::CONTROL_AUTOPILOT)
		Pi::player->SetFlightControlState(Player::CONTROL_MANUAL);

	ClearThrusterState();

	Pi::game->WantHyperspace();
}