projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc47ff7
)
Fix shift-descend to ladders from a floor
author
Perttu Ahola
<celeron55@gmail.com>
Mon, 3 Sep 2012 20:31:51 +0000
(23:31 +0300)
committer
Perttu Ahola
<celeron55@gmail.com>
Mon, 3 Sep 2012 20:31:51 +0000
(23:31 +0300)
src/localplayer.cpp
patch
|
blob
|
history
diff --git
a/src/localplayer.cpp
b/src/localplayer.cpp
index 46a10c90b3634f7a0f25002811f8c5fda7d5f3f7..4b5e53fea294734e765ea262ab0eb070f69ea697 100644
(file)
--- a/
src/localplayer.cpp
+++ b/
src/localplayer.cpp
@@
-150,13
+150,16
@@
void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d,
position.X = rangelim(position.X, lwn_f.X-maxd, lwn_f.X+maxd);
position.Z = rangelim(position.Z, lwn_f.Z-maxd, lwn_f.Z+maxd);
- f32 min_y = lwn_f.Y + 0.5*BS;
- if(position.Y < min_y)
+ if(!is_climbing)
{
- position.Y = min_y;
+ f32 min_y = lwn_f.Y + 0.5*BS;
+ if(position.Y < min_y)
+ {
+ position.Y = min_y;
- if(m_speed.Y < 0)
- m_speed.Y = 0;
+ if(m_speed.Y < 0)
+ m_speed.Y = 0;
+ }
}
}