Fix core.get_connected_players() returning unusable ObjectRefs
authorsfan5 <sfan5@live.de>
Tue, 3 Mar 2020 19:44:03 +0000 (20:44 +0100)
committersfan5 <sfan5@live.de>
Tue, 3 Mar 2020 20:21:41 +0000 (21:21 +0100)
commit1761d7d0f8a778e25ca70216520472a61610cbe5
tree4042f2c0f875c44c4ff24bd440b93485bd3228e9
parent7dffd08c1a068e5e0748a046fd8a1e884947b597
Fix core.get_connected_players() returning unusable ObjectRefs

This bug is only exposed by 91eef646a59575bd9ae792e257bb6ad12fafc0b1
independent of the move of get_connected_players from Lua to C++.
Previously, there would be a small time window where the SAO had
its peer ID set to PEER_ID_INEXISTENT but the RemotePlayer was
still linked to the SAO, resulting in an ObjectRef that crashed
on certain function calls (#9387).
src/script/lua_api/l_env.cpp