You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Add option to use handles to RID
Adds an option to compile an alternative implementation for RIDs, which allows checks for erroneous usage patterns as well as providing leak tests.
This commit is contained in:
@@ -129,13 +129,13 @@ RID PhysicsServerSW::space_create() {
|
||||
SpaceSW *space = memnew(SpaceSW);
|
||||
RID id = space_owner.make_rid(space);
|
||||
space->set_self(id);
|
||||
RID area_id = area_create();
|
||||
RID area_id = RID_PRIME(area_create());
|
||||
AreaSW *area = area_owner.get(area_id);
|
||||
ERR_FAIL_COND_V(!area, RID());
|
||||
space->set_default_area(area);
|
||||
area->set_space(space);
|
||||
area->set_priority(-1);
|
||||
RID sgb = body_create();
|
||||
RID sgb = RID_PRIME(body_create());
|
||||
body_set_space(sgb, id);
|
||||
body_set_mode(sgb, BODY_MODE_STATIC);
|
||||
space->set_static_global_body(sgb);
|
||||
|
||||
Reference in New Issue
Block a user