Skip to content

Refactor handling of AnimatedObjects#794

Closed
leezer3 wants to merge 1 commit into
masterfrom
UnifiedObject
Closed

Refactor handling of AnimatedObjects#794
leezer3 wants to merge 1 commit into
masterfrom
UnifiedObject

Conversation

@leezer3

@leezer3 leezer3 commented Jun 8, 2022

Copy link
Copy Markdown
Owner

This PR refactors AnimatedObjects so that they are a subset of the overarching UnifiedObject

Required by #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??

@leezer3

leezer3 commented Jun 15, 2022

Copy link
Copy Markdown
Owner Author

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...

@leezer3

leezer3 commented Jun 21, 2022

Copy link
Copy Markdown
Owner Author

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.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant