Edited scenes.js to synchronize player indexes across all clients