View Issue Details

IDProjectCategoryView StatusLast Update
0004037The Dark ModAIpublic24.01.2015 08:17
Reportergrayman Assigned ToSteveL  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.03 
Fixed in VersionTDM 2.03 
Summary0004037: Revenant is in a constant waitstate of "sheath"
DescriptionThe revenenant has his sword in hand at mission start. Looking at the waitstates, his waitstate is "sheath" and it stays that way forever.

Find out why and fix it.
TagsNo tags attached.

Activities

SteveL

SteveL

15.01.2015 18:50

reporter   ~0007347

Which map?
grayman

grayman

15.01.2015 20:39

viewer   ~0007348

Any map.

The revenant deploys his sword by default.
SteveL

SteveL

15.01.2015 20:49

reporter   ~0007349

Is it not causing bugs then? I assumed that the revenant in question was stuck doing nothing like our paralysed sitters. Clearly not, since you logged this against 2.04.
grayman

grayman

15.01.2015 20:57

viewer   ~0007350

No, he's not stuck, but we do ask the revenant to turn and sit and sleep, so it's possible the constant "sheath" waitstate might get in the way.

And I'm curious why the code says he should have his sword out when spawned and then ask him to sheathe it and the sheathing didn't occur (and finish).
SteveL

SteveL

24.01.2015 02:55

reporter   ~0007381

He's apparently missing a "draws_weapon" spawnarg. That gets read by the AI script object into tdm_ai_base::m_drawsWeapon during initialization.

The sheathing animstate quits at the first check, and without releasing the wait state:
//
if (!m_DrawsWeapon)
{
    // cannot sheathe weapon
    m_SheathingWeapon = 0; // grayman 0003331
    animState(ANIMCHANNEL_TORSO, "Torso_Idle", 4);
}
//

It wants a call to finishAction in there, mirroring the one in Torso_DrawWeapon, as well as a spawnarg I guess. I'll try it..
SteveL

SteveL

24.01.2015 03:04

reporter   ~0007382

Ah, I think it's deliberate. There's a comment in the revenant def where you'd expect the spawnarg to be, "// Revenants always have their weapons out".
SteveL

SteveL

24.01.2015 03:10

reporter   ~0007383

So no change to entity def, but I added the finishaction which does clear up his wait state ok.

at rev 14211
grayman

grayman

24.01.2015 03:40

viewer   ~0007384

Ok, good.

My bad.

I fixed a few of these I found a month ago in other scripts, where an early exit failed to clear the waitstate.

We should include a general check for this type of error when we go over the waitstate use in 2.04.
SteveL

SteveL

24.01.2015 08:17

reporter   ~0007387

Agreed. It would be great if we could do away with scripts having to switch them off at all. If that's not do-able, then erm yes some kind of check, automated if possible!

Issue History

Date Modified Username Field Change
14.01.2015 20:37 grayman New Issue
15.01.2015 03:21 grayman Summary Revenant is in a contstant waitstate of "sheath" => Revenant is in a constant waitstate of "sheath"
15.01.2015 18:50 SteveL Note Added: 0007347
15.01.2015 20:39 grayman Note Added: 0007348
15.01.2015 20:49 SteveL Note Added: 0007349
15.01.2015 20:57 grayman Note Added: 0007350
21.01.2015 08:23 SteveL Assigned To => SteveL
21.01.2015 08:23 SteveL Status new => assigned
24.01.2015 02:55 SteveL Note Added: 0007381
24.01.2015 03:04 SteveL Note Added: 0007382
24.01.2015 03:10 SteveL Note Added: 0007383
24.01.2015 03:11 SteveL Status assigned => resolved
24.01.2015 03:11 SteveL Resolution open => fixed
24.01.2015 03:12 SteveL Fixed in Version => TDM 2.03
24.01.2015 03:12 SteveL Target Version TDM 2.04 =>
24.01.2015 03:40 grayman Note Added: 0007384
24.01.2015 08:17 SteveL Note Added: 0007387