mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-12 10:04:40 +02:00
Fix calling obj.is_player before checking validity
This commit is contained in:
parent
4dd4056592
commit
5adf2c3dca
@ -54,8 +54,8 @@ function Game.get_player_from_any(obj)
|
||||
p = Game.get_player_by_index(obj)
|
||||
elseif o_type == 'string' then
|
||||
p = game.players[obj]
|
||||
elseif o_type == 'table' and obj.is_player() then
|
||||
p = obj
|
||||
elseif o_type == 'table' and obj.valid and obj.is_player() then
|
||||
return obj
|
||||
end
|
||||
|
||||
if p and p.valid then
|
||||
|
Loading…
Reference in New Issue
Block a user