SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
83 stars 17 forks source link

Missing animal animations are logged multiple times #4398

Open MoltonMontro opened 1 month ago

MoltonMontro commented 1 month ago

Currently, animals only log missing animations whenever they attempt to perform that missing animation. This can cause the error logs to fill up with dozens or hundreds of the same error. E.g.,

(Animal) Example_Bear [5000]: missing AnimationClip "Eat"
(Animal) Example_Bear [5000]: missing AnimationClip "Eat"
(Animal) Example_Bear [5000]: missing AnimationClip "Glance_0"
(Animal) Example_Bear [5000]: missing AnimationClip "Eat"
(Animal) Example_Bear [5000]: missing AnimationClip "Glance_0"
(Animal) Example_Bear [5000]: missing AnimationClip "Eat"
(Animal) Example_Bear [5000]: missing AnimationClip "Eat"
(Animal) Example_Bear [5000]: missing AnimationClip "Glance_1"

This could be intentional – but maybe missing animations can be checked sooner (e.g. when the asset is loaded).

SDGNelson commented 1 month ago

You're right it should probably be checked during loading. Some of these error checks were just added wherever was convenient with the hope that if anyone runs into them they'll fix it rather than letting it spam the log.