Skip to content

Commit 9db8af0

Browse files
author
Roberto De Ioris
committed
allow to increase GFrameCounter in world_tick()
1 parent 6c1149c commit 9db8af0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Source/UnrealEnginePython/Private/UObject/UEPyWorld.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ PyObject *py_ue_world_tick(ue_PyUObject *self, PyObject * args)
7575
ue_py_check(self);
7676

7777
float delta_time;
78-
if (!PyArg_ParseTuple(args, "f:world_tick", &delta_time))
78+
PyObject *py_increase_fc = nullptr;
79+
if (!PyArg_ParseTuple(args, "f|O:world_tick", &delta_time, &py_increase_fc))
7980
{
80-
return NULL;
81+
return nullptr;
8182
}
8283

8384
UWorld *world = ue_get_uworld(self);
@@ -86,6 +87,9 @@ PyObject *py_ue_world_tick(ue_PyUObject *self, PyObject * args)
8687

8788
world->Tick(LEVELTICK_All, delta_time);
8889

90+
if (py_increase_fc && PyObject_IsTrue(py_increase_fc))
91+
GFrameCounter++;
92+
8993
Py_RETURN_NONE;
9094
}
9195

0 commit comments

Comments
 (0)