From 285e0f84af3b920caeddb37fbe61ae71024792d7 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 1 Jun 2016 20:35:55 -0600 Subject: [PATCH] light: add warning for "_project_texture" missing texture --- light/entities.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/light/entities.c b/light/entities.c index 4c52fc79..015a426d 100644 --- a/light/entities.c +++ b/light/entities.c @@ -1021,9 +1021,12 @@ LoadEntities(const bsp2_t *bsp) dirty.value = true; } } - else if (!strcmp(key, "_project_texture")) + else if (!strcmp(key, "_project_texture")) { entity->projectedmip = FindProjectionTexture(bsp, com_token); - else if (!strcmp(key, "_project_mangle")) + if (entity->projectedmip == NULL) { + logprint("WARNING: light has \"_project_texture\" \"%s\", but this texture is not present in the bsp\n", com_token); + } + } else if (!strcmp(key, "_project_mangle")) { projangleknown = true; scan_vec3(projangle, com_token, key);