diff --git a/panda/src/pgraph/loader.cxx b/panda/src/pgraph/loader.cxx index 7dbcb9c1c5..c8ae67e17a 100644 --- a/panda/src/pgraph/loader.cxx +++ b/panda/src/pgraph/loader.cxx @@ -425,8 +425,10 @@ load_file(const Filename &filename, const LoaderOptions &options) const { // Couldn't find the file. Either it doesn't exist, or it's an // unknown file type. Report a useful message either way. string extension = filename.get_extension(); + bool pz_file = false; #ifdef HAVE_ZLIB if (extension == "pz") { + pz_file = true; extension = Filename(filename.get_basename_wo_extension()).get_extension(); } #endif // HAVE_ZLIB @@ -442,6 +444,11 @@ load_file(const Filename &filename, const LoaderOptions &options) const { << "Currently known scene file types are:\n"; reg->write(loader_cat.error(false), 2); return NULL; + } else if (pz_file && !requested_type->supports_compressed()) { + loader_cat.error() + << requested_type->get_name() << " file type (." + << extension << ") does not support in-line compression.\n"; + return NULL; } }