From 02a3e12829e92eca88b1f182f82d3e968c346582 Mon Sep 17 00:00:00 2001
From: Shon Ferguson <shonferg@users.sourceforge.net>
Date: Wed, 14 Jun 2006 20:57:09 +0000
Subject: [PATCH] Added some more debug defines to niflib.cpp. Fixed problem
 with NiCollisionData being used instead of NiCollisionObject in 20.0.0.4
 files.

---
 gen/obj_defines.h | 12 ++++++------
 niflib.cpp        |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gen/obj_defines.h b/gen/obj_defines.h
index f58b7d16..1a8a5683 100644
--- a/gen/obj_defines.h
+++ b/gen/obj_defines.h
@@ -907,11 +907,11 @@ if ( version <= 0x04020200 ) { \
 		NifStream( boundingBox.radius, in, version ); \
 	}; \
 }; \
-if ( ( version >= 0x0A000100 ) && ( version <= 0x14000004 ) ) { \
+if ( ( version >= 0x0A000100 ) && ( version <= 0x0A020000 ) ) { \
 	NifStream( block_num, in, version ); \
 	link_stack.push_back( block_num ); \
 }; \
-if ( version >= 0x14000005 ) { \
+if ( version >= 0x14000004 ) { \
 	NifStream( block_num, in, version ); \
 	link_stack.push_back( block_num ); \
 }; \
@@ -941,13 +941,13 @@ if ( version <= 0x04020200 ) { \
 		NifStream( boundingBox.radius, out, version ); \
 	}; \
 }; \
-if ( ( version >= 0x0A000100 ) && ( version <= 0x14000004 ) ) { \
+if ( ( version >= 0x0A000100 ) && ( version <= 0x0A020000 ) ) { \
 	if ( collisionData != NULL ) \
 		NifStream( link_map[StaticCast<NiObject>(collisionData)], out, version ); \
 	else \
 		NifStream( 0xffffffff, out, version ); \
 }; \
-if ( version >= 0x14000005 ) { \
+if ( version >= 0x14000004 ) { \
 	if ( collisionObject != NULL ) \
 		NifStream( link_map[StaticCast<NiObject>(collisionObject)], out, version ); \
 	else \
@@ -994,7 +994,7 @@ for (uint i0 = 0; i0 < properties.size(); i0++) { \
 		properties[i0] = NULL; \
 	link_stack.pop_front(); \
 }; \
-if ( ( version >= 0x0A000100 ) && ( version <= 0x14000004 ) ) { \
+if ( ( version >= 0x0A000100 ) && ( version <= 0x0A020000 ) ) { \
 	if (link_stack.empty()) \
 		throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); \
 	if (link_stack.front() != 0xffffffff) { \
@@ -1005,7 +1005,7 @@ if ( ( version >= 0x0A000100 ) && ( version <= 0x14000004 ) ) { \
 		collisionData = NULL; \
 	link_stack.pop_front(); \
 }; \
-if ( version >= 0x14000005 ) { \
+if ( version >= 0x14000004 ) { \
 	if (link_stack.empty()) \
 		throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); \
 	if (link_stack.front() != 0xffffffff) { \
diff --git a/niflib.cpp b/niflib.cpp
index 922db60e..7306dcf7 100644
--- a/niflib.cpp
+++ b/niflib.cpp
@@ -4,7 +4,7 @@ All rights reserved.  Please see niflib.h for licence. */
 //#define DEBUG // this will produce lots of output
 //#define PRINT_OBJECT_NAMES
 //#define PRINT_OBJECT_CONTENTS
-#define DEBUG_LINK_PHASE
+//#define DEBUG_LINK_PHASE
 
 #include "niflib.h"
 #include "obj/NiAVObject.h"
-- 
GitLab