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

Player regains a little breath when rejoining game into ignore #8217

Closed
LoneWolfHT opened this issue Feb 10, 2019 · 3 comments
Closed

Player regains a little breath when rejoining game into ignore #8217

LoneWolfHT opened this issue Feb 10, 2019 · 3 comments
Labels
Bug Issues that were confirmed to be a bug good first issue

Comments

@LoneWolfHT
Copy link
Contributor

Issue type
  • Bug report
Minetest version
Minetest 5.0.0-dev-a809f736
OS / Hardware

Operating system: Ubuntu 18.10
CPU: AMD Ryzen 7 2700

Summary

(When the background is grey I've just joined the game)
water

Steps to reproduce

Leave the game while underwater and half out of breath. Then rejoin and watch your bubble meter. Might need to enable some heavy mods

@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Feb 10, 2019

Random guess for the reason: Player client first thinks it spawns in ignore before it loaded the liquid, and ignore does not deal drowning damage.

Solution (if my guess is true): Neither increase or decrease the breath meter while player is stuck in ignore.

@SmallJoker
Copy link
Member

Following code needs checking against ignore

minetest/src/content_sao.cpp

Lines 1017 to 1021 in ba5a9f2

MapNode n = m_env->getMap().getNodeNoEx(p);
const ContentFeatures &c = m_env->getGameDef()->ndef()->get(n);
// If player is alive & no drowning, breathe
if (m_hp > 0 && m_breath < m_prop.breath_max && c.drowning == 0)
setBreath(m_breath + 1);

@SmallJoker SmallJoker added Bug Issues that were confirmed to be a bug good first issue labels Feb 10, 2019
Wuzzy2 added a commit to Wuzzy2/minetest that referenced this issue Feb 10, 2019
Wuzzy2 added a commit to Wuzzy2/minetest that referenced this issue Feb 10, 2019
@paramat paramat changed the title Player regains a little breath when rejoining game into water Player regains a little breath when rejoining game into ignore Feb 10, 2019
@paramat
Copy link
Contributor

paramat commented Feb 10, 2019

Grey background means player is in ignore.

Wuzzy2 added a commit to Wuzzy2/minetest that referenced this issue Feb 14, 2019
nerzhul pushed a commit that referenced this issue Feb 15, 2019
* Don't regain breath while in ignore node

Fixes #8217
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 good first issue
Projects
None yet
Development

No branches or pull requests

4 participants