Upstream merge - Move player tick into main loop