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

No fall damage when falling up #8051

Open
SpaghettiToastBook opened this issue Jan 5, 2019 · 9 comments
Open

No fall damage when falling up #8051

SpaghettiToastBook opened this issue Jan 5, 2019 · 9 comments
Labels
Bug Issues that were confirmed to be a bug Low priority @ Server / Client / Env.

Comments

@SpaghettiToastBook
Copy link

Issue type
  • Bug report
Minetest version
0.4.17.1
Summary

If gravity is inverted, no fall damage occurs when hitting something, even if falling down from that height would induce fall damage.

@paramat paramat added Bug Issues that were confirmed to be a bug Low priority labels Jan 5, 2019
@paramat
Copy link
Contributor

paramat commented Jan 5, 2019

Interesting, low priority but would be nice to be consistent.

@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Jan 5, 2019

For those who want to look into this, here are some pointers for you:

File: src/client/clientenvironment.cpp
Function: ClientEnvironment::step

Relevant code:

         for (const CollisionInfo &info : player_collisions) {
                 v3f speed_diff = info.new_speed - info.old_speed;;
                 // Handle only fall damage
                 // (because otherwise walking against something in fast_move kills you)
                 if (speed_diff.Y < 0 || info.old_speed.Y >= 0)
                         continue;

@Desour
Copy link
Member

Desour commented Jan 5, 2019

paramat wrote at #6123 (comment):

Negative gravity is possible but not really intended or supported.

@SpaghettiToastBook
Copy link
Author

Thanks @Wuzzy2. I suppose I could try to fix it, but I have very little C++ skill...

Why isn't negative gravity supported?

@paramat
Copy link
Contributor

paramat commented Jan 6, 2019

Because it's not very useful or usable.

@SpaghettiToastBook
Copy link
Author

It'd be useful if you had an item to toggle the sign of gravity so that you can move up faster (but also risking taking fall damage), or an item that inverts gravity while jump is pressed (producing a weird sort of flight). I actually wrote a mod that makes the latter one, which is how I found this bug.

Still, I can see why negative gravity is not really that important.

@HybridDog
Copy link
Contributor

HybridDog commented Mar 9, 2019

because otherwise walking against something in fast_move kills you

This makes it unrealistic. Running against a wall should not hurt you but falling from somewhere should.
Nonetheless, damage with fast_move is bad for gameplay.
To solve this predicament, you could make the player bounce back instead of loosing hearts when running against a wall. If the gravity is inverted you'd also bounce.

@Calinou
Copy link
Contributor

Calinou commented Mar 9, 2019

Having fall damage when hitting a ceiling makes sense for consistency's sake as nodes with the bouncy group can push you upwards with great force.

I would still disable fall damage when hitting walls though.

@paramat
Copy link
Contributor

paramat commented Sep 4, 2020

A new issue for optional all-direction damage might appear, if it does this issue could perhaps be closed.
@SpaghettiToastBook are you requesting horizontal collision damage as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug Low priority @ Server / Client / Env.
Projects
None yet
Development

No branches or pull requests

7 participants