You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Add DEV_ASSERT and DEV_CHECK macros
Change the existing DEV_ASSERT function to be switched on and off by the DEV_ENABLED define. DEV_ASSERT breaks into the debugger as soon as hit. Add error macros DEV_CHECK and DEV_CHECK_ONCE to add an alternative check that ERR_PRINT when a condition fails, again only enabled in DEV_ENABLED builds.
This commit is contained in:
@@ -64,10 +64,6 @@ OcclusionHandle PortalRenderer::instance_moving_create(VSInstance *p_instance, R
|
||||
}
|
||||
|
||||
void PortalRenderer::instance_moving_update(OcclusionHandle p_handle, const AABB &p_aabb, bool p_force_reinsert) {
|
||||
// we can ignore these, they are statics / dynamics, and don't need updating
|
||||
// .. these should have been filtered out before calling the visual server...
|
||||
DEV_ASSERT(!_occlusion_handle_is_in_room(p_handle));
|
||||
|
||||
p_handle--;
|
||||
Moving &moving = _moving_pool[p_handle];
|
||||
moving.exact_aabb = p_aabb;
|
||||
@@ -77,6 +73,10 @@ void PortalRenderer::instance_moving_update(OcclusionHandle p_handle, const AABB
|
||||
return;
|
||||
}
|
||||
|
||||
// we can ignore these, they are statics / dynamics, and don't need updating
|
||||
// .. these should have been filtered out before calling the visual server...
|
||||
DEV_CHECK_ONCE(!_occlusion_handle_is_in_room(p_handle));
|
||||
|
||||
// quick reject for most roaming cases
|
||||
if (!p_force_reinsert && moving.expanded_aabb.encloses(p_aabb)) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user