Don't point to jumpgate on HUD if it's inactive.
This commit is contained in:
parent
96556bc0df
commit
ed6b0ae376
|
@ -330,7 +330,7 @@ static void drawPlayerTargeter(void)
|
||||||
float angle;
|
float angle;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
if (player->target || battle.missionTarget || battle.jumpgate)
|
if (player->target || battle.missionTarget || (battle.jumpgate && battle.jumpgate->systemPower))
|
||||||
{
|
{
|
||||||
if (player->target)
|
if (player->target)
|
||||||
{
|
{
|
||||||
|
@ -376,7 +376,7 @@ static void drawPlayerTargeter(void)
|
||||||
blitRotated(targetPointer, x - battle.camera.x, y - battle.camera.y, angle);
|
blitRotated(targetPointer, x - battle.camera.x, y - battle.camera.y, angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battle.jumpgate)
|
if (battle.jumpgate && battle.jumpgate->systemPower)
|
||||||
{
|
{
|
||||||
angle = getAngle(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y);
|
angle = getAngle(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y);
|
||||||
x = player->x;
|
x = player->x;
|
||||||
|
@ -456,7 +456,7 @@ static void drawDistancesInfo(void)
|
||||||
|
|
||||||
y = 11;
|
y = 11;
|
||||||
|
|
||||||
if (player->target != NULL)
|
if (player->target)
|
||||||
{
|
{
|
||||||
drawText(SCREEN_WIDTH - 15, y, 18, TA_RIGHT, colors.red, player->target->name);
|
drawText(SCREEN_WIDTH - 15, y, 18, TA_RIGHT, colors.red, player->target->name);
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ static void drawDistancesInfo(void)
|
||||||
y += 25;
|
y += 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battle.missionTarget != NULL)
|
if (battle.missionTarget)
|
||||||
{
|
{
|
||||||
distance = distanceToKM(player->x, player->y, battle.missionTarget->x, battle.missionTarget->y);
|
distance = distanceToKM(player->x, player->y, battle.missionTarget->x, battle.missionTarget->y);
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ static void drawDistancesInfo(void)
|
||||||
y += 25;
|
y += 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battle.jumpgate != NULL)
|
if (battle.jumpgate && battle.jumpgate->systemPower)
|
||||||
{
|
{
|
||||||
distance = distanceToKM(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y);
|
distance = distanceToKM(player->x, player->y, battle.jumpgate->x, battle.jumpgate->y);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue