projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f83d868
)
Do not increase breath if at full breath.
author
Auke Kok
<sofar@foo-projects.org>
Sat, 11 Mar 2017 07:37:30 +0000
(23:37 -0800)
committer
Auke Kok
<sofar+github@foo-projects.org>
Sun, 12 Mar 2017 01:00:40 +0000
(17:00 -0800)
Prevents the server from sending TOCLIENT_BREATH packets
every 0.5seconds, if there is no reason to.
src/content_sao.cpp
patch
|
blob
|
history
diff --git
a/src/content_sao.cpp
b/src/content_sao.cpp
index f87977f800e2b18d6bd8e3ef423931a0475033e2..d4a218505f21429d37ab0612bf9de92c2a5cda90 100644
(file)
--- a/
src/content_sao.cpp
+++ b/
src/content_sao.cpp
@@
-965,7
+965,7
@@
void PlayerSAO::step(float dtime, bool send_recommended)
MapNode n = m_env->getMap().getNodeNoEx(p);
const ContentFeatures &c = m_env->getGameDef()->ndef()->get(n);
// If player is alive & no drowning, breath
- if (m_hp > 0 && c.drowning == 0)
+ if (m_hp > 0 &&
m_breath < PLAYER_MAX_BREATH &&
c.drowning == 0)
setBreath(m_breath + 1);
}