diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2019-03-12 21:09:55 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2019-03-12 21:09:55 +0000 |
commit | 8b206882a4a254a123c40daf2ed369fb7e1add5a (patch) | |
tree | f6506dd2281773ac16ec30fbf7354367314baba6 | |
parent | 77290fdd7ed82442efdecfae3d497cccc5caf2ee (diff) | |
download | mob_horse-8b206882a4a254a123c40daf2ed369fb7e1add5a.tar.gz mob_horse-8b206882a4a254a123c40daf2ed369fb7e1add5a.tar.bz2 mob_horse-8b206882a4a254a123c40daf2ed369fb7e1add5a.zip |
added check for 0.4.17 and 5.0 so player doesn't float above horse when riding new horse :)
-rw-r--r-- | init.lua | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3,6 +3,14 @@ local MP = minetest.get_modpath(minetest.get_current_modname()) local S, NS = dofile(MP .. "/intllib.lua") + +-- 0.4.17 or 5.0 check +local y_off = 20 +if minetest.registered_nodes["default:permafrost"] then + y_off = 10 +end + + -- rideable horse mobs:register_mob("mob_horse:horse", { @@ -53,7 +61,7 @@ mobs:register_mob("mob_horse:horse", { self.max_speed_reverse = 2 self.accel = 6 self.terrain_type = 3 - self.driver_attach_at = {x = 0, y = 20, z = -2} + self.driver_attach_at = {x = 0, y = y_off, z = -2} self.driver_eye_offset = {x = 0, y = 3, z = 0} end |