Skip to content

Commit

Permalink
Alert the player to the Lassat being ready
Browse files Browse the repository at this point in the history
Plays a sound and shows a console message.
  • Loading branch information
KJeff01 committed Apr 16, 2024
1 parent 2a60e34 commit 83f03f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2970,6 +2970,11 @@ static void aiUpdateStructure(STRUCTURE *psStructure, bool isMission)
&& gameTime - psStructure->asWeaps[0].lastFired > weaponFirePause(*psStructure->getWeaponStats(0), psStructure->player)
&& psStructure->asWeaps[0].ammo > 0)
{
if (psStructure->player == selectedPlayer)
{
addConsoleMessage(_("Laser Satellite is ready to fire!"), CENTRE_JUSTIFY, SYSTEM_MESSAGE);
audio_PlayTrack(ID_SOUND_UPLINK); // This is about the best sound available for this.
}
triggerEventStructureReady(psStructure);
psStructure->asWeaps[0].ammo = 0; // do not fire more than once
}
Expand Down

0 comments on commit 83f03f3

Please sign in to comment.