Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update track motion #2174

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

duncanspumpkin
Copy link
Contributor

This is the main track update motion function that handles traveling along a track. It is not complete and I'm not entirely sure i want to go down this route with templates. I'm leaning to not doing it like this and adding more getters/setters to the VehicleCommon. There are a few other issues that need address before this is ready like fixing subposition data.

switch (getSubType())
{
case VehicleEntityType::head:
return updateTrackMotionT(*reinterpret_cast<VehicleHead*>(this), unk1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have a function as for this, having a visitor pattern for this would be a pretty good thing which skips the entire checking for the type then, I would propose to just use as for now and then we should look into adding visitSubType or something to make patterns like this easier.

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.

None yet

2 participants