Fix crash due to use of dynamic attention data without checking if available
This commit is contained in:
parent
1f79dbf5ba
commit
f2260f309e
@ -427,7 +427,6 @@ function mobf_debug.rightclick_callback(entity,player)
|
||||
for k,v in pairs(entity.dynamic_data.attention.watched_objects) do
|
||||
print("MOBF: \t\t " .. k .. ": " .. v.value)
|
||||
end
|
||||
end
|
||||
|
||||
local attention_name = tostring(entity.dynamic_data.attention.most_relevant_target)
|
||||
|
||||
@ -435,6 +434,8 @@ function mobf_debug.rightclick_callback(entity,player)
|
||||
attention_name = entity.dynamic_data.attention.most_relevant_target:get_player_name()
|
||||
end
|
||||
print("MOBF: \tTop attention object: " .. attention_name)
|
||||
end
|
||||
|
||||
if entity.dynamic_data.graphics.last_fps ~= nil then
|
||||
print("MOBF: Animating with: " .. entity.dynamic_data.graphics.last_fps .. " fps")
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user