]> git.lizzy.rs Git - Crafter.git/commitdiff
Make mobs less noisy
authoroilboi <47129783+oilboi@users.noreply.github.com>
Mon, 20 Apr 2020 03:48:55 +0000 (23:48 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Mon, 20 Apr 2020 03:48:55 +0000 (23:48 -0400)
README.md
mods/mob/pig/interaction_code.lua
mods/mob/slime/interaction_code.lua
mods/mob/slime/movement_code.lua

index 66de709e0d036d4bbed490b9860f2d214df485c4..4f63078feccd6601210f67d6b7bb196ac4c916be 100644 (file)
--- a/README.md
+++ b/README.md
@@ -88,6 +88,8 @@
 - Made nether portal function
 - Beds and water explode in the nether
 - Added better nether portal effect
+- Fix clientside error 23
+- Make mobs less noisy
 ---
 
 
index faae9195e081d189599a74442caddb990ae12325..95a3c0643004ab825680da346f9e3f26aa354a01 100644 (file)
@@ -69,9 +69,9 @@ pig.on_punch = function(self, puncher, time_from_last_punch, tool_capabilities,
                --critical effect
                if critical == true then
                        self.do_critical_particles(pos)
-                       minetest.sound_play("critical", {object=self.object, gain = 0.1, max_hear_distance = 32,pitch = math.random(80,100)/100})
+                       minetest.sound_play("critical", {object=self.object, gain = 0.1, max_hear_distance = 10,pitch = math.random(80,100)/100})
                end
-               minetest.sound_play("pig", {object=self.object, gain = 1.0, max_hear_distance = 32,pitch = math.random(80,100)/100})
+               minetest.sound_play("pig", {object=self.object, gain = 1.0, max_hear_distance = 10,pitch = math.random(80,100)/100})
                
                self.hp = hp
                
@@ -93,9 +93,9 @@ pig.on_punch = function(self, puncher, time_from_last_punch, tool_capabilities,
                --critical effect
                if critical == true then
                        self.do_critical_particles(pos)
-                       minetest.sound_play("critical", {object=self.object, gain = 0.1, max_hear_distance = 32,pitch = math.random(80,100)/100})
+                       minetest.sound_play("critical", {object=self.object, gain = 0.1, max_hear_distance = 10,pitch = math.random(80,100)/100})
                end
-               minetest.sound_play("pig_die", {object=self.object, gain = 1.0, max_hear_distance = 32,pitch = math.random(80,100)/100})
+               minetest.sound_play("pig_die", {object=self.object, gain = 1.0, max_hear_distance = 10,pitch = math.random(80,100)/100})
                
                self.object:set_texture_mod("^[colorize:red:130")
                if self.child then
index 959f4dbcfc5fb3aae38cf6c2a74ceede3a10b54a..283e26dcbd3a4a5cf0571429ac76adcb7a06788e 100644 (file)
@@ -69,9 +69,9 @@ slime.on_punch = function(self, puncher, time_from_last_punch, tool_capabilities
                --critical effect
                if critical == true then
                        self.do_critical_particles(pos)
-                       minetest.sound_play("critical", {object=self.object, gain = 0.1, max_hear_distance = 32,pitch = math.random(80,100)/100})
+                       minetest.sound_play("critical", {object=self.object, gain = 0.1, max_hear_distance = 10,pitch = math.random(80,100)/100})
                end
-               minetest.sound_play("slime_die", {object=self.object, gain = 1.0, max_hear_distance = 32,pitch = math.random(100,140)/100})
+               minetest.sound_play("slime_die", {object=self.object, gain = 1.0, max_hear_distance = 10,pitch = math.random(100,140)/100})
                
                self.hp = hp
                
@@ -93,9 +93,9 @@ slime.on_punch = function(self, puncher, time_from_last_punch, tool_capabilities
                --critical effect
                if critical == true then
                        self.do_critical_particles(pos)
-                       minetest.sound_play("critical", {object=self.object, gain = 0.1, max_hear_distance = 32,pitch = math.random(80,100)/100})
+                       minetest.sound_play("critical", {object=self.object, gain = 0.1, max_hear_distance = 10,pitch = math.random(80,100)/100})
                end
-               minetest.sound_play("slime_die", {object=self.object, gain = 1.0, max_hear_distance = 32,pitch = math.random(80,100)/100})
+               minetest.sound_play("slime_die", {object=self.object, gain = 1.0, max_hear_distance = 10,pitch = math.random(80,100)/100})
                
                self.object:set_texture_mod("^[colorize:red:130")
                self.add_sword_wear(self, puncher, time_from_last_punch, tool_capabilities, dir)
index 29bc79e0f96f3002a167a74ad8df1e110fcaa3a4..ffa646506e13c13299a1cd0611e83cb0ff369f55 100644 (file)
@@ -37,7 +37,7 @@ slime.jump = function(self)
        local vel = self.object:get_velocity()
        if self.jump_timer <= 0 then
                if vel.y == 0 and self.oldvely and self.oldvely <= 0 then --use <= on self.oldvely to make slime make landing sound
-                       minetest.sound_play("slime_splat", {object=self.object, gain = 1.0, max_hear_distance = 60,pitch = math.random(80,100)/100})
+                       minetest.sound_play("slime_splat", {object=self.object, gain = 1.0, max_hear_distance = 10,pitch = math.random(80,100)/100})
                        local vel = self.object:get_velocity()
                        self.jump_timer = 1+math.random()
                        if self.hostile == true then