mirror of
				https://github.com/minetest-mods/areas.git
				synced 2025-11-04 06:35:28 +01:00 
			
		
		
		
	fix posLimit(pos) to process and return a position table
This commit is contained in:
		
				
					committed by
					
						
						sofar
					
				
			
			
				
	
			
			
			
						parent
						
							630bdefd98
						
					
				
				
					commit
					9508a004d0
				
			
							
								
								
									
										6
									
								
								pos.lua
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								pos.lua
									
									
									
									
									
								
							@@ -130,7 +130,11 @@ function areas:getPos(playerName)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local function posLimit(pos)
 | 
			
		||||
	return math.max(math.min(p, 31000), -31000)
 | 
			
		||||
	return {
 | 
			
		||||
		x = math.max(math.min(pos.x, 31000), -31000)
 | 
			
		||||
		y = math.max(math.min(pos.y, 31000), -31000)
 | 
			
		||||
		z = math.max(math.min(pos.z, 31000), -31000)
 | 
			
		||||
	}
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function areas:setPos1(playerName, pos)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user