diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f89b646c..f3edf0236 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -647,7 +647,8 @@ set(${PROJECT_NAME}_SRCS
network/networkgame.cpp network/networkgame.h
network/matchmakingcoordinator.h network/matchmakingcoordinator.cpp
network/mapfileserver.h network/mapfileserver.cpp
- network/replayrecordfileserver.h network/replayrecordfileserver.cpp
+ network/replayrecordfileserver.h network/replayrecordfileserver.cpp
+ network/filepeer.h network/filepeer.cpp
network/JsonKeys.h
# game
diff --git a/general.qrc b/general.qrc
index 520a8dee4..047d6975e 100644
--- a/general.qrc
+++ b/general.qrc
@@ -2069,5 +2069,6 @@
templates/serverscript/matchMaking/automatchmaker.json
resources/scripts/building/field_base.js
resources/scripts/actions/ACTION_FOCUSMAP.js
+ maps/2_player/Where Giants Have Fallen.map
diff --git a/maps/2_player/Where Giants Have Fallen.map b/maps/2_player/Where Giants Have Fallen.map
new file mode 100644
index 000000000..80d6b4e65
Binary files /dev/null and b/maps/2_player/Where Giants Have Fallen.map differ
diff --git a/mapsupport/refactorMap.cpp b/mapsupport/refactorMap.cpp
index 0974db56c..15c2be683 100644
--- a/mapsupport/refactorMap.cpp
+++ b/mapsupport/refactorMap.cpp
@@ -647,7 +647,6 @@ void GameMap::rotateY90()
Mainapp::getInstance()->continueRendering();
}
-
void GameMap::flipY()
{
Mainapp::getInstance()->pauseRendering();
diff --git a/menue/editormenue.cpp b/menue/editormenue.cpp
index 5383c6f9e..138c81237 100644
--- a/menue/editormenue.cpp
+++ b/menue/editormenue.cpp
@@ -141,8 +141,6 @@ EditorMenue::EditorMenue()
m_Topbar->addItem(tr("Export AWDS Aws"), "EXPORTAWDSAWS", 3, tr("Exports the map to an AWS Map Editor file"));
m_Topbar->addItem(tr("Import AW4 Aw4"), "IMPORTAW4AW4", 3, tr("Deletes the current map and imports an AW 4 map editor file."));
m_Topbar->addItem(tr("Import AW by Web"), "IMPORTAWBYWEB", 3, tr("Deletes the current map and imports an Advance Wars by Web Map from https://awbw.amarriner.com/"));
- m_Topbar->finishCreation();
- addChild(m_Topbar);
ObjectManager* pObjectManager = ObjectManager::getInstance();
oxygine::ResAnim* pAnim = pObjectManager->getResAnim("panel");
@@ -191,6 +189,9 @@ EditorMenue::EditorMenue()
}
});
+ m_Topbar->finishCreation();
+ addChild(m_Topbar);
+
// connecting stuff
connect(this, &EditorMenue::sigLeftClick, this, &EditorMenue::onMapClickedLeft, Qt::QueuedConnection);
connect(this, &EditorMenue::sigLeftClickDown, this, &EditorMenue::onMapClickedLeftDown, Qt::QueuedConnection);
diff --git a/network/filepeer.cpp b/network/filepeer.cpp
new file mode 100644
index 000000000..08925e812
--- /dev/null
+++ b/network/filepeer.cpp
@@ -0,0 +1,22 @@
+#include "network/filepeer.h"
+
+FilePeer::FilePeer(MainServer* pOwner, const QString & filePath, qint64 socketId)
+ : m_pOwner{pOwner},
+ m_file{filePath},
+ m_connectSocket{socketId}
+{
+}
+
+
+void FilePeer::startUpload()
+{
+ m_file.open(QIODevice::ReadOnly);
+
+}
+
+void FilePeer::startDownload()
+{
+ m_file.remove();
+ m_file.open(QIODevice::WriteOnly);
+
+}
diff --git a/network/filepeer.h b/network/filepeer.h
new file mode 100644
index 000000000..88fc7521d
--- /dev/null
+++ b/network/filepeer.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include
+#include
+class MainServer;
+
+class FilePeer : public QObject
+{
+ Q_OBJECT
+public:
+ explicit FilePeer(MainServer* pOwner, const QString & filePath, qint64 socketId);
+
+ void startUpload();
+ void startDownload();
+signals:
+
+public slots:
+ //void onRequestNextData();
+
+private:
+ MainServer* m_pOwner;
+ QFile m_file;
+ QDataStream m_fileStream{&m_file};
+ qint64 m_connectSocket;
+};
+
diff --git a/network/mainserver.cpp b/network/mainserver.cpp
index 6cbe7ac5b..062226e74 100644
--- a/network/mainserver.cpp
+++ b/network/mainserver.cpp
@@ -219,7 +219,7 @@ void MainServer::startDatabase()
SQL_MAPWIDTH + " INTEGER, " +
SQL_MAPHEIGHT + " INTEGER, " +
SQL_MAPFLAGS + " BIGINT," +
- SQL_MAPAUTHOR + " TEXT, " +
+ SQL_MAPAUTHOR + " TEXT" +
+ ")");
if (sqlQueryFailed(query))
{
@@ -262,7 +262,7 @@ bool MainServer::sqlQueryFailed(const QSqlQuery &query)
bool failed = !query.isActive() && type != QSqlError::NoError;
if (failed)
{
- CONSOLE_PRINT("Sql query failed with " + error.text(), GameConsole::eERROR);
+ CONSOLE_PRINT("Sql query failed with " + error.text() + " Query: " + query.lastQuery(), GameConsole::eERROR);
}
return failed;
}
diff --git a/network/replayrecordfileserver.cpp b/network/replayrecordfileserver.cpp
index cb9f27be5..085ae9f1f 100644
--- a/network/replayrecordfileserver.cpp
+++ b/network/replayrecordfileserver.cpp
@@ -1,7 +1,6 @@
-#include "replayrecordfileserver.h"
+#include "network/replayrecordfileserver.h"
-ReplayRecordFileserver::ReplayRecordFileserver(QObject *parent)
- : QObject{parent}
+ReplayRecordFileserver::ReplayRecordFileserver()
{
}
diff --git a/network/replayrecordfileserver.h b/network/replayrecordfileserver.h
index d60fb4352..f2443ffd5 100644
--- a/network/replayrecordfileserver.h
+++ b/network/replayrecordfileserver.h
@@ -6,7 +6,7 @@ class ReplayRecordFileserver : public QObject
{
Q_OBJECT
public:
- explicit ReplayRecordFileserver(QObject *parent = nullptr);
+ explicit ReplayRecordFileserver();
signals:
diff --git a/resources/scripts/units/cruiser.js b/resources/scripts/units/cruiser.js
index 4c33f5c24..9b7264d4d 100644
--- a/resources/scripts/units/cruiser.js
+++ b/resources/scripts/units/cruiser.js
@@ -95,7 +95,7 @@ var Constructor = function()
this.getDescription = function()
{
- return qsTr("Naval Unit. Strong against air units and submarines. Transports X 2
Helis.");
+ return qsTr("Naval Unit. Strong against air units and submarines. Transports X 2
Helis. Cruisers can get remove mines and take no damge from them.");
};
this.getUnitType = function()