Browse Source

shallow water will more easily detect now

Image 3 years ago
parent
commit
dfa46589c8
1 changed files with 10 additions and 1 deletions
  1. 10 1
      EQ2/source/WorldServer/Spawn.cpp

+ 10 - 1
EQ2/source/WorldServer/Spawn.cpp

@@ -3602,7 +3602,13 @@ void Spawn::FixZ(bool forceUpdate) {
 	
 	if ( GetZone()->regionmap != nullptr )
 	{
-		glm::vec3 targPos(GetY() - 1.0f, GetX(), GetZ());
+		glm::vec3 targPos(GetY(), GetX(), GetZ());
+		
+		if ( IsGroundSpawn() )
+			targPos.x -= 1.0f;
+		else
+			targPos.x -= .5f; // standard offset to better assess shallow water
+			
 		float bestZ = -999999.0f;
 		if ( new_z != BEST_Z_INVALID )
 			bestZ = new_z - 1.0f;
@@ -3833,6 +3839,9 @@ bool Spawn::InWater()
 			glm::vec3 targPos(GetY(), GetX(), GetZ());
 			if ( IsGroundSpawn() )
 				targPos.x -= 1.0f;
+			else
+				targPos.x -= .5f; // standard offset to better assess shallow water
+				
 			
 			float bestZ = -999999.0f;
 			if ( new_z != BEST_Z_INVALID )