OpenBVE
OpenBVE copied to clipboard
Refactor handling of AnimatedObjects
This PR refactors AnimatedObjects so that they are a subset of the overarching UnifiedObject
Required by https://github.com/leezer3/OpenBVE/pull/684 in order to get the HierarchyAnimatedObjects working correctly, as these require a totally different update method.
TODO:
- Need to slim down and combine the methods.
- Provide a virtual Update() method within the UnifiedObject
- Can we get rid of some more of the excess parameters in some of these methods?
- Possibly convert a bunch of the AnimatedObject booleans to a flags enum??
Hmm...
Structural issues are a major problem here :/ Far too much depending on being able to access deep within the CarSection / Elements.
This might want a rethink / major rework of the entire CarSection approach...
https://github.com/leezer3/OpenBVE/tree/CarSectionRefactor
Marginally tested rework of the CarSection, to be used as an alternative to this. Appears to work 'better' but I'm not at all convinced with the entire ObjectState concept :/ Quite a bit of reference chucking about too, which I'm not thrilled by....
I think this one should actually allow the HierarchyAnimatedObjects to be used in a CarSection, but may well break in new and interesting ways.....