mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 08:29:34 +01:00
Fix crash when night_vision tries to apply to a mob.
This commit is contained in:
parent
8453dac1db
commit
2f6afe34ba
1 changed files with 7 additions and 1 deletions
|
@ -838,7 +838,13 @@ function mcl_potions.night_vision_func(player, null, duration)
|
||||||
victim.timer = 0
|
victim.timer = 0
|
||||||
|
|
||||||
end
|
end
|
||||||
meta:set_int("night_vision", 1)
|
|
||||||
|
is_player = player:is_player()
|
||||||
|
if is_player then
|
||||||
|
meta:set_int("night_vision", 1)
|
||||||
|
else
|
||||||
|
return -- Do not attempt to set night_vision on mobs
|
||||||
|
end
|
||||||
mcl_weather.skycolor.update_sky_color({player})
|
mcl_weather.skycolor.update_sky_color({player})
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue