mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-09 17:23:51 +01:00
player_api: Fix crash for players without model
This commit is contained in:
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
|
||||
|
Loading…
Reference in New Issue
Block a user