1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-01-08 08:50:20 +01:00

lil tweak

This commit is contained in:
tenplus1 2024-09-08 15:55:26 +01:00
parent 26215cd221
commit f1b5a66049

View File

@ -18,7 +18,7 @@ end
mobs = {
mod = "redo",
version = "20240823",
version = "20240908",
spawning_mobs = {},
translate = S,
invis = minetest.global_exists("invisibility") and invisibility or {},
@ -2140,7 +2140,7 @@ function mob_class:do_states(dtime)
if lp then
yaw = self:yaw_to_pos(lp)
else
yaw = yaw + random(-0.5, 0.5)
yaw = yaw + random() - 0.5
end
self:set_yaw(yaw, 8)
@ -2164,7 +2164,7 @@ function mob_class:do_states(dtime)
if self.randomly_turn and random(100) <= 30 then
yaw = yaw + random(-0.5, 0.5)
yaw = yaw + random() - 0.5
self:set_yaw(yaw, 8)
@ -3122,6 +3122,7 @@ function mob_class:mob_activate(staticdata, def, dtime)
self.textures = textures
self.standing_in = "air"
self.standing_on = "air"
self.state = self.state or "stand"
-- set anything changed above
self:set_yaw((random(0, 360) - 180) / 180 * pi, 6)