From 0fa116b47dddc6fa7322eec22fb20196b239d1a9 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 23 Jan 2019 00:20:51 +0200 Subject: [PATCH 01/10] [Client] Remove useless lines in RecordHelper --- apps/openmw/mwmp/RecordHelper.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/openmw/mwmp/RecordHelper.cpp b/apps/openmw/mwmp/RecordHelper.cpp index 86cc6417d..c2660104d 100644 --- a/apps/openmw/mwmp/RecordHelper.cpp +++ b/apps/openmw/mwmp/RecordHelper.cpp @@ -287,7 +287,6 @@ void RecordHelper::overrideEnchantmentRecord(const mwmp::EnchantmentRecord& reco return; } - bool isExistingId = doesEnchantmentRecordExist(recordData.mId); MWBase::World *world = MWBase::Environment::get().getWorld(); if (record.baseId.empty()) @@ -419,9 +418,6 @@ void RecordHelper::overrideSpellRecord(const mwmp::SpellRecord& record) world->getModifiableStore().overrideRecord(finalData); } - - if (isExistingId) - world->updatePtrsWithRefId(recordData.mId); } void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record) From db7e09f441d64e5eabcd3b12b5514d22864c9ebf Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 23 Jan 2019 00:38:05 +0200 Subject: [PATCH 02/10] [Client] Use more consistent logging when reading dynamic record packets --- apps/openmw/mwmp/RecordHelper.cpp | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/openmw/mwmp/RecordHelper.cpp b/apps/openmw/mwmp/RecordHelper.cpp index c2660104d..a8bdcb443 100644 --- a/apps/openmw/mwmp/RecordHelper.cpp +++ b/apps/openmw/mwmp/RecordHelper.cpp @@ -110,7 +110,7 @@ void RecordHelper::overrideCreatureRecord(const mwmp::CreatureRecord& record) if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -175,7 +175,7 @@ void RecordHelper::overrideNpcRecord(const mwmp::NpcRecord& record) if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -186,12 +186,12 @@ void RecordHelper::overrideNpcRecord(const mwmp::NpcRecord& record) { if (!doesRaceRecordExist(recordData.mRace)) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring new NPC record with invalid race provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new NPC record with invalid race provided"); return; } else if (!doesClassRecordExist(recordData.mClass)) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring new NPC record with invalid class provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new NPC record with invalid class provided"); return; } else @@ -283,7 +283,7 @@ void RecordHelper::overrideEnchantmentRecord(const mwmp::EnchantmentRecord& reco if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -293,7 +293,7 @@ void RecordHelper::overrideEnchantmentRecord(const mwmp::EnchantmentRecord& reco { if (recordData.mEffects.mList.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring new enchantment record with no effects"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new enchantment record with no effects"); return; } else @@ -330,7 +330,7 @@ void RecordHelper::overridePotionRecord(const mwmp::PotionRecord& record) if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -384,7 +384,7 @@ void RecordHelper::overrideSpellRecord(const mwmp::SpellRecord& record) if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -426,7 +426,7 @@ void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record) if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -437,7 +437,7 @@ void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record) { if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant)) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring new armor record with invalid enchantment provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new armor record with invalid enchantment provided"); return; } else @@ -500,7 +500,7 @@ void RecordHelper::overrideBookRecord(const mwmp::BookRecord& record) if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -511,7 +511,7 @@ void RecordHelper::overrideBookRecord(const mwmp::BookRecord& record) { if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant)) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring new book record with invalid enchantment provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new book record with invalid enchantment provided"); return; } else @@ -569,7 +569,7 @@ void RecordHelper::overrideClothingRecord(const mwmp::ClothingRecord& record) if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -580,7 +580,7 @@ void RecordHelper::overrideClothingRecord(const mwmp::ClothingRecord& record) { if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant)) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring new clothing record with invalid enchantment provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new clothing record with invalid enchantment provided"); return; } else @@ -635,7 +635,7 @@ void RecordHelper::overrideMiscellaneousRecord(const mwmp::MiscellaneousRecord& if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -686,7 +686,7 @@ void RecordHelper::overrideWeaponRecord(const mwmp::WeaponRecord& record) if (recordData.mId.empty()) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring record override with no id provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided"); return; } @@ -697,7 +697,7 @@ void RecordHelper::overrideWeaponRecord(const mwmp::WeaponRecord& record) { if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant)) { - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Ignoring new weapon record with invalid enchantment provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new weapon record with invalid enchantment provided"); return; } else From 999ce857c787642245e7af134484430c8a4becc1 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 23 Jan 2019 00:48:06 +0200 Subject: [PATCH 03/10] [Client] Add logging for records ignored due to their invalid baseIds --- apps/openmw/mwmp/RecordHelper.cpp | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/apps/openmw/mwmp/RecordHelper.cpp b/apps/openmw/mwmp/RecordHelper.cpp index a8bdcb443..5722fdbef 100644 --- a/apps/openmw/mwmp/RecordHelper.cpp +++ b/apps/openmw/mwmp/RecordHelper.cpp @@ -164,6 +164,11 @@ void RecordHelper::overrideCreatureRecord(const mwmp::CreatureRecord& record) world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } if (isExistingId) world->updatePtrsWithRefId(recordData.mId); @@ -272,6 +277,11 @@ void RecordHelper::overrideNpcRecord(const mwmp::NpcRecord& record) world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } if (isExistingId) world->updatePtrsWithRefId(recordData.mId); @@ -322,6 +332,11 @@ void RecordHelper::overrideEnchantmentRecord(const mwmp::EnchantmentRecord& reco world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } } void RecordHelper::overridePotionRecord(const mwmp::PotionRecord& record) @@ -373,6 +388,11 @@ void RecordHelper::overridePotionRecord(const mwmp::PotionRecord& record) world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } if (isExistingId) world->updatePtrsWithRefId(recordData.mId); @@ -418,6 +438,11 @@ void RecordHelper::overrideSpellRecord(const mwmp::SpellRecord& record) world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } } void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record) @@ -489,6 +514,11 @@ void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record) world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } if (isExistingId) world->updatePtrsWithRefId(recordData.mId); @@ -558,6 +588,11 @@ void RecordHelper::overrideBookRecord(const mwmp::BookRecord& record) world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } if (isExistingId) world->updatePtrsWithRefId(recordData.mId); @@ -624,6 +659,11 @@ void RecordHelper::overrideClothingRecord(const mwmp::ClothingRecord& record) world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } if (isExistingId) world->updatePtrsWithRefId(recordData.mId); @@ -675,6 +715,11 @@ void RecordHelper::overrideMiscellaneousRecord(const mwmp::MiscellaneousRecord& world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } if (isExistingId) world->updatePtrsWithRefId(recordData.mId); @@ -768,6 +813,11 @@ void RecordHelper::overrideWeaponRecord(const mwmp::WeaponRecord& record) world->getModifiableStore().overrideRecord(finalData); } + else + { + LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str()); + return; + } if (isExistingId) world->updatePtrsWithRefId(recordData.mId); From 1df1515c7e4d6448e9ff5d0101d711adff067d89 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 23 Jan 2019 01:04:59 +0200 Subject: [PATCH 04/10] [Client] Add logging for invalid enchantmentIds in RecordHelper --- apps/openmw/mwmp/RecordHelper.cpp | 44 ++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/apps/openmw/mwmp/RecordHelper.cpp b/apps/openmw/mwmp/RecordHelper.cpp index 5722fdbef..5bbbccb51 100644 --- a/apps/openmw/mwmp/RecordHelper.cpp +++ b/apps/openmw/mwmp/RecordHelper.cpp @@ -462,7 +462,7 @@ void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record) { if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant)) { - LOG_APPEND(Log::LOG_INFO, "-- Ignoring new armor record with invalid enchantment provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new armor record with invalid enchantmentId %s", recordData.mEnchant.c_str()); return; } else @@ -500,8 +500,13 @@ void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record) if (record.baseOverrides.hasArmorRating) finalData.mData.mArmor = recordData.mData.mArmor; - if (record.baseOverrides.hasEnchantmentId && doesEnchantmentRecordExist(recordData.mEnchant)) - finalData.mEnchant = recordData.mEnchant; + if (record.baseOverrides.hasEnchantmentId) + { + if (doesEnchantmentRecordExist(recordData.mEnchant)) + finalData.mEnchant = recordData.mEnchant; + else + LOG_APPEND(Log::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str()); + } if (record.baseOverrides.hasEnchantmentCharge) finalData.mData.mEnchant = recordData.mData.mEnchant; @@ -541,7 +546,7 @@ void RecordHelper::overrideBookRecord(const mwmp::BookRecord& record) { if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant)) { - LOG_APPEND(Log::LOG_INFO, "-- Ignoring new book record with invalid enchantment provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new book record with invalid enchantmentId %s", recordData.mEnchant.c_str()); return; } else @@ -577,8 +582,13 @@ void RecordHelper::overrideBookRecord(const mwmp::BookRecord& record) if (record.baseOverrides.hasSkillId) finalData.mData.mSkillId = recordData.mData.mSkillId; - if (record.baseOverrides.hasEnchantmentId && doesEnchantmentRecordExist(recordData.mEnchant)) - finalData.mEnchant = recordData.mEnchant; + if (record.baseOverrides.hasEnchantmentId) + { + if (doesEnchantmentRecordExist(recordData.mEnchant)) + finalData.mEnchant = recordData.mEnchant; + else + LOG_APPEND(Log::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str()); + } if (record.baseOverrides.hasEnchantmentCharge) finalData.mData.mEnchant = recordData.mData.mEnchant; @@ -615,7 +625,7 @@ void RecordHelper::overrideClothingRecord(const mwmp::ClothingRecord& record) { if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant)) { - LOG_APPEND(Log::LOG_INFO, "-- Ignoring new clothing record with invalid enchantment provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new clothing record with invalid enchantmentId %s", recordData.mEnchant.c_str()); return; } else @@ -645,8 +655,13 @@ void RecordHelper::overrideClothingRecord(const mwmp::ClothingRecord& record) if (record.baseOverrides.hasValue) finalData.mData.mValue = recordData.mData.mValue; - if (record.baseOverrides.hasEnchantmentId && doesEnchantmentRecordExist(recordData.mEnchant)) - finalData.mEnchant = recordData.mEnchant; + if (record.baseOverrides.hasEnchantmentId) + { + if (doesEnchantmentRecordExist(recordData.mEnchant)) + finalData.mEnchant = recordData.mEnchant; + else + LOG_APPEND(Log::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str()); + } if (record.baseOverrides.hasEnchantmentCharge) finalData.mData.mEnchant = recordData.mData.mEnchant; @@ -742,7 +757,7 @@ void RecordHelper::overrideWeaponRecord(const mwmp::WeaponRecord& record) { if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant)) { - LOG_APPEND(Log::LOG_INFO, "-- Ignoring new weapon record with invalid enchantment provided"); + LOG_APPEND(Log::LOG_INFO, "-- Ignoring new weapon record with invalid enchantmentId %s", recordData.mEnchant.c_str()); return; } else @@ -802,8 +817,13 @@ void RecordHelper::overrideWeaponRecord(const mwmp::WeaponRecord& record) if (record.baseOverrides.hasFlags) finalData.mData.mFlags = recordData.mData.mFlags; - if (record.baseOverrides.hasEnchantmentId && doesEnchantmentRecordExist(recordData.mEnchant)) - finalData.mEnchant = recordData.mEnchant; + if (record.baseOverrides.hasEnchantmentId) + { + if (doesEnchantmentRecordExist(recordData.mEnchant)) + finalData.mEnchant = recordData.mEnchant; + else + LOG_APPEND(Log::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str()); + } if (record.baseOverrides.hasEnchantmentCharge) finalData.mData.mEnchant = recordData.mData.mEnchant; From c058dce346330e22dcc90e7f92aded73565850c3 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 31 Jan 2019 13:39:06 +0200 Subject: [PATCH 05/10] [General] Clarify meaning of commit hash displayed on start --- components/openmw-mp/Utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/openmw-mp/Utils.cpp b/components/openmw-mp/Utils.cpp index 32b1843c3..3e7fb3e8e 100644 --- a/components/openmw-mp/Utils.cpp +++ b/components/openmw-mp/Utils.cpp @@ -211,7 +211,7 @@ void Utils::printVersion(std::string appName, std::string version, std::string c cout << appName << " " << version; cout << " (" << getOperatingSystemType() << " " << getArchitectureType() << ")" << endl; cout << "Protocol version: " << protocol << endl; - cout << "Commit hash: " << commitHash.substr(0, 10) << endl; + cout << "Oldest compatible commit hash: " << commitHash.substr(0, 10) << endl; cout << "------------------------------------------------------------" << endl; } From 77386525f287530c372750e5c9bd4c4b25847757 Mon Sep 17 00:00:00 2001 From: Koncord Date: Thu, 14 Feb 2019 00:45:05 +0800 Subject: [PATCH 06/10] [General] Update Travis CI --- .travis.yml | 26 +++++++++++++------------- CI/before_install.linux.sh | 17 +++-------------- CI/before_script.linux.sh | 9 +++------ 3 files changed, 19 insertions(+), 33 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33080537b..059bdef6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ os: osx_image: xcode9.4 language: cpp sudo: required -dist: trusty +dist: xenial branches: only: - master @@ -15,18 +15,18 @@ env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo's public key - - secure: NZmvVuA0O9NJXVQ12tXQZHDJC2mbFgYNFcsicw0DgW1It2Nk5hxIkF0pfu4/Z59mhQuOPgRVjl5b0FKy2Axh0gkWc1DJEXGwNaiW5lpTMNWR1LJG5rxa8LrDUpFkycpbzfAFuTUZu5z3iYVv64XzELvBuqNGhPMu1LeBnrlech0jFNjkR9p5qtJGWb8zYcPMCC57rig8a9g1ABoVYS6UXjrKpx0946ZLRsE5ukc9pXsypGwPmOMyfzZkxxzIqFaxoE5JIEdaJTWba/6Za315ozYYIi/N35ROI1YAv5GHRe/Iw9XAa4vQpbDzjM7ZSsZdTvvQsSU598gD2xC6jFUKSrpW6GZKwM2x236fZLGnOk5Uw7DUbG+AwpcEmxBwoy9PjBl9ZF3tJykI0gROewCy8MODhdsVMKr1HGIMVBIJySm/RnNqtoDbYV8mYnSl5b8rwJiCajoiR8Zuv4CIfGneeH1a3DOQDPH/qkDsU6ilzF4ANsBlMUUpgY653KBMBmTlNuVZSH527tnD7Fg6JgHVuSQkTbRa1vSkR7Zcre604RZcAoaEdbX3bhVDasPPghU/I742L0RH3oQNlR09pPBDZ8kG7ydl4aPHwpCWnvXNM1vgxtGvnYLztwrse7IoaRXRYiMFmrso78WhMWUDKgvY4wV9aeUu0DtnMezZVIQwCKg= + - secure: 1QK0yVyoOB+gf2I7XzvhXu9w/5lq4stBXIwJbVCTjz4Q4XVHCosURaW1MAgKzMrPnbFEwjyn5uQ8BwsvvfkuN1AZD0YXITgc7gyI+J1wQ/p/ljxRxglakU6WEgsTs2J5z9UmGac4YTXg+quK7YP3rv+zuGim2I2rhzImejyzp0Ym3kRCnNcy+SGBsiRaevRJMe00Ch8zGAbEhduQGeSoS6W0rcu02DNlQKiq5NktWsXR+TWWWVfIeIlQR/lbPsCd0pdxMaMv2QCY0rVbwrYxWJwr/Qe45dAdWp+8/C3PbXpeMSGxlLa33nJNX4Lf/djxbjm8KWk6edaXPajrjR/0iwcpwq0jg2Jt6XfEdnJt35F1gpXlc04sxStjG45uloOKCFYT0wdhIO1Lq+hDP54wypQl+JInd5qC001O7pwhVxO36EgKWqo8HD+BqGDBwsNj2engy9Qcp3wO6G0rLBPB3CrZsk9wrHVv5cSiQSLMhId3Xviu3ZI2qEDA+kgTvxrKrsnMj4bILVCyG5Ka2Mj22wIDW9e8oIab9oTdujax3DTN1GkD6QuOAGzwDsNwGASsgfoeZ+FUhgM75RlBWGMilgkmnF7EJ0oAXLEpjtABnEr2d4qHv+y08kOuTDBLB9ExzCIj024dYYYNLZrqPKx0ncHuCMG2QNj2aJAJEZtj1rQ= + addons: apt: sources: - sourceline: 'ppa:openmw/openmw' - sourceline: 'ppa:rakhimov/boost' - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.8 packages: [ # Dev - cmake, clang-3.8, libunshield-dev, libtinyxml-dev, - g++-6, + cmake, clang-6.0, libunshield-dev, libtinyxml-dev, + g++-8, # Tests libgtest-dev, google-mock, # Boost @@ -45,7 +45,7 @@ addons: project: name: "TES3MP/openmw-tes3mp" description: "" - notification_email: stas5978@gmail.com + notification_email: koncord@tes3mp.com build_command_prepend: "cmake . -DBUILD_UNITTESTS=FALSE -DBUILD_OPENCS=FALSE -DBUILD_BSATOOL=FALSE -DBUILD_ESMTOOL=FALSE -DBUILD_MWINIIMPORTER=FALSE -DBUILD_LAUNCHER=FALSE" build_command: "make -j3" branch_pattern: coverity_scan @@ -53,21 +53,21 @@ matrix: include: - os: linux env: - - ANALYZE="scan-build-3.8 --use-cc clang-3.8 --use-c++ clang++-3.8 " - - MATRIX_CC="CC=clang-3.8 && CXX=clang++-3.8" + - ANALYZE="scan-build-6.0 --use-cc clang-6.0 --use-c++ clang++-6.0 " + - MATRIX_CC="CC=clang-6.0 && CXX=clang++-6.0" compiler: clang - os: linux env: - - MATRIX_CC="CC=gcc-6 && CXX=g++-6" + - MATRIX_CC="CC=gcc-8 && CXX=g++-8" - os: linux env: - - MATRIX_CC="CC=clang-3.8 && CXX=clang++-3.8" + - MATRIX_CC="CC=clang-6.0 && CXX=clang++-6.0" allow_failures: - env: - - MATRIX_CC="CC=clang-3.8 && CXX=clang++-3.8" + - MATRIX_CC="CC=clang-6.0 && CXX=clang++-6.0" - env: - - ANALYZE="scan-build-3.8 --use-cc clang-3.8 --use-c++ clang++-3.8 " - - MATRIX_CC="CC=clang-3.8 && CXX=clang++-3.8" + - ANALYZE="scan-build-6.0 --use-cc clang-6.0 --use-c++ clang++-6.0 " + - MATRIX_CC="CC=clang-6.0 && CXX=clang++-6.0" before_install: - ./CI/before_install.${TRAVIS_OS_NAME}.sh diff --git a/CI/before_install.linux.sh b/CI/before_install.linux.sh index e2313b443..2e76a57e2 100755 --- a/CI/before_install.linux.sh +++ b/CI/before_install.linux.sh @@ -15,19 +15,8 @@ sudo ln -s /usr/src/gtest/build/libgtest.so /usr/lib/libgtest.so sudo ln -s /usr/src/gtest/build/libgtest_main.so /usr/lib/libgtest_main.so cd ~/ -git clone https://github.com/TES3MP/RakNet -cd RakNet -cmake . -DRAKNET_ENABLE_DLL=OFF -DRAKNET_ENABLE_SAMPLES=OFF -DCMAKE_BUILD_TYPE=Release +git clone https://github.com/TES3MP/CrabNet +cd CrabNet +cmake . -DCRABNET_ENABLE_DLL=OFF -DCRABNET_ENABLE_SAMPLES=OFF -DCMAKE_BUILD_TYPE=Release make -j3 -cd ~/ -git clone https://github.com/Koncord/CallFF -cd CallFF -mkdir build -cd build -cmake ../ -make -j3 - -cd ~/ -wget https://github.com/zdevito/terra/releases/download/release-2016-03-25/terra-Linux-x86_64-332a506.zip -unzip terra-Linux-x86_64-332a506.zip diff --git a/CI/before_script.linux.sh b/CI/before_script.linux.sh index f1ba38415..4f7477985 100755 --- a/CI/before_script.linux.sh +++ b/CI/before_script.linux.sh @@ -9,8 +9,7 @@ if [ ! -z "${MATRIX_CC}" ]; then eval "${MATRIX_CC}" fi -export RAKNET_ROOT=~/RakNet -export Terra_ROOT=~/terra-Linux-x86_64-332a506 +export RAKNET_ROOT=~/CrabNet export CODE_COVERAGE=0 if [ ! -z "${ANALYZE}" ]; then @@ -36,7 +35,5 @@ ${ANALYZE}cmake .. \ -DBINDIR=/usr/games \ -DCMAKE_BUILD_TYPE="None" \ -DUSE_SYSTEM_TINYXML=TRUE \ - -DRakNet_LIBRARY_RELEASE=~/RakNet/lib/libRakNetLibStatic.a \ - -DRakNet_LIBRARY_DEBUG=~/RakNet/lib/libRakNetLibStatic.a \ - -DCallFF_INCLUDES=~/CallFF/include \ - -DCallFF_LIBRARY=~/CallFF/build/src/libcallff.a + -DRakNet_LIBRARY_RELEASE=~/CrabNet/lib/libRakNetLibStatic.a \ + -DRakNet_LIBRARY_DEBUG=~/CrabNet/lib/libRakNetLibStatic.a From 222837976c656e4a87ea3a5219d4f860b61315a8 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 13 Feb 2019 21:56:47 +0200 Subject: [PATCH 07/10] [Server] Fix type name warning for Player The warning in Visual Studio was: "'Player': type name first seen using 'class' now seen using 'struct'" --- apps/openmw-mp/Player.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/openmw-mp/Player.hpp b/apps/openmw-mp/Player.hpp index a59319f3b..abc205dcb 100644 --- a/apps/openmw-mp/Player.hpp +++ b/apps/openmw-mp/Player.hpp @@ -21,7 +21,6 @@ #include "Cell.hpp" #include "CellController.hpp" -struct Player; typedef std::map TPlayers; typedef std::map TSlots; From f3b8a5b909a4377cfcac298ff85e4649fae10c6b Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 14 Feb 2019 00:29:55 +0200 Subject: [PATCH 08/10] [General] Check integrity of credits only on Windows clients This avoids the problems that were encountered in Linux and macOS builds regarding this check while also still addressing the scenario where official Windows builds had their credits modified by people unrelated to the project. --- apps/openmw-mp/main.cpp | 20 -------------------- apps/openmw/main.cpp | 8 +++++--- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/apps/openmw-mp/main.cpp b/apps/openmw-mp/main.cpp index 6a74808f1..485398cec 100644 --- a/apps/openmw-mp/main.cpp +++ b/apps/openmw-mp/main.cpp @@ -201,26 +201,6 @@ int main(int argc, char *argv[]) vector plugins(Utils::split(mgr.getString("plugins", "Plugins"), ',')); Utils::printVersion("TES3MP dedicated server", TES3MP_VERSION, version.mCommitHash, TES3MP_PROTO_VERSION); - - // Check for unmodified tes3mp-credits file; this makes it so people can't repackage official releases with - // their own made-up credits, though it obviously has no bearing on unofficial releases that change - // the checksum below - boost::filesystem::path folderPath(boost::filesystem::initial_path()); - folderPath = boost::filesystem::system_complete(boost::filesystem::path(argv[0])).remove_filename(); - std::string creditsPath = folderPath.string() + "/tes3mp-credits"; - - unsigned int expectedChecksumInt = Utils::hexStrToInt(TES3MP_CREDITS_CHECKSUM); - bool hasValidCredits = Utils::doesFileHaveChecksum(creditsPath + ".md", expectedChecksumInt); - - if (!hasValidCredits) - hasValidCredits = Utils::doesFileHaveChecksum(creditsPath + ".txt", expectedChecksumInt); - - if (!hasValidCredits) - { - LOG_MESSAGE_SIMPLE(Log::LOG_FATAL, "The server is shutting down"); - LOG_APPEND(Log::LOG_FATAL, "- %s", TES3MP_CREDITS_ERROR); - return 1; - } Script::SetModDir(dataDirectory); diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index d8f9d8cf1..1397b33bb 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -221,10 +221,11 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat /* Start of tes3mp addition - Check for unmodified tes3mp-credits file; this makes it so people can't repackage official releases with - their own made-up credits, though it obviously has no bearing on unofficial releases that change - the checksum below + Check for unmodified tes3mp-credits file on Windows; this makes it so people can't repackage official + releases with their own made-up credits, though it obviously has no bearing on unofficial releases that + change the checksum below */ +#ifdef _WIN32 boost::filesystem::path folderPath(boost::filesystem::initial_path()); folderPath = boost::filesystem::system_complete(boost::filesystem::path(argv[0])).remove_filename(); std::string creditsPath = folderPath.string() + "/tes3mp-credits"; @@ -242,6 +243,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "tes3mp", TES3MP_CREDITS_ERROR, 0); return false; } +#endif /* End of tes3mp addition */ From 69e7d3f2a79f92c8b6b9debd7abf4c9eb9d712ca Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 14 Feb 2019 13:07:54 +0200 Subject: [PATCH 09/10] [Documentation] Update credits --- components/openmw-mp/Version.hpp | 3 ++- tes3mp-credits.md | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/openmw-mp/Version.hpp b/components/openmw-mp/Version.hpp index 4ebc40f27..8482fc69d 100644 --- a/components/openmw-mp/Version.hpp +++ b/components/openmw-mp/Version.hpp @@ -7,6 +7,7 @@ #define TES3MP_DEFAULT_PASSW "SuperPassword" #define TES3MP_MASTERSERVER_PASSW "12345" -#define TES3MP_CREDITS_CHECKSUM "BC39D2E9" +#define TES3MP_CREDITS_CHECKSUM "8B457A07" + #endif //OPENMW_VERSION_HPP diff --git a/tes3mp-credits.md b/tes3mp-credits.md index fa3e375e1..e6776c95c 100644 --- a/tes3mp-credits.md +++ b/tes3mp-credits.md @@ -26,6 +26,7 @@ Community administrators Community moderators -------------------- + Lysol Michael Fitzmayer (mupf) Nac NicholasAH @@ -53,6 +54,7 @@ Translation Super special thanks -------------------- + Alexander Ovsyannikov Bret Curtis (psi29a) Gabriel Pascu (iGrebla) greetasdf @@ -84,6 +86,7 @@ Special thanks Scorcio Simon Nemes Texafornian + Thrud Zaphida All the developers of OpenMW for creating an amazing open source project From 828c52138fa8fd6a8c91fdb0205013dfb5b51511 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 19 Feb 2019 17:29:29 +0200 Subject: [PATCH 10/10] [Documentation] Update readme and credits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to some legal advice I've received, the "TES3MP Team" is too ambiguous of a legal entity, so – with Koncord's agreement – the copyright is now assigned specifically to us, the project's developers. --- README.md | 23 ++++++++++++----------- components/openmw-mp/Version.hpp | 2 +- tes3mp-credits.md | 7 ++++--- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 006a03eaf..ec258475b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ TES3MP ====== Copyright (c) 2008-2015, OpenMW Team -Copyright (c) 2016-2018, TES3MP Team +Copyright (c) 2016-2019, Stanislav Zhukov & David Cernat [![Build Status](https://travis-ci.org/TES3MP/openmw-tes3mp.svg?branch=0.7.0)](https://travis-ci.org/TES3MP/openmw-tes3mp) @@ -15,7 +15,7 @@ TES3MP is a project adding multiplayer functionality to [OpenMW](https://github. Font Licenses: * DejaVuLGCSansMono.ttf: custom (see [files/mygui/DejaVu Font License.txt](https://github.com/TES3MP/openmw-tes3mp/blob/master/files/mygui/DejaVu%20Font%20License.txt) for more information) -Project Status +Project status -------------- [Version changelog](https://github.com/TES3MP/openmw-tes3mp/blob/master/tes3mp-changelog.md) @@ -24,25 +24,26 @@ As of version 0.7.0, TES3MP is fully playable, providing very extensive player, Remaining gameplay problems mostly relate to AI and the synchronization of clientside script variables. +Donations +--------------- + +You can benefit the project by donating on Patreon to our two developers, [David Cernat](https://www.patreon.com/davidcernat) and [Koncord](https://www.patreon.com/Koncord), as well as by supporting [OpenMW](https://openmw.org). + Contributing --------------- +--------------- -Development has been relatively fast, but any contribution regarding [code](https://github.com/TES3MP/openmw-tes3mp/blob/master/CONTRIBUTING.md), documentation, bug hunting or video showcases is greatly appreciated. +Helping us with documentation, bug hunting and video showcases is always greatly appreciated. -Test sessions are often advertised on [our Discord server](https://discord.gg/ECJk293) or in [our Steam group](https://steamcommunity.com/groups/mwmulti). +For code contributions, it's best to start out with modestly sized fixes and features and work your way up. There are so many different possible implementations of more major features – many of which would cause undesirable code or vision conflicts with OpenMW – that those should be talked over in advance with the existing developers before effort is spent on them. Feel free to contact the [team members](https://github.com/TES3MP/openmw-tes3mp/blob/master/tes3mp-credits.md) for any questions you might have. -Getting Started +Getting started --------------- * [Quickstart guide](https://github.com/TES3MP/openmw-tes3mp/wiki/Quickstart-guide) * [Steam group](https://steamcommunity.com/groups/mwmulti) and its [detailed FAQ](https://steamcommunity.com/groups/mwmulti/discussions/1/353916184342480541/) * [TES3MP section on OpenMW forums](https://forum.openmw.org/viewforum.php?f=45) +* [Discord server](https://discord.gg/ECJk293) * [Subreddit](https://www.reddit.com/r/tes3mp) * [Known issues and bug reports](https://github.com/TES3MP/openmw-tes3mp/issues) - -Donations ---------------- - -You can benefit the project by contributing to the Patreon pages of our two developers, [David Cernat](https://www.patreon.com/davidcernat) and [Koncord](https://www.patreon.com/Koncord), as well as by supporting [OpenMW](https://openmw.org). diff --git a/components/openmw-mp/Version.hpp b/components/openmw-mp/Version.hpp index 8482fc69d..58f20fa81 100644 --- a/components/openmw-mp/Version.hpp +++ b/components/openmw-mp/Version.hpp @@ -7,7 +7,7 @@ #define TES3MP_DEFAULT_PASSW "SuperPassword" #define TES3MP_MASTERSERVER_PASSW "12345" -#define TES3MP_CREDITS_CHECKSUM "8B457A07" +#define TES3MP_CREDITS_CHECKSUM "BAEFF920" #endif //OPENMW_VERSION_HPP diff --git a/tes3mp-credits.md b/tes3mp-credits.md index e6776c95c..c837f7fb4 100644 --- a/tes3mp-credits.md +++ b/tes3mp-credits.md @@ -4,14 +4,14 @@ tes3mp Credits Programmers ---------------- - Stanislav Zhukov (Koncord) - Overall architecture, networking & scripting systems, player sync, server browser & master server + Stanislav Zhukov (Koncord) - Architecture, networking & scripting systems, player sync, server browser & master server David Cernat - World, NPC & quest sync, player sync improvements, state saving & loading, extensive bug fixes Additional programming ---------------------- - Grim Kriegor - Lua teleportation commands, early script fixes + Grim Kriegor - Linux deployment scripts, Lua teleportation commands, early script fixes Battlerax - Various small fixes @@ -75,8 +75,9 @@ Special thanks Gluka Goodevil Ignatious - James Wards of Gore Corps LAN Club (www.gorecorps.co.nz) + James Wards of Gore Corps LAN Club (gorecorps.co.nz) Jeremiah + Kyle Willey of Loreshaper Games (steempeak.com/@loreshapergames) Lewis Sadlier Luc Keating Michael Zagar (Zoops)