mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fixed a few problems in the ladder update, and changed the speed to account for gravity
This commit is contained in:
parent
1c59cff832
commit
8e67f4c4e6
3 changed files with 6 additions and 6 deletions
|
@ -382,8 +382,8 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d,
|
|||
try {
|
||||
v3s16 pp = floatToInt(position + v3f(0,0.5*BS,0), BS);
|
||||
v3s16 pp2 = floatToInt(position + v3f(0,-0.2*BS,0), BS);
|
||||
is_climbing = (content_features(map.getNode(pp).d).climbable ||
|
||||
content_features(map.getNode(pp2).d).climbable);
|
||||
is_climbing = (content_features(map.getNode(pp).getContent()).climbable ||
|
||||
content_features(map.getNode(pp2).getContent()).climbable);
|
||||
}
|
||||
catch(InvalidPositionException &e)
|
||||
{
|
||||
|
@ -832,7 +832,7 @@ void LocalPlayer::applyControl(float dtime)
|
|||
if (is_climbing) {
|
||||
if (control.up || control.left || control.right || control.down) {
|
||||
v3f speed = getSpeed();
|
||||
speed.Y = 2*BS;
|
||||
speed.Y = 2.5*BS;
|
||||
setSpeed(speed);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue