瀏覽代碼

Probably found the root cause of terrain problems.

Tomasz Zieliński 2 年之前
父節點
當前提交
00a77e3c5f
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      lib/GameConstants.h
  2. 1 1
      lib/rmg/Functions.cpp

+ 2 - 2
lib/GameConstants.h

@@ -250,8 +250,8 @@ public:
 	}
 
 	bool operator == (const Identifier & b) const { return num == b.num; }
-	bool operator <= (const Identifier & b) const { return num >= b.num; }
-	bool operator >= (const Identifier & b) const { return num <= b.num; }
+	bool operator <= (const Identifier & b) const { return num <= b.num; }
+	bool operator >= (const Identifier & b) const { return num >= b.num; }
 	bool operator != (const Identifier & b) const { return num != b.num; }
 	bool operator <  (const Identifier & b) const { return num <  b.num; }
 	bool operator >  (const Identifier & b) const { return num > b.num; }

+ 1 - 1
lib/rmg/Functions.cpp

@@ -134,7 +134,7 @@ void initTerrainType(Zone & zone, CMapGenerator & gen)
 
 			if (terrainType <= ETerrainId::NONE)
 			{
-				logGlobal->warn("Town %s has invalid terrain type: %s", zone.getTownType(), terrainType);
+				logGlobal->warn("Town %s has invalid terrain type: %d", zone.getTownType(), terrainType);
 				zone.setTerrainType(ETerrainId::DIRT);
 			}
 			else