Browse Source

fix mingw build
(?) does this brake *nix build?

AlexVinS 11 years ago
parent
commit
c7dc4c05b8
3 changed files with 14 additions and 3 deletions
  1. 3 2
      lib/NetPacks.h
  2. 1 1
      lib/NetPacksBase.h
  3. 10 0
      lib/NetPacksLib.cpp

+ 3 - 2
lib/NetPacks.h

@@ -1527,7 +1527,7 @@ struct ObstaclesRemoved : public CPackForClient //3014
 	}
 };
 
-struct DLL_LINKAGE CatapultAttack : public CPackForClient //3015
+struct CatapultAttack : public CPackForClient //3015
 {
 	struct AttackInfo
 	{
@@ -1543,7 +1543,8 @@ struct DLL_LINKAGE CatapultAttack : public CPackForClient //3015
 		}
 	};
 
-	CatapultAttack() {type = 3015;}
+	DLL_LINKAGE CatapultAttack();
+	DLL_LINKAGE ~CatapultAttack();
 
 	DLL_LINKAGE void applyGs(CGameState *gs);
 	void applyCl(CClient *cl);

+ 1 - 1
lib/NetPacksBase.h

@@ -37,7 +37,7 @@ struct DLL_LINKAGE CPack
         logNetwork->errorStream() << "CPack serialized... this should not happen!";
 	}
 	void applyGs(CGameState *gs) { }
-	DLL_LINKAGE virtual std::string toString() const { return boost::str(boost::format("{CPack: type '%d'}") % type); }
+	virtual std::string toString() const { return boost::str(boost::format("{CPack: type '%d'}") % type); }
 };
 
 std::ostream & operator<<(std::ostream & out, const CPack * pack);

+ 10 - 0
lib/NetPacksLib.cpp

@@ -1495,6 +1495,16 @@ DLL_LINKAGE void ObstaclesRemoved::applyGs( CGameState *gs )
 	}
 }
 
+
+DLL_LINKAGE CatapultAttack::CatapultAttack()
+{
+	type = 3015;
+}
+
+DLL_LINKAGE CatapultAttack::~CatapultAttack()
+{
+}
+
 DLL_LINKAGE void CatapultAttack::applyGs( CGameState *gs )
 {
 	if(gs->curB && gs->curB->siege != CGTownInstance::NONE) //if there is a battle and it's a siege