diff --git a/doomsday/client/include/world/sky.h b/doomsday/client/include/world/sky.h index 9a55adbda6..439cb0c18e 100644 --- a/doomsday/client/include/world/sky.h +++ b/doomsday/client/include/world/sky.h @@ -32,8 +32,7 @@ #include "Material" #include "ModelDef" -#define DEFAULT_SKY_HORIZON_OFFSET ( 0 ) -#define DEFAULT_SKY_SPHERE_MATERIAL ( "Textures:SKY1" ) +#define DEFAULT_SKY_SPHERE_MATERIAL ( "Textures:SKY1" ) /** * Behavior logic for a sky in the world system. diff --git a/doomsday/libdoomsday/include/doomsday/defs/sky.h b/doomsday/libdoomsday/include/doomsday/defs/sky.h index 749fe63b02..d21016c0b9 100644 --- a/doomsday/libdoomsday/include/doomsday/defs/sky.h +++ b/doomsday/libdoomsday/include/doomsday/defs/sky.h @@ -32,6 +32,7 @@ namespace defn { #define SLF_MASK 0x2 ///< @c true= mask the layer. #define DEFAULT_SKY_HEIGHT ( .666667f ) +#define DEFAULT_SKY_HORIZON_OFFSET ( -0.105f ) #define DEFAULT_SKY_SPHERE_XOFFSET ( 0 ) #define DEFAULT_SKY_SPHERE_FADEOUT_LIMIT ( .3f ) diff --git a/doomsday/libdoomsday/src/defs/dedfile.cpp b/doomsday/libdoomsday/src/defs/dedfile.cpp index c57d7994a7..999b1370be 100644 --- a/doomsday/libdoomsday/src/defs/dedfile.cpp +++ b/doomsday/libdoomsday/src/defs/dedfile.cpp @@ -115,10 +115,14 @@ int DED_Read(ded_t *ded, String path) hndl->rewind(); char *bufferedDef = (char *) M_Calloc(bufferedDefSize + 1); + File1 &file = hndl->file(); + /// @todo Custom status for contained files is not inherited from the container? + bool const isCustom = (file.isContained()? file.container().hasCustom() : file.hasCustom()); + // Copy the file into the local buffer and parse definitions. hndl->read((uint8_t *)bufferedDef, bufferedDefSize); - int result = DED_ReadData(ded, bufferedDef, path, hndl->file().hasCustom()); - App_FileSystem().releaseFile(hndl->file()); + int result = DED_ReadData(ded, bufferedDef, path, isCustom); + App_FileSystem().releaseFile(file); // Done. Release temporary storage and return the result. M_Free(bufferedDef); diff --git a/doomsday/libdoomsday/src/defs/dedparser.cpp b/doomsday/libdoomsday/src/defs/dedparser.cpp index a1824877b8..0131791e75 100644 --- a/doomsday/libdoomsday/src/defs/dedparser.cpp +++ b/doomsday/libdoomsday/src/defs/dedparser.cpp @@ -1997,7 +1997,7 @@ DENG2_PIMPL(DEDParser) if(testCustom) { - if(mi->getb("custom") != negate) + if(mi->getb("custom") != !negate) { mi = nullptr; // skip } diff --git a/doomsday/libdoomsday/src/defs/sky.cpp b/doomsday/libdoomsday/src/defs/sky.cpp index 4f42561784..a4f603f6a9 100644 --- a/doomsday/libdoomsday/src/defs/sky.cpp +++ b/doomsday/libdoomsday/src/defs/sky.cpp @@ -34,7 +34,7 @@ void Sky::resetToDefaults() def().addText ("id", ""); def().addNumber("flags", 0); def().addNumber("height", DEFAULT_SKY_HEIGHT); - def().addNumber("horizonOffset", 0); + def().addNumber("horizonOffset", DEFAULT_SKY_HORIZON_OFFSET); def().addArray ("color", new ArrayValue(Vector3f())); def().addArray ("layer", new ArrayValue); def().addArray ("model", new ArrayValue);