delete entities w/o fadeout if current view isn't active

isolation_bkp/dynres
Dominik Madarász 2021-05-10 11:58:59 +02:00
parent bb48704bd6
commit d14b8246f5
2 changed files with 8 additions and 2 deletions

View File

@ -4,11 +4,17 @@
#include "prediction.h" #include "prediction.h"
#include "librg.h" #include "librg.h"
#include "world/world.h" #include "world/world.h"
#include "game.h"
int32_t tracker_read_remove(librg_world *w, librg_event *e) { int32_t tracker_read_remove(librg_world *w, librg_event *e) {
int64_t entity_id = librg_event_entity_get(w, e); int64_t entity_id = librg_event_entity_get(w, e);
world_view *view = (world_view*)librg_world_userdata_get(w); world_view *view = (world_view*)librg_world_userdata_get(w);
if (view != game_world_view_get_active()) {
entity_view_destroy(&view->entities, entity_id);
} else {
entity_view_mark_for_removal(&view->entities, entity_id); entity_view_mark_for_removal(&view->entities, entity_id);
}
return 0; return 0;
} }

View File

@ -27,7 +27,7 @@ load_paths =
{ {
{{ {{
{ ".", .recursive = false, .relative = true }, { ".", .recursive = false, .relative = true },
{ "code/apps/client", .recursive = true, .relative = true }, { "code/game", .recursive = true, .relative = true },
{ "code/common", .recursive = true, .relative = true }, { "code/common", .recursive = true, .relative = true },
{ "code/modules", .recursive = true, .relative = true }, { "code/modules", .recursive = true, .relative = true },
{ "code/vendors", .recursive = true, .relative = true }, { "code/vendors", .recursive = true, .relative = true },