mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 23:10:17 +01:00
player_api: Fix crash for players without model
This commit is contained in:
parent
0ad8222b97
commit
d294ef757e
@ -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