146 Commits
Author SHA1 Message Date
Mike Nelson 60777154be Hud config upgrades (#6581)
* base working version

* localization and minor tweaks

* add retail UI controls

* Add way to hide gauges from Config view

* convert hud config from index matching to id matching

* clang
2025-03-22 22:47:38 -04:00
Mike Nelson 22f34e7d91 config rendering for escort and ets gauges (#6574) 2025-02-28 21:36:24 -05:00
Mike Nelson 5b736b1ddc Hud config framework (#6495)
* Add scaling for vfnts and scale multipler to gr_string

* nullptr

* Add scaling to a couple other string operations

* Add scaling features to additional bitmap drawing methods

* Implement framework for rendering hud gauges in config mode

* fix merge error

* address feedback
2025-02-03 07:01:47 -05:00
Goober5000 f4669db41c constify some turret code
Apply `const` to a whole bunch of functions.  Also change a bunch of ints to bools.
2023-12-30 00:00:31 -05:00
Asteroth 1b04d9f22c trigger state 2023-11-07 01:22:44 -05:00
BMagnu 02e84f212a Fix HUD slewing (#5656)
* Fixup HUD for slewing

* Fix Training Message box

* Lead indicator slew

* Fix HUD Message Head

* Correctly render messages

* Fix HUD offset handling

* HUD offset never makes any sense

* Cleanup offset code

* Remove unused parameter

* Fix Talking Head in RTT mode
2023-10-16 01:44:17 +09:00
Asteroth bc09f0672b better hud gauge load safety 2023-07-07 01:20:11 -04:00
Goober5000 6de5c96127 add should-be-dead checks for object iterations (#5050)
Follow-up to #5040.  This extends the checks to most iterations over `obj_used_list` in FSO.  There are a few exceptions such as `waypoint_add` and `waypoint_remove`, plus a few others.  And none of the object iterations in FRED have the guard because FRED does not use the same object life cycle as FSO.
2022-12-31 23:23:39 -05:00
Goober5000 1070d1dbea patch hud-lock iteration for objects that aren't ships
Add a few more safety checks; don't assume every item is a ship.
2022-12-21 00:40:09 -05:00
kiloku fa494aa8ce Fix comment formatting 2022-08-12 12:52:04 -03:00
kiloku a90e95bb33 Merge branch 'aspect_immune_ship_flag' of https://github.com/Kiloku/fs2open.github.com into Kiloku-aspect_immune_ship_flag 2022-08-12 11:42:17 -03:00
John Fernandez 4250aab601 Hud Bracket fixes
1) A comprehensive fix for the is_target_dying variable

2) Also do distance correctly for non-player target brackets by adding a check that we're dealing with the target before using the current target distance.  Then also calc distance if it is not the player target.

3) Update comments and checks to be consistent

Many of these did not reflect how the variable was actually used, so update the comments.
2022-06-29 11:40:12 -04:00
kiloku ecbebfab00 Fix some undesired whitespace changes 2022-06-04 13:26:28 -03:00
kiloku aecc626634 Add new ship flag Aspect_immune which stops ships from being locked onto by aspect seeking weapons 2022-06-04 12:54:16 -03:00
Asteroth 496cef91c0 dont exclude primary targets from dead targeting (#3781) 2021-11-18 03:35:24 -05:00
BMagnu b7258f5fea Add Bomb-locking secondaries (#3588)
* Add Bomb-locking secondaries

* Change to different flag

* Address feedback
2021-10-21 20:09:50 +09:00
BMagnu 2b63097c12 Exclude dead subsys from targeting (#3614)
* Exclude dead subsys from targeting

* Put behaviour behind flags

* Make ML lock disappear when subsys dies

* Flip flag to change default behaviour
2021-10-03 03:57:40 +09:00
Baezon f1ddfafdf3 fix a bug from ai multilock 2021-07-09 01:55:35 -04:00
Asteroth 589071ac46 Merge pull request #3183 from Baezon/ai-multilock
Add AI support for multilock
2021-06-23 02:15:07 -04:00
JohnAFernandez e6579fca09 fix missiles locking during pause 2021-06-14 22:37:32 -04:00
Baezon 4b3a1a8d84 unused variables 2021-01-28 20:39:29 -05:00
Baezon 824c537bd2 Merge remote-tracking branch 'upstream/master' into ai-multilock 2021-01-28 12:25:35 -05:00
Baezon 766624600d update name 2021-01-06 18:04:59 -05:00
Baezon 67de007ecb lock restrictions safety 2021-01-06 14:28:27 -05:00
JohnAFernandez 508b420f07 Set correct time stamp for already-locked indicators. (#3002) 2020-12-21 09:07:05 -05:00
Baezon ab2c08392e in-progress 2020-12-14 04:29:55 -05:00
Baezon 602dd45c10 fix los for multilock 2020-12-13 00:03:43 -05:00
Baezon 96bd94dfa5 lock restriction enhancements 2020-11-20 12:04:03 -05:00
Goober5000 9eaa7bf024 redo the locking animations for multilock
The multilock patch did not handle `Lock_anim` in the best way, and handled `Lock_gauge` in a very bizarre way, despite the fact that they are two simple hud animations.  This changes the `lock_info` struct to track the correct `time_elapsed` value for both, and changes the locking code to use the values in the correct way.

Additionally, this properly loops the lock triangles on the FS1 lock indicator.  Strangely, even prior to the multilock merge it appears that the triangles wouldn't have animated more than a quarter turn.

Finally, this prevents the FS1 lock indicator from blinking, since in retail FS1 it didn't blink.

Tested with FSPort and no-mods.  Fixes #2826.
2020-10-27 02:55:36 -04:00
Phantom Hoover 9a5186f637 Avoid resetting player_has_lock unless they've actually lost their lock 2020-10-24 20:26:55 +01:00
Baezon 06dd153f80 v1 2020-10-02 16:11:40 -04:00
Tyler Blount a8148940be Properly fix #2685 2020-08-27 11:08:31 -06:00
Tyler Blount c2e9c99ab5 Set ai_info lock variable if the player has any lock slots firing 2020-08-27 00:22:37 -06:00
Tyler Blount 70bf31fbf6 Fix missile track loop playing infinitely 2020-08-19 20:20:26 -06:00
Baezon 48313c826f v2 2020-08-08 21:16:43 -04:00
Baezon 6927b5cef1 objectify 2020-08-07 23:28:43 -04:00
Baezon ededcd8156 v1 2020-08-07 03:20:26 -04:00
Baezon 860423b577 wip 2020-08-06 20:48:16 -04:00
Tyler Blount 671301a936 Fix lock sounds not playing correctly with multilock 2020-08-02 16:14:20 -06:00
Tyler Blount f03f97bbcd Fix Travis CI errors 2020-07-26 18:38:57 -06:00
Tyler Blount b969b45b68 Correctly implement fixes from #73 2020-07-26 18:38:57 -06:00
Tyler Blount 9dbdf06c89 CI and Lock fixes 2020-07-26 18:38:57 -06:00
Tyler Blount 4bdded6650 Fix some CI errors 2020-07-26 18:38:57 -06:00
Tyler Blount a283b93e85 No Dumbfire fix
Another fix for MLMs associated with the No Dumbfire flag.
2020-07-26 18:38:56 -06:00
Tyler Blount f089404520 More fixes
Contains changes related to failed CI builds and feedback.
2020-07-26 18:38:56 -06:00
Tyler Blount 2610bc632a Lost fixes
These were lost during a rebase at one point. Will leave this commit as separate to avoid issues in the future.
2020-07-26 18:38:56 -06:00
Swifty 32c38e696d Initial commit of multilock missile features. 2020-07-26 18:38:56 -06:00
Goober5000 c9df8a13f1 add functions to remove the clutter of static casts for ship and weapon info vectors 2020-03-14 13:02:12 -04:00
Goober5000 1926d3c341 oof, more changes 2020-03-05 20:49:16 -05:00
asarium 2ded9aa35d Format changes with clang-format 2018-07-16 10:21:52 +02:00