Print a warning when the engine is started as `root`/superuser
This is a security risk (especially when hosting a game server)
and can make audio non-functional on Linux.
(cherry picked from commit 9c34db6cb4da0578505da82c059758410ff01877)
+ if (OS::get_singleton()->get_environment("USER") == "root" && !OS::get_singleton()->has_environment("GODOT_SILENCE_ROOT_WARNING")) {
+ WARN_PRINT("Started the engine as `root`/superuser. This is a security risk, and subsystems like audio may not work correctly.\nSet the environment variable `GODOT_SILENCE_ROOT_WARNING` to 1 to silence this warning.");