View Issue Details

IDProjectCategoryView StatusLast Update
0003074The Dark ModAIpublic20.04.2012 18:37
ReporterArcturus Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityalways
Status closedResolutionfixed 
Product VersionTDM 1.08 
Target VersionTDM 1.08Fixed in VersionTDM 1.08 
Summary0003074: Incorrect run animation when NPC has weapon attached but not drawn
DescriptionWhen path corner is set to 'run' a patroling NPC with weapon attached to belt will play run_charge animation instead of simple run, even though it's not alerted. It looks silly because right hand is not moving.
Code doesn't distinguish weapon attached to belt from weapon in hand.
TagsNo tags attached.

Activities

Springheel

Springheel

03.04.2012 20:25

administrator   ~0004434

Right now the "run_charge" animation is selected by using the "replace anim" spawnarg in the weapon entity def. The run is replaced as long as the weapon entity is def_attached, regardless of the joint.

What would be useful is some way to create "replace anim" spawnargs that check the joint they're attached to.
grayman

grayman

04.04.2012 04:18

viewer   ~0004441

If we create a new spawnarg:

"joint_for_anim_replacement" "<name of joint>"

that would mean when that entity is attached at that joint, the replace_anim_* spawnargs take effect.

If the entity is attached at a different joint, then the replacement spawnargs are ignored.

So, for the sword, for example, we'd add:

"joint_for_anim_replacement" "LeftHand"

If the attachment doesn't have "joint_for_anim_replacement" defined (like the torch), then the replacement anims are honored.
grayman

grayman

04.04.2012 04:29

viewer   ~0004442

Or we change the syntax of the replace_anim_* spawnarg to add a 'joint name':

"replace_anim_LeftHand_run" "run_charge"

Then you could have

"replace_anim_LeftHand_run" "run_charge"
"replace_anim_Hip_run" "run_with_something_on_hip"

which lets you have different animations depending on where the attachment is attached.

But when using the spawnargs on AI themselves, not with attachments, we'd have to have:

"replace_anim_Self_idle_spit" "idle_check_hand"

which means when the code sees the joint name "Self" it ignores it and honors the replacement.
grayman

grayman

07.04.2012 18:59

viewer   ~0004448

Last edited: 07.04.2012 21:48

Change replace_anim syntax to:

"replace_anim_<replacedAnimation>[ jointName]" "<replacingAnimation>"

Change affected animations in *.def files.

rev. 5369:

Actor.cpp
Actor.h
AFEntity.cpp
AFEntity.h
Entity.cpp
Entity.h

rev. 12760:

tdm_moveable_weapons.def

Issue History

Date Modified Username Field Change
03.04.2012 09:30 Arcturus New Issue
03.04.2012 20:25 Springheel Note Added: 0004434
04.04.2012 04:18 grayman Note Added: 0004441
04.04.2012 04:19 grayman Assigned To => grayman
04.04.2012 04:19 grayman Status new => assigned
04.04.2012 04:29 grayman Note Added: 0004442
07.04.2012 18:59 grayman Note Added: 0004448
07.04.2012 18:59 grayman Status assigned => resolved
07.04.2012 18:59 grayman Resolution open => fixed
07.04.2012 18:59 grayman Fixed in Version => TDM 1.08
07.04.2012 18:59 grayman Target Version => TDM 1.08
07.04.2012 21:48 grayman Note Edited: 0004448
20.04.2012 18:37 Arcturus Status resolved => closed