Suspicion related updates.
This commit is contained in:
parent
ceb7040ce8
commit
13253ee1e8
Binary file not shown.
Before Width: | Height: | Size: 545 KiB After Width: | Height: | Size: 533 KiB |
|
@ -991,6 +991,8 @@ void checkSuspicionLevel(void)
|
|||
player->side = SIDE_ALLIES;
|
||||
|
||||
addMessageBox(self->name, "Intruder alert! We have an intruder! All units, target and destroy that fighter!", MB_PANDORAN);
|
||||
|
||||
addMessageBox(player->name, _("Hell! My cover's been blown, they're on to me!"), MB_IMPORTANT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -606,11 +606,11 @@ static void drawSuspicionLevel(void)
|
|||
|
||||
if (battle.suspicionLevel < (MAX_SUSPICION_LEVEL * 0.5))
|
||||
{
|
||||
SDL_SetRenderDrawColor(app.renderer, 255, 128, 0, 255);
|
||||
SDL_SetRenderDrawColor(app.renderer, 255, 255, 255, 255);
|
||||
}
|
||||
else if (battle.suspicionLevel < (MAX_SUSPICION_LEVEL * 0.75))
|
||||
{
|
||||
SDL_SetRenderDrawColor(app.renderer, 255, 255, 255, 255);
|
||||
SDL_SetRenderDrawColor(app.renderer, 255, 128, 0, 255);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@ static void preFireMissile(void);
|
|||
static void applyRestrictions(void);
|
||||
static int isPriorityMissionTarget(Entity *e, int dist, int closest);
|
||||
static int targetOutOfRange(void);
|
||||
static void setPilotName(void);
|
||||
|
||||
static int selectedPlayerIndex;
|
||||
static int availableGuns[BT_MAX];
|
||||
|
@ -77,8 +78,8 @@ void initPlayer(void)
|
|||
{
|
||||
player->selectedGunType = 0;
|
||||
}
|
||||
|
||||
STRNCPY(player->name, "Player", MAX_NAME_LENGTH);
|
||||
|
||||
setPilotName();
|
||||
|
||||
player->action = NULL;
|
||||
|
||||
|
@ -88,6 +89,30 @@ void initPlayer(void)
|
|||
player->flags |= EF_NO_HEALTH_BAR;
|
||||
}
|
||||
|
||||
static void setPilotName(void)
|
||||
{
|
||||
int i, pos;
|
||||
|
||||
pos = -1;
|
||||
|
||||
for (i = 0 ; i < strlen(game.currentMission->pilot) ; i++)
|
||||
{
|
||||
if (game.currentMission->pilot[i] == ' ')
|
||||
{
|
||||
pos = i;
|
||||
}
|
||||
}
|
||||
|
||||
memset(player->name, '\0', MAX_NAME_LENGTH);
|
||||
|
||||
if (pos != -1)
|
||||
{
|
||||
memcpy(player->name, game.currentMission->pilot + pos + 1, strlen(game.currentMission->pilot) - pos - 1);
|
||||
}
|
||||
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Pilot name = '%s'", player->name);
|
||||
}
|
||||
|
||||
void doPlayer(void)
|
||||
{
|
||||
battle.boostTimer = MIN(battle.boostTimer + 1, BOOST_RECHARGE_TIME);
|
||||
|
|
Loading…
Reference in New Issue