1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 14:16:06 +02:00

Fix crash when right-click on turtle

Customize mobs spawning in minetest.conf
This commit is contained in:
sys4-fr
2017-12-08 21:12:47 +01:00
parent 5a5221efaf
commit b732dbe4b5
2 changed files with 38 additions and 0 deletions

View File

@ -1,6 +1,22 @@
if mobs.mod and mobs.mod == "redo" then
local sin = math.sin
local cos = math.cos
-- move mob in facing direction
local set_velocity = function(self, v)
local yaw = (self.object:get_yaw() or 0) + self.rotate
self.object:setvelocity(
{
x = sin(yaw) * -v,
y = self.object:getvelocity().y,
z = cos(yaw) * v
})
end
local l_colors = {
"#604000:175", --brown
"#604000:100", --brown2