Update bike mod to v1.2.1...

https://gitlab.com/h2mm/bike/tags/1.2.1
master
Jordan Irwin 2021-07-20 19:19:15 -07:00
parent abbcea7618
commit 8dc4423612
2 changed files with 13 additions and 4 deletions

View File

@ -133,7 +133,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
* [tools_obsidian][] ([LGPL / CC BY-SA][lic.tools_obsidian]) -- version: [1.0][ver.tools_obsidian] *2021-01-15*
* [workbench][] ([BSD][lic.workbench]) -- version: [1.0][ver.workbench] *2021-06-10*
* transport/
* [bike][] ([MIT][lic.bike]) -- version: [e1474ff Git][ver.bike] *2021-06-30*
* [bike][] ([MIT][lic.bike]) -- version: [1.2.1][ver.bike] *2021-07-02*
* [boats][boats2] ([LGPL][lic.lgpl3.0] / [CC BY-SA][lic.ccbysa3.0]) -- version: [b83231e Git][ver.boats2] *2016-10-14* ([patched][patch.boats2]) ***UPSTREAM MOVED***
* [helicopter][] ([GPL][lic.gpl2.0] / [CC0][lic.cc0] / CC BY-NC) -- version: [d3985b0 Git][ver.helicopter] *2021-04-27* ([patched][patch.helicopter])
* [hot_air_balloons][] ([LGPL][lic.lgpl2.1] / [CC BY-SA][lic.ccbysa3.0]) -- version: [39a3572 Git][ver.hot_air_balloons] *2020-11-17*
@ -558,7 +558,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[ver.away]: https://github.com/kahrl/minetest-mod-away/tree/4c1e5a9
[ver.bags]: https://github.com/cornernote/minetest-bags/tree/bc87b45
[ver.basic_materials]: https://gitlab.com/VanessaE/basic_materials/-/tags/2021-01-30
[ver.bike]: https://gitlab.com/h2mm/bike/tree/e1474ff
[ver.bike]: https://gitlab.com/h2mm/bike/tags/1.2.1
[ver.biofuel]: https://github.com/APercy/minetest_biofuel/tree/ca480ce
[ver.boats2]: https://github.com/amadin/boats/tree/b83231e
[ver.bonemeal]: https://notabug.org/TenPlus1/bonemeal/src/b5819d022ea79e702dee4e2e0c433ab28dfaf2ab

View File

@ -474,7 +474,7 @@ local function bike_anim(self)
end
-- Run every tick
function bike.on_step(self, dtime)
function bike.on_step(self, dtime, moveresult)
-- Player checks
if self.driver then
-- Is the actual player somehow still visible?
@ -622,7 +622,16 @@ function bike.on_step(self, dtime)
end
-- Can we ride good here?
if not is_bike_friendly({x=p.x, y=p.y + self.collisionbox[2] - 0.05, z=p.z}) then
local bike_friendly = true
for _, collision in ipairs(moveresult.collisions) do
if collision.type == "node" and collision.axis == "y" then
if not is_bike_friendly(collision.node_pos) then
bike_friendly = false
break
end
end
end
if not bike_friendly then
self.v = self.v / math.pow(setting_offroad_friction, dtime)
end