[modify_unit]: fix handling of unrenamable in the optimized path

This commit is contained in:
Celtic Minstrel 2019-11-13 07:39:20 -05:00
parent 51d6402453
commit fda3c9af75

View file

@ -134,7 +134,7 @@ local function simple_modify_unit(cfg)
if cfg.ai_special == "guardian" then
u.status.guardian = true
end
if cfg.unrenamable then
if cfg.unrenamable ~= nil then
u.renamable = not cfg.unrenamable
end
---------- SIMPLE ATTRIBUTES ----------