Source Code Project Mantis - FSSCP
View Issue Details
0002192FSSCPAIpublic2010-04-22 17:462012-07-21 19:22
Assigned ToGoober5000 
PlatformOSOS Version
Product Version3.6.12 RC2 
Target VersionFixed in Version 
Summary0002192: EMP on an A.I. that has been ordered to play dead, brings it back 'alive' again
DescriptionTested with a primary weapon with
$EMP Intensity: 175.0
$EMP Time: 1.5
these EMP settings
TagsNo tags attached.
duplicate of 0000744closed Goober5000 Inferno - protect-ship and play-dead don't work 
Attached Files

2010-05-03 10:38   
Does this bug exist in retail as well?
2010-05-03 11:00   
To answer my own question: yes it does.

The good news is that it's easy to fix. What happens is that when EMP is applied to a ship, that ship will randomly pick new targets to simulate confusion. It's simple enough to stick a check in that skips this if the ship is playing dead.

Naturally, this is going to have to be toggled with an AI profiles flag, since it affects retail behavior.

It does make me wonder, however: does EMP permanently screw up any other AI goals? If so, we might as well fix those at the same time. Is anyone willing to test this?
2010-05-03 11:05   
Oh, for the record, the bit of code to look at for this is (about) emp.cpp:355
2010-05-03 11:19   
I just did a test, giving the A.I. attack orders on a cargo container with a priority of 200 and the no dynamic goals flag. I could attack it with normal weapons all I want and it would ignore me and focus on the container. But hitting it with an EMP missile made it really really angry. Same with the initial orders to ignore Alpha 1. Hitting it with EMP made the A.I. forget all about its original goal.

So yes, it seems EMP screws up all AI goals.
2010-05-03 19:05   
Well one of the uses of EMP was to keep formations of bombers from attacking their target so that part does make sense.
2012-07-01 23:45   
EMP shouldn't disrupt play-dead though. I'm committing a fix.
2012-07-01 23:47   
Fix committed to trunk@8971.
2012-07-02 09:11   
Today I also learned that the A.I. forgets which ships are set as 'Protected' after getting EMP'd. And will thus attack them once the EMP wears off.
2012-07-03 01:02   
Fixed, again.
2012-07-04 15:46   
Fix committed to fs2_open_3_6_14@8984.

Issue History
2010-04-22 17:46SpoonNew Issue
2010-04-22 17:46SpoonStatusnew => assigned
2010-04-22 17:46SpoonAssigned To => Sushi_CW
2010-05-03 10:38Sushi_CWNote Added: 0011931
2010-05-03 11:00Sushi_CWNote Added: 0011932
2010-05-03 11:05Sushi_CWNote Added: 0011933
2010-05-03 11:19SpoonNote Added: 0011934
2010-05-03 19:05FUBAR-BDHRNote Added: 0011935
2012-07-01 23:45Goober5000Note Added: 0013779
2012-07-01 23:45Goober5000Assigned ToSushi_CW => Goober5000
2012-07-01 23:47Goober5000Changeset attached => fs2open trunk r8971
2012-07-01 23:47Goober5000Note Added: 0013780
2012-07-01 23:47Goober5000Statusassigned => resolved
2012-07-01 23:47Goober5000Resolutionopen => fixed
2012-07-02 09:11SpoonNote Added: 0013793
2012-07-02 09:11SpoonStatusresolved => feedback
2012-07-02 09:11SpoonResolutionfixed => reopened
2012-07-03 01:01Goober5000Changeset attached => fs2open trunk r8976
2012-07-03 01:02Goober5000Note Added: 0013807
2012-07-03 01:02Goober5000Statusfeedback => resolved
2012-07-03 01:02Goober5000Resolutionreopened => fixed
2012-07-04 15:46ZacamChangeset attached => fs2open fs2_open_3_6_14 r8984
2012-07-04 15:46ZacamNote Added: 0013819
2012-07-04 15:49ZacamChangeset attached => fs2open fs2_open_3_6_14 r8988
2012-07-21 19:22Goober5000Relationship addedduplicate of 0000744