Skip to content

Commit

Permalink
attempted fix for #185
Browse files Browse the repository at this point in the history
  • Loading branch information
D00Med committed Jun 1, 2018
1 parent 7c664b7 commit 180f9ec
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mods/mobs_npc/npc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 180f9ec

Please sign in to comment.