mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
...
This commit is contained in:
parent
18390fc8cf
commit
65219da87f
@ -93,6 +93,9 @@ void PyWorld::_register(VM* vm, PyObject* mod, PyObject* type){
|
|||||||
|
|
||||||
vm->bind(type, "step(self, dt: float, velocity_iterations: int, position_iterations: int)",
|
vm->bind(type, "step(self, dt: float, velocity_iterations: int, position_iterations: int)",
|
||||||
[](VM* vm, ArgsView args){
|
[](VM* vm, ArgsView args){
|
||||||
|
// disable gc during step for safety
|
||||||
|
auto _lock = vm->heap.gc_scope_lock();
|
||||||
|
|
||||||
PyWorld& self = _CAST(PyWorld&, args[0]);
|
PyWorld& self = _CAST(PyWorld&, args[0]);
|
||||||
float dt = CAST(float, args[1]);
|
float dt = CAST(float, args[1]);
|
||||||
int velocity_iterations = CAST(int, args[2]);
|
int velocity_iterations = CAST(int, args[2]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user