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

Dispensers can obey gravity #1490

Merged
merged 2 commits into from
Aug 5, 2020
Merged

Dispensers can obey gravity #1490

merged 2 commits into from
Aug 5, 2020

Conversation

weluvgoatz
Copy link
Member

This adds a small option for dispensers to obey gravity. With this, you can have moving dispensers by toggling gravity and putting them on a moving platform. Enjoy.

if (m_gravity)
{
BadGuy::active_update(dt_sec);
m_physic.enable_gravity(true);
Copy link
Member

Choose a reason for hiding this comment

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

Does Badguy::active_update disable gravity again?

Copy link
Member Author

@weluvgoatz weluvgoatz Aug 3, 2020

Choose a reason for hiding this comment

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

Badguy::active_update is what allows it to update and fall, without it, this won't work.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I know, but is it necessary to call enable_gravity again after calling active_update?

Copy link
Member Author

Choose a reason for hiding this comment

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

It appears not, so it's been removed.

@weluvgoatz weluvgoatz merged commit 9bf8ec7 into master Aug 5, 2020
@mrkubax10 mrkubax10 deleted the gravity branch August 18, 2023 18:00
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.

2 participants