From 4acf7eb50852e2bfdcae1eda8454a99bf64a8810 Mon Sep 17 00:00:00 2001 From: khang Date: Tue, 2 Apr 2024 19:16:25 -0400 Subject: [PATCH] remove stupid comment and add helpful warning --- src/sdhlt/sdHLVIS/vis.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/sdhlt/sdHLVIS/vis.cpp b/src/sdhlt/sdHLVIS/vis.cpp index 22457c32..c158c7e9 100644 --- a/src/sdhlt/sdHLVIS/vis.cpp +++ b/src/sdhlt/sdHLVIS/vis.cpp @@ -1853,8 +1853,7 @@ int main(const int argc, char** argv) continue; } - // If we have room 0 and target 0, don't calculate. - g_room[g_room_count].target_visleafnum = 0; + bool has_target = false; // Find the target entity. // Rewalk yes, very sad. @@ -1871,10 +1870,15 @@ int main(const int argc, char** argv) GetVectorForKey (&g_entities[j], "origin", room_target_origin); g_room[g_room_count].target_visleafnum = VisLeafnumForPoint (room_target_origin); - printf("target leave %d", g_room[g_room_count].target_visleafnum); + has_target = true; } } + if (!has_target) + { + Warning("Entity %d (info_room) does not have a target.", i); + } + g_room_count++; } }