Page MenuHomeWildfire Games

UnitMotion / AI - remove the special walk animation and let unitMotion take charge
Needs ReviewPublic

Authored by wraitii on Wed, May 15, 11:02 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Following D1894, we have a convenient way to update our speed. We can use this to make unitMotion call VisualActor directly, instead of the reverse. This lets us clean up code in unitAI.

To let unitAI overwrite our idle/walk animations, we only replace the 'idle';'walk';'run' animations. Note that using animation variants, this means we support doing things while walking, to an extent.

Not subscribing to MT_Update in VisualActor is a performance improvement of several µs per turn based on past profiling of messages.

Test Plan

Check out the difference in code cleanliness

Diff Detail

Event Timeline

wraitii created this revision.Wed, May 15, 11:02 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/differential/1419/display/redirect

Stan added a subscriber: Stan.Thu, May 16, 1:43 PM
Stan added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
3166

Why this one, don't you only remove move ?

wraitii added inline comments.Thu, May 16, 7:27 PM
binaries/data/mods/public/simulation/components/UnitAI.js
3166

This should be "move", there's a bug.

wraitii updated this revision to Diff 8080.Sun, May 19, 4:55 PM

Updated

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/differential/1456/display/redirect