[1.1.59] call on player.character.die() will cause desync
Posted: Wed Jun 08, 2022 6:26 am
How to reproduce:
1. create a blank scenario
2. add the code below into control.lua
3. host new game with sceanrio
4. in chat: /toggle-heavy-mode
5. drop a copper-plate to trigger player.character.die()
Then a desync will be happened
Here's my scenario for test: (all other code is commented)
https://github.com/kevinmama/PandaAI/tr ... die-desync
1. create a blank scenario
2. add the code below into control.lua
3. host new game with sceanrio
4. in chat: /toggle-heavy-mode
5. drop a copper-plate to trigger player.character.die()
Then a desync will be happened
Code: Select all
script.on_event(defines.events.on_player_created, function(e)
local player = game.get_player(e.player_index)
player.insert({name="copper-plate"})
end)
script.on_event(defines.events.on_player_dropped_item, function(e)
local player = game.get_player(e.player_index)
if player.character then
player.character.die()
end
end)
https://github.com/kevinmama/PandaAI/tr ... die-desync