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++; } }