mirror of
				https://codeberg.org/tenplus1/mobs_redo.git
				synced 2025-10-30 23:25:36 +01:00 
			
		
		
		
	add mob_height_fix setting so it can be disabled.
This commit is contained in:
		
							
								
								
									
										5
									
								
								api.lua
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								api.lua
									
									
									
									
									
								
							| @@ -25,7 +25,7 @@ local use_cmi = minetest.global_exists("cmi") | ||||
|  | ||||
| mobs = { | ||||
| 	mod = "redo", | ||||
| 	version = "20230311", | ||||
| 	version = "20230312", | ||||
| 	intllib = S, | ||||
| 	invis = minetest.global_exists("invisibility") and invisibility or {} | ||||
| } | ||||
| @@ -83,6 +83,7 @@ local active_limit = tonumber(settings:get("mob_active_limit") or 0) | ||||
| local mob_chance_multiplier = tonumber(settings:get("mob_chance_multiplier") or 1) | ||||
| local peaceful_player_enabled = settings:get_bool("enable_peaceful_player") | ||||
| local mob_smooth_rotate = settings:get_bool("mob_smooth_rotate") ~= false | ||||
| local mob_height_fix = settings:get_bool("mob_height_fix") ~= false | ||||
| local active_mobs = 0 | ||||
|  | ||||
| -- pathfinding settings | ||||
| @@ -3556,7 +3557,7 @@ function mobs:register_mob(name, def) | ||||
| 	local collisionbox = def.collisionbox or {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25} | ||||
|  | ||||
| 	-- quick fix to stop mobs glitching through nodes if too small | ||||
| 	if -collisionbox[2] + collisionbox[5] < 1.01 then | ||||
| 	if mob_height_fix and -collisionbox[2] + collisionbox[5] < 1.01 then | ||||
| 		collisionbox[5] = collisionbox[2] + 0.99 | ||||
| 	end | ||||
|  | ||||
|   | ||||
							
								
								
									
										2
									
								
								api.txt
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								api.txt
									
									
									
									
									
								
							| @@ -755,6 +755,8 @@ External Settings for "minetest.conf" | ||||
|                             mob for obstructions before spawning, otherwise it | ||||
|                             defaults to checking the height of the mob only. | ||||
|    'mob_smooth_rotate'      Enables smooth rotation when mobs turn by default. | ||||
|    'mob_height_fix'         Enabled by default, increases smaller mob heights so they wont | ||||
|                             glitch through certain nodes. | ||||
|    'mob_pathfinding_enable'     Enable pathfinding. | ||||
|    'mob_pathfinder_enable'      Use pathfinder mod if available. | ||||
|    'mob_pathfinding_stuck_timeout'      How long before stuck mobs start searching. (default 3.0) | ||||
|   | ||||
| @@ -43,6 +43,9 @@ enable_peaceful_player (Mobs do not attack peaceful player without reason) bool | ||||
| #    Enable mobs smooth rotation | ||||
| mob_smooth_rotate (Smooth rotation for mobs) bool true | ||||
|  | ||||
| #   Fix Mob Height if too low so they cannot escape through specific nodes | ||||
| mob_height_fix (Fix Mob Height) bool true | ||||
|  | ||||
| [Pathfinding] | ||||
| #    Enable pathfinding (default Enabled) | ||||
| mob_pathfinding_enable (Enable pathfinding) bool true | ||||
|   | ||||
		Reference in New Issue
	
	Block a user