Skip to content

Commit

Permalink
Revalidate observer cache for any event
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed May 25, 2023
1 parent c3db7fb commit 3a0b85e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions flecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -47735,10 +47735,7 @@ void flecs_emit_forward(
it->sources[0] = 0;
ecs_vec_fini_t(&world->allocator, &stack, ecs_table_t*);

if (it->event == EcsOnAdd || it->event == EcsOnRemove) {
/* Only OnAdd/OnRemove events can validate a cache */
rc->current = rc->generation;
}
rc->current = rc->generation;

if (ecs_should_log_3()) {
ecs_dbg_3("cache after rebuild:");
Expand Down
5 changes: 1 addition & 4 deletions src/observable.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,10 +927,7 @@ void flecs_emit_forward(
it->sources[0] = 0;
ecs_vec_fini_t(&world->allocator, &stack, ecs_table_t*);

if (it->event == EcsOnAdd || it->event == EcsOnRemove) {
/* Only OnAdd/OnRemove events can validate a cache */
rc->current = rc->generation;
}
rc->current = rc->generation;

if (ecs_should_log_3()) {
ecs_dbg_3("cache after rebuild:");
Expand Down

0 comments on commit 3a0b85e

Please sign in to comment.