diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2018-04-08 11:15:55 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2018-04-08 11:15:55 +0100 |
commit | 5889886f3cdbc0ac54b669ab0f21d4d564ebbfdc (patch) | |
tree | e927873b53d5edb55b7ad69a9727e38d4c163f7a | |
parent | 0849727ee96cceb758e97870ece4a7be8e3a372a (diff) |
disable random up.down movement for flying/swimming mobs (for now)
-rw-r--r-- | api.lua | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -3,7 +3,7 @@ mobs = {} mobs.mod = "redo" -mobs.version = "20180406" +mobs.version = "20180408" -- Intllib @@ -750,9 +750,9 @@ local do_jump = function(self) self.object:setvelocity(v) -if get_velocity(self) > 0 then - mob_sound(self, self.sounds.jump) -end + if get_velocity(self) > 0 then + mob_sound(self, self.sounds.jump) + end else self.facing_fence = true end @@ -1666,14 +1666,14 @@ local do_states = function(self, dtime) self.state = "walk" set_animation(self, "walk") - -- fly up/down randomly for flying mobs + --[[ fly up/down randomly for flying mobs if self.fly and random(1, 100) <= self.walk_chance then local v = self.object:getvelocity() local ud = random(-1, 2) / 9 self.object:setvelocity({x = v.x, y = ud, z = v.z}) - end + end--]] end end @@ -2194,7 +2194,6 @@ local falling = function(self, pos) end -- in water then float up --- if minetest.registered_nodes[node_ok(pos).name].groups.liquid then if minetest.registered_nodes[node_ok(pos).name].groups.water then if self.floats == 1 then |