attempted fix for #185

master
D00Med 2018-06-01 17:09:47 +10:00
parent 7c664b7777
commit 180f9ecf3c
1 changed files with 11 additions and 0 deletions

View File

@ -101,6 +101,17 @@ local npc_go_home = function(self, dtime)
end
end
local set_velocity = function(self, v)
local yaw = (self.object:getyaw() or 0) + self.rotate
self.object:setvelocity({
x = sin(yaw) * -v,
y = self.object:getvelocity().y,
z = cos(yaw) * v
})
end
mobs:register_mob("mobs_npc:npc", {
type = "npc",
passive = false,