Page MenuHomeWildfire Games

Fallback to the closest animation name instead of falling back to idle
AbandonedPublic

Authored by Stan on Oct 23 2019, 8:34 PM.

Details

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

Currently if a unit is missing an animation, the game will fallback to the idle anim, which is good in theory, but doesn't allow for someone to have mixed anims in a group, or if we were to extend the garrison holder to play a specific variant, or it's closest fallback.

TODO: This is not efficient. I believe the entire function could be smarter. While at it, one could look at the map storing all anim names to optimize that as well see the relevant todo in objectentry.h l93
// TODO: something more memory-efficient than storing loads of similar strings for each unit?

Test Plan

Test that in actor editor the fallback walks properly for every formation containing a standard anim name. (Notice it doesn't work for phalanx_attack, because it should be attack_melee)

Diff Detail

Event Timeline

Stan created this revision.Oct 23 2019, 8:34 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/482/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/graphics/ObjectEntry.cpp
|   1| /*·Copyright·(C)·2016·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2016"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/997/display/redirect

Stan abandoned this revision.Dec 13 2020, 12:35 AM