forked from VoxeLibre/VoxeLibre
Compare commits
2 Commits
master
...
horse-armo
Author | SHA1 | Date |
---|---|---|
David McMackins II | a0e8727a5d | |
David McMackins II | 59b6385d10 |
|
@ -409,14 +409,17 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
|
|
||||||
-- Slow down or speed up
|
-- Slow down or speed up
|
||||||
local acc = dir.y * -1.8
|
local acc = dir.y * -1.8
|
||||||
|
local friction = 0.4
|
||||||
local speed_mod = minetest.registered_nodes[minetest.get_node(pos).name]._rail_acceleration
|
local speed_mod = minetest.registered_nodes[minetest.get_node(pos).name]._rail_acceleration
|
||||||
|
|
||||||
|
acc = acc - friction
|
||||||
|
|
||||||
if has_fuel then
|
if has_fuel then
|
||||||
acc = acc + 0.2
|
acc = acc + 0.6
|
||||||
elseif speed_mod and speed_mod ~= 0 then
|
end
|
||||||
acc = acc + speed_mod
|
|
||||||
else
|
if speed_mod and speed_mod ~= 0 then
|
||||||
acc = acc - 0.4
|
acc = acc + speed_mod + friction
|
||||||
end
|
end
|
||||||
|
|
||||||
new_acc = vector.multiply(dir, acc)
|
new_acc = vector.multiply(dir, acc)
|
||||||
|
|
|
@ -253,6 +253,7 @@ local horse = {
|
||||||
|
|
||||||
|
|
||||||
-- Put on armor and take armor from player's inventory
|
-- Put on armor and take armor from player's inventory
|
||||||
|
local w = clicker:get_wielded_item()
|
||||||
local armor = minetest.get_item_group(iname, "horse_armor")
|
local armor = minetest.get_item_group(iname, "horse_armor")
|
||||||
self._horse_armor = iname
|
self._horse_armor = iname
|
||||||
if not minetest.settings:get_bool("creative_mode") then
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
|
|
Loading…
Reference in New Issue