mirror of
				https://github.com/luanti-org/minetest_game.git
				synced 2025-11-04 01:05:49 +01:00 
			
		
		
		
	player_api: Fix crash for players without model
This commit is contained in:
		
				
					committed by
					
						
						Lars Müller
					
				
			
			
				
	
			
			
			
						parent
						
							240f9a6a85
						
					
				
				
					commit
					a6f3b89596
				
			@@ -182,7 +182,7 @@ minetest.register_globalstep(function()
 | 
			
		||||
	for _, player in pairs(minetest.get_connected_players()) do
 | 
			
		||||
		local name = player:get_player_name()
 | 
			
		||||
		local player_data = players[name]
 | 
			
		||||
		local model = models[player_data.model]
 | 
			
		||||
		local model = player_data and models[player_data.model]
 | 
			
		||||
		if model and not player_attached[name] then
 | 
			
		||||
			local controls = player:get_player_control()
 | 
			
		||||
			local animation_speed_mod = model.animation_speed or 30
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user