View Issue Details

IDProjectCategoryView StatusLast Update
0004113The Dark ModAIpublic30.09.2015 20:05
Reportergrayman Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilitysometimes
Status resolvedResolutionfixed 
Product VersionTDM 2.03 
Target VersionTDM 2.04Fixed in VersionTDM 2.04 
Summary0004113: Alerted AI can get stuck in a sit down / get up cycle
DescriptionI saw this for the first time today in WS2 running on 2.03.

I entered the clock tower area and found the roof guard and the street guard doing this. Both had their swords out, so I suspect they heard the archer in the previous area yelling while he was agitated searching for me.

Over time, the street guard cycled himself out of the map, through the wall behind the bench near the clock tower.

This is very difficult to reproduce.

Hopefully the waitstate / animation cleanup scheduled for 2.04 will stop this from happening.
TagsNo tags attached.
Attached Files
innbiz_bug.7z (1,771,421 bytes)

Activities

SteveL

SteveL

11.06.2015 18:18

reporter   ~0007565

Savegame attached, provided by Durandall in this thread http://forums.thedarkmod.com/topic/17193-two-small-bugs/#entry372890
grayman

grayman

14.09.2015 10:43

viewer   ~0007771

SteveL,

I'll take this as far as I can from the perspective of alerting the AI and seeing how that impacts the current animation, but if it wanders into the territory of the improved 2.03 anims, I'll be pinging you for advice.
grayman

grayman

14.09.2015 13:28

viewer   ~0007772

Status:

The AI is performing a PathSitTask, and is in the initial state of sitting down. Once he's sitting, he stays in the task, waiting for a timer to run out, at which point he'll stand up and continue pathing.

If he's hit with an alert while in the act of sitting down (not yet sitting), he's asked to stand up before he can begin searching.

The path sit task, still running, finds that he's gotten out of the sitting down part of the task, and asks him to start over, and sit down again.

Then the search code says, "No, no, no, you have to be standing before you can begin searching, so stand up."

And the path sit task says, "No, no, no, you're supposed to be sitting down, so sit down."

This all used to work fine in 2.02, but we broke it somehow in 2.03.

So I have to figure out why the path sit task is no longer being killed when the AI is asked to stand up so he can begin searching. I suspect that's the root cause of the problem.

So this _might not_ have anything to do with the anim changes. We'll see.
SteveL

SteveL

14.09.2015 16:16

reporter   ~0007773

Cool, that's very clear.

The "improvements" that caused the bugs in 2.03 were to do with syncing legs to torso. If wait states on the legs come into the picture, then this could well be 2.03-related. Searching got changed by both of us too of course. You did big search upgrades, and I did at least one tweak, I remember -- because searching wasn't releasing some anim wait state.

I was planning to take a look too, but I'll stay out of your way while you're on the case. Please kick it to me if/when you put it down for a while.
grayman

grayman

14.09.2015 19:09

viewer   ~0007779

For 2.03, I fixed 0004054 by introducing states into the path sitting task. I _think_ this inadvertently introduced the bug we're seeing.

Drawing the state diagrams now to see what needs to be tweaked in the 2.03 code to fix this problem while allowing 0004054 to remain fixed.
grayman

grayman

15.09.2015 02:38

viewer   ~0007783

When a PathSitTask was waiting to complete (in any of its stages), it wasn’t handling the situation where an alert elsewhere told the AI to GetUp() and start searching. This caused the sit task to tell the AI to sit back down again, and the search code to tell the AI to stand back up. Deadly embrace.

Fix was to have the sit task recognize when the AI was getting up due to an alert, and terminate itself, leaving the search code free to take over.

Rev. 6536:

PathSitTask.cpp

Issue History

Date Modified Username Field Change
04.03.2015 15:52 grayman New Issue
11.06.2015 18:17 SteveL File Added: innbiz_bug.7z
11.06.2015 18:18 SteveL Note Added: 0007565
13.09.2015 16:11 grayman Target Version => TDM 2.04
14.09.2015 10:41 grayman Assigned To => grayman
14.09.2015 10:41 grayman Status new => assigned
14.09.2015 10:43 grayman Note Added: 0007771
14.09.2015 13:28 grayman Note Added: 0007772
14.09.2015 16:16 SteveL Note Added: 0007773
14.09.2015 19:09 grayman Note Added: 0007779
15.09.2015 02:38 grayman Note Added: 0007783
15.09.2015 02:38 grayman Status assigned => resolved
15.09.2015 02:38 grayman Resolution open => fixed
15.09.2015 02:38 grayman Fixed in Version => TDM 2.04