diff options
author | Piezo_ <orderofthefourthwall@gmail.com> | 2019-01-17 16:02:50 -0800 |
---|---|---|
committer | Piezo_ <orderofthefourthwall@gmail.com> | 2019-01-17 16:02:50 -0800 |
commit | 37758517ea4cd6ff8d94dc00960764631744545e (patch) | |
tree | 36ca31769abc1857436a998afd41b8d7c3950aa4 | |
parent | bcfc19a8b4e9b150cea712ec9a885592dffe6c9a (diff) | |
download | hangglider-37758517ea4cd6ff8d94dc00960764631744545e.tar.gz hangglider-37758517ea4cd6ff8d94dc00960764631744545e.tar.bz2 hangglider-37758517ea4cd6ff8d94dc00960764631744545e.zip |
Improved glider behavior when using minetestd.physicsctl
-rw-r--r-- | init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -134,11 +134,11 @@ minetestd.physicsctl.register_physics_effect("hangglider", if debug then player:hud_change(hangglider.debug[pname].id, "text", vel_y..', '..player:get_physics_override().gravity..', '..tostring(hangglider.airbreak[pname])) end phys.gravity = phys.gravity*((vel_y + 3)/20) if vel_y < 0 and vel_y > -3 then - phys.speed = phys.speed*(math.abs(vel_y/2) + 0.75) + phys.speed = (math.abs(vel_y/2) + 0.75) elseif vel_y <= -3 then --Cap our gliding movement speed. phys.speed = phys.speed*2.25 end - + phys.jump = 0 end, 7 -- effect order ) @@ -166,9 +166,9 @@ end hangglider.shot_sound = function (pos) minetest.sound_play("hangglider_flak_shot", { - pos = pos, - max_hear_distance = 30, - gain = 10.0, + pos = pos, + max_hear_distance = 30, + gain = 10.0, }) end |