From 12f55292f7a21c7271ef18c5c3050b8a7d3770f9 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 19 Sep 2016 16:08:08 -0600 Subject: [PATCH] light: CheckTargetsMatched: for "targetname with no targetter" warning, allow any key to be the targetter --- light/entities.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/light/entities.cc b/light/entities.cc index 387dcfd4..b6d57483 100644 --- a/light/entities.cc +++ b/light/entities.cc @@ -216,6 +216,8 @@ CheckTargetsMatched(const std::vector &edicts) } // search for "targetname" values such that no entity has a matching "target" + // accept any key name as a target, so we don't print false positive + // if the map has "some_mod_specific_target" "foo" for (const entdict_t &entity : edicts) { const auto targetnameVal = EntDict_StringForKey(entity, "targetname"); if (!targetnameVal.length()) @@ -223,8 +225,8 @@ CheckTargetsMatched(const std::vector &edicts) bool found = false; for (const entdict_t &targetter : edicts) { - for (const auto &targetKey : targetKeys) { - if (targetnameVal == EntDict_StringForKey(targetter, targetKey)) { + for (const auto &targetter_keyval : targetter) { + if (targetnameVal == targetter_keyval.second) { found = true; break; }