Skip to content

Dispensers can obey gravity - #1490

Merged
weluvgoatz merged 2 commits into
masterfrom
gravity
Aug 5, 2020
Merged

weluvgoatz merged 2 commits into
masterfrom
gravity

Conversation

@weluvgoatz

Copy link
Copy Markdown
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.

Comment thread src/badguy/dispenser.cpp Outdated
if (m_gravity)
{
BadGuy::active_update(dt_sec);
m_physic.enable_gravity(true);

Copy link
Copy Markdown
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?

@weluvgoatz weluvgoatz Aug 3, 2020 •

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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
Copy Markdown
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