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

refactor submodel flags and add $rotate_accel #3786

Merged
merged 1 commit into from Nov 18, 2021

Conversation

Goober5000
Copy link
Contributor

  1. Changes the submodel flags to use a flagset instead of several booleans
  2. Adds rotate_accel to allow submodel rotation acceleration to be specified

Submodel acceleration can now be instant; dumb-rotating submodels always instantly accelerate (and have always done so)

@Goober5000 Goober5000 added the models Issues or features having to do with model data (like animations or geometry) label Nov 17, 2021
Copy link
Member

@BMagnu BMagnu left a comment

Choose a reason for hiding this comment

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

Looks good, apart from one small thing

} else {
sm->dumb_turn_rate = 0.0f;
sm->default_turn_rate = turn_rate;
sm->flags.set(Model::Submodel_flags::Instant_rotate_accel);
Copy link
Member

Choose a reason for hiding this comment

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

This should also set the Dumb_rotates flag, no?
Though it was missing before as well...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out it's not even needed (it's redundant in the one place it's used) so I removed it.

1) Changes the submodel flags to use a flagset instead of several booleans
2) Adds `rotate_accel` to allow submodel rotation acceleration to be specified

Submodel acceleration can now be instant; dumb-rotating submodels always instantly accelerate (and have always done so)
@Goober5000 Goober5000 merged commit d634ce6 into scp-fs2open:master Nov 18, 2021
@Goober5000 Goober5000 deleted the submodel_turn_accel branch November 18, 2021 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
models Issues or features having to do with model data (like animations or geometry)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants