Files
fs2open.github.com/code
Goober5000 03bf756d5c fix ai behavior when avoiding ship and weapon shockwaves
The FreeSpace AI includes behavior to run away from shockwaves to try to avoid explosion damage.  This is implemented for both ships and missiles, although the missile implementation has been buggy ever since retail.  There are several issues:

1. The AI attempts to evade a weapon immediately upon launch.  Many missiles have a period of free flight before they start homing on their target.  During the free flight period, the homing position is not set.  Consequently, the AI will not know the position to avoid and will make assumptions.
2. The AI assumes the shockwave-producing weapon will detonate at the center of the ship it is targeting, although missiles detonate on the surface.  A capital ship is likely to be significantly larger than the weapon's blast radius, leading the AI to believe the detonation will be much farther away than it actually is.
3. When avoiding ship shockwaves, the `shockwave_object` field is not cleared when avoiding is complete.  This can result in stale references (though not crashes, due to object type checks), causing AI to not avoid future explosions in certain cases.
4. When avoiding ship shockwaves, the code does not check the correct ship for the amount of damage caused by the shockwave.

All of these issues are now fixed.  Since this is a change in AI behavior, these fixes are tied to a new AI profiles flag.
2024-11-12 00:40:05 -05:00
..
2023-10-31 13:09:03 -04:00
2024-07-06 12:51:31 +02:00
2024-08-27 14:06:13 -04:00
2024-10-09 14:39:34 -04:00
2018-07-15 19:37:24 +02:00
2023-10-24 20:33:45 -04:00
2024-01-29 22:07:37 -05:00
2024-09-11 01:31:22 -04:00
2024-08-27 02:30:03 -04:00
2023-04-26 19:36:16 -04:00
2024-07-04 18:08:27 -04:00
2023-02-19 14:58:17 -06:00
2024-08-27 23:30:25 -04:00
2024-11-10 16:40:07 +09:00
2024-11-05 15:15:16 -05:00
2024-11-02 22:04:38 -04:00
2024-08-27 23:30:25 -04:00
2024-11-11 14:17:16 +09:00
2024-08-27 23:30:25 -04:00
2019-11-03 16:27:23 -05:00
2024-07-01 16:01:31 -04:00
2024-10-28 17:27:14 +09:00
2024-09-13 16:42:13 -04:00
2024-07-05 01:14:36 -04:00
2024-07-06 12:51:31 +02:00
2024-10-28 17:27:14 +09:00
2024-07-28 11:15:02 +02:00
2016-07-22 12:07:19 +02:00