mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Fixed a few problems in the ladder update, and changed the speed to account for gravity
This commit is contained in:
committed by
Giuseppe Bilotta
parent
1c59cff832
commit
8e67f4c4e6
@@ -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 {
|
||||
|
Reference in New Issue
Block a user