Some changes I made

Post Reply
bmaxa
Posts: 10
Joined: Sat May 31, 2014 2:12 pm

Some changes I made

Post by bmaxa » Wed Jun 04, 2014 8:01 am

Player::NotifyRemoved should reset both nav and combat targets.
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);
}
Another thing I added is base price modification difference between current and selected system.
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 ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests