mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Merge pull request 'Fix mcl_skins crash' (#3584) from skins into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3584 Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
This commit is contained in:
commit
924d999ec2
@ -139,6 +139,10 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
skin = minetest.deserialize(skin)
|
skin = minetest.deserialize(skin)
|
||||||
end
|
end
|
||||||
if skin then
|
if skin then
|
||||||
|
-- If the player moves a slider and then quickly exits the game, form_send_job gets saved.
|
||||||
|
-- This should never have been put in with the skin data in the first place.
|
||||||
|
skin.form_send_job = nil
|
||||||
|
|
||||||
mcl_skins.players[player] = skin
|
mcl_skins.players[player] = skin
|
||||||
else
|
else
|
||||||
if math.random() > 0.5 then
|
if math.random() > 0.5 then
|
||||||
@ -424,6 +428,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
-- Cancel formspec resend after scrollbar move
|
-- Cancel formspec resend after scrollbar move
|
||||||
if mcl_skins.players[player].form_send_job then
|
if mcl_skins.players[player].form_send_job then
|
||||||
mcl_skins.players[player].form_send_job:cancel()
|
mcl_skins.players[player].form_send_job:cancel()
|
||||||
|
mcl_skins.players[player].form_send_job = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
if fields.quit then
|
if fields.quit then
|
||||||
|
Loading…
Reference in New Issue
Block a user