Also switch to hyperspace cloud should happen independently of type of target.
This is because I have added ships to list of nav targets, so that brought this
problem as code does not expects ships for nav targets.
This is modified function:
Code: Select all
void Player::NotifyRemoved(const Body* const removedBody)
{
if ((GetNavTarget()== removedBody || GetCombatTarget()==removedBody) && removedBody->IsType(Object::SHIP))
{
SetNavTarget(static_cast<const Ship*>(removedBody)->GetHyperspaceCloud());
printf("target changed to %p\n",GetNavTarget());
}
if (GetNavTarget() == removedBody)
SetNavTarget(0);
if (GetCombatTarget() == removedBody)
SetCombatTarget(0);
printf("notify nav target %p\n",GetNavTarget());
Ship::NotifyRemoved(removedBody);
}
This is displayed besides imports/exports as number. Eg -17 means 17 % cheaper .
I found this useful as now one can know how much profit will get from trip;)
Third thing is that I added laser info on radar mapper.
These are all small changes but useful for game play ;)