| 3 | |
| 4 | |
| 5 | PyObject *py_ue_quit_game(ue_PyUObject *self, PyObject * args) { |
| 6 | |
| 7 | ue_py_check(self); |
| 8 | |
| 9 | UWorld *world = ue_get_uworld(self); |
| 10 | if (!world) |
| 11 | return PyErr_Format(PyExc_Exception, "unable to retrieve UWorld from uobject"); |
| 12 | |
| 13 | // no need to support multiple controllers |
| 14 | APlayerController *controller = world->GetFirstPlayerController(); |
| 15 | if (!controller) |
| 16 | return PyErr_Format(PyExc_Exception, "unable to retrieve the first controller"); |
| 17 | |
| 18 | UKismetSystemLibrary::QuitGame(world, controller, EQuitPreference::Quit); |
| 19 | |
| 20 | Py_INCREF(Py_None); |
| 21 | return Py_None; |
| 22 | } |
| 23 | |
| 24 | PyObject *py_ue_play(ue_PyUObject *self, PyObject * args) { |
| 25 |
nothing calls this directly
no test coverage detected