Bläddra i källkod

Linux compile fixes

Image 4 år sedan
förälder
incheckning
c6904b02ff

+ 1 - 0
EQ2/source/WorldServer/Spawn.h

@@ -35,6 +35,7 @@
 #include "Zone/map.h"
 #include "../common/Mutex.h"
 #include <deque>
+#include <memory> // needed for LS to compile properly on linux
 
 #define DAMAGE_PACKET_TYPE_SIPHON_SPELL		0x41
 #define DAMAGE_PACKET_TYPE_SIPHON_SPELL2	0x49

+ 1 - 1
EQ2/source/WorldServer/Zone/SPGrid.cpp

@@ -629,7 +629,7 @@ Face* SPGrid::FindPath(float x, float y, float z, float targX, float targY, floa
 			float tmpy1 = face->Vertex1[1] - pointEnd[1];
 			float tmpz1 = face->Vertex1[2] - pointEnd[2];
 			float tmpDistBetweenEachOther = sqrt(tmpx1 * tmpx1 + tmpy1 * tmpy1 + tmpz1 * tmpz1);
-			_snprintf(msg, 256, "%f (%f): Face: %f %f %f\n", tmpDistBetweenEachOther, distance, face->Vertex1[0], face->Vertex1[1], face->Vertex1[2]);
+			snprintf(msg, 256, "%f (%f): Face: %f %f %f\n", tmpDistBetweenEachOther, distance, face->Vertex1[0], face->Vertex1[1], face->Vertex1[2]);
 
 			if (face == startFace)
 			{

+ 2 - 2
EQ2/source/WorldServer/Zone/mob_movement_manager.cpp

@@ -179,7 +179,7 @@ public:
 			//mob_movemesnt_manager->SendCommandToClients(mob, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium);
 		}
 
-		auto& p = glm::vec3(mob->GetX(), mob->GetY(), mob->GetZ());
+		glm::vec3 p = glm::vec3(mob->GetX(), mob->GetY(), mob->GetZ());
 		// our X/Z versus the mobs X/Z
 		glm::vec2 tar(m_move_to_x, m_move_to_z);
 		glm::vec2 pos(p.x, p.z);
@@ -310,7 +310,7 @@ public:
 			//mob_movement_manager->SendCommandToClients(mob, 0.0, 0.0, 0.0, 0.0, current_speed, ClientRangeCloseMedium);
 		}
 
-		auto& p = glm::vec4(mob->GetX(), mob->GetZ(), mob->GetY(), mob->GetHeading());
+		glm::vec4 p = glm::vec4(mob->GetX(), mob->GetZ(), mob->GetY(), mob->GetHeading());
 		glm::vec2 tar(m_move_to_x, m_move_to_y);
 		glm::vec2 pos(p.x, p.y);
 		double    len = glm::distance(pos, tar);

+ 1 - 0
EQ2/source/WorldServer/zoneserver.cpp

@@ -35,6 +35,7 @@ using namespace std;
 #pragma comment(lib,"imagehlp.lib")
 #else
 #include <sys/socket.h>
+#include <sys/stat.h>
 #ifdef FREEBSD //Timothy Whitman - January 7, 2003
 #include <sys/types.h>
 #endif