Browse Source

Revert "Fix water in certain areas"

This reverts commit b05e4d0fb08d23a32eb2c7c3a4f326413ec1b8de.
Image 3 years ago
parent
commit
aa9f76727a
1 changed files with 2 additions and 3 deletions
  1. 2 3
      EQ2/source/WorldServer/Zone/region_map_v1.cpp

+ 2 - 3
EQ2/source/WorldServer/Zone/region_map_v1.cpp

@@ -7,7 +7,6 @@
 #include <boost/filesystem.hpp>
 
 extern LuaInterface* lua_interface;
-#define REGIONDEBUG 1
 
 RegionMapV1::RegionMapV1() {
 	BSPTreeSize = 0;
@@ -497,14 +496,14 @@ WaterRegionType RegionMapV1::BSPReturnRegionType(int32 node_number, const glm::v
 }
 
 WaterRegionType RegionMapV1::BSPReturnRegionTypeNode(const Region_Node* region_node, const ZBSP_Node* BSP_Root, int32 node_number, const glm::vec3& location, float distToNode) const {
-	if(node_number == 4294967295)
+	if(node_number > BSPTreeSize || node_number == 4294967295)
 		return RegionTypeNormal;
 		
 	const ZBSP_Node* current_node = &BSP_Root[node_number - 1];
 	float distance;
 
 #ifdef REGIONDEBUG
-	printf("left = %u, right %u (Size: %u)\n", current_node->left, current_node->right, BSPTreeSize);
+	printf("left = %u, right %u\n", current_node->left, current_node->right);
 #endif
 
 	if (region_node->region_type == ClassWaterRegion2)