From 9cf7596344977102151bd59c93e674a93d4e1c0c Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 4 Sep 2016 13:49:03 +0300 Subject: [PATCH 1/5] update travis.yml --- .travis.yml | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 699701e7c..9fee37497 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,28 @@ +sudo: required +dist: trusty language: cpp before_install: - #new boost - - sudo add-apt-repository --yes ppa:boost-latest/ppa - #new GCC - - sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test #new Clang - sudo add-apt-repository --yes ppa:h-rayflood/llvm #new SDL2 - sudo add-apt-repository --yes ppa:zoogie/sdl2-snapshots #new Qt - - sudo add-apt-repository --yes ppa:beineri/opt-qt532 + - sudo add-apt-repository --yes ppa:beineri/opt-qt57-trusty #new CMake - - sudo add-apt-repository --yes ppa:andykimpe/cmake + - sudo add-apt-repository --yes ppa:george-edison55/cmake-3.x - sudo apt-get update -qq - sudo apt-get install -qq $SUPPORT - sudo apt-get install -qq $PACKAGE - - sudo apt-get install -qq cmake libboost1.55-all-dev zlib1g-dev + - sudo apt-get install -qq cmake libboost1.54-all-dev zlib1g-dev - sudo apt-get install -qq libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev - sudo apt-get install -qq libavformat-dev libswscale-dev - - sudo apt-get install -qq qt53declarative + - sudo apt-get install -qq qt57declarative #setup compiler - - source /opt/qt53/bin/qt53-env.sh + - source /opt/qt57/bin/qt57-env.sh - export CC=${REAL_CC} CXX=${REAL_CXX} before_script: @@ -42,16 +40,14 @@ matrix: exclude: - env: ignore=this include: - - compiler: clang # fails all the time - missing packages? - env: REAL_CC=clang-3.2 REAL_CXX=clang++-3.2 PACKAGE=clang-3.2 SUPPORT=g++-4.8 - compiler: clang - env: REAL_CC=clang-3.3 REAL_CXX=clang++-3.3 PACKAGE=clang-3.3 SUPPORT=g++-4.8 + env: REAL_CC=clang-3.4 REAL_CXX=clang++-3.4 PACKAGE=clang-3.4 SUPPORT=libstdc++-4.8-dev - compiler: clang - env: REAL_CC=clang-3.4 REAL_CXX=clang++-3.4 PACKAGE=clang-3.4 SUPPORT=g++-4.8 - #- compiler: gcc # fails due to running out of memory - vcmi need too much of it for successfull compilation - # env: REAL_CC=gcc-4.7 REAL_CXX=g++-4.7 PACKAGE=g++-4.7 SUPPORT= - #- compiler: gcc # same as 4.7 - # env: REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PACKAGE=g++-4.8 SUPPORT= + env: REAL_CC=clang-3.5 REAL_CXX=clang++-3.5 PACKAGE=clang-3.5 SUPPORT=libstdc++-4.8-dev + - compiler: clang + env: REAL_CC=clang-3.6 REAL_CXX=clang++-3.6 PACKAGE=clang-3.6 SUPPORT=libstdc++-4.8-dev + - compiler: gcc + env: REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PACKAGE=g++-4.8 SUPPORT= notifications: email: From d2bd749b4fb401f5a1fdb3070ff1391020aea44f Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Sun, 4 Sep 2016 13:30:11 +0200 Subject: [PATCH 2/5] MSVS project fixes. --- launcher/VCMI_launcher.vcxproj | 2 +- launcher/sdldisplayquery.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/launcher/VCMI_launcher.vcxproj b/launcher/VCMI_launcher.vcxproj index 05f1cf36a..6654458b1 100644 --- a/launcher/VCMI_launcher.vcxproj +++ b/launcher/VCMI_launcher.vcxproj @@ -77,7 +77,7 @@ %(PreprocessorDefinitions) - VCMI_lib.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5Network.lib;%(AdditionalDependencies) + VCMI_lib.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5Network.lib;SDL2.lib;%(AdditionalDependencies) ..\..\libs;.. diff --git a/launcher/sdldisplayquery.cpp b/launcher/sdldisplayquery.cpp index aaaf24bb1..64cfc538d 100644 --- a/launcher/sdldisplayquery.cpp +++ b/launcher/sdldisplayquery.cpp @@ -1,3 +1,4 @@ +#include "StdInc.h" #include "sdldisplayquery.h" #include From 6122186efaf8ce36341c16307ec4ee9631857fe4 Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Sun, 4 Sep 2016 13:31:04 +0200 Subject: [PATCH 3/5] Removed old template duplicated by new package. --- .../defaultTemplates/coldshadowsFantasy.json | 239 ------------------ .../Mods/Coldshadows Fantasy/mod.json | 12 - 2 files changed, 251 deletions(-) delete mode 100644 Mods/vcmi/Mods/defaultTemplates/Mods/Coldshadows Fantasy/Content/config/defaultTemplates/coldshadowsFantasy.json delete mode 100644 Mods/vcmi/Mods/defaultTemplates/Mods/Coldshadows Fantasy/mod.json diff --git a/Mods/vcmi/Mods/defaultTemplates/Mods/Coldshadows Fantasy/Content/config/defaultTemplates/coldshadowsFantasy.json b/Mods/vcmi/Mods/defaultTemplates/Mods/Coldshadows Fantasy/Content/config/defaultTemplates/coldshadowsFantasy.json deleted file mode 100644 index 1d47aef49..000000000 --- a/Mods/vcmi/Mods/defaultTemplates/Mods/Coldshadows Fantasy/Content/config/defaultTemplates/coldshadowsFantasy.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "Coldshadow's Fantasy": - { - "minSize" : "xl+u", "maxSize" : "xl+u", - "players" : "4-8", "cpu" : "3-6", - "zones": - { - "1": - { - "type" : "playerStart", "size" : 30, "owner" : 1, - "playerTowns" : { "castles" : 1 }, - "neutralTowns" : { "towns" : 1 }, - "monsters" : "normal", - "mines" : {"wood" : 2, "ore" : 2, "gems" : 1, "crystal" : 1, "sulfur" : 1, "mercury" : 1, "gold" : 1}, - "treasure" : [ - {"min" : 7500, "max": 25000, "density": 4}, - {"min" : 3000, "max": 9000, "density": 6}, - {"min" : 300, "max": 3000, "density": 8} - ] - }, - "2": - { - "type" : "cpuStart", "size" : 30, "owner" : 2, - "playerTowns" : { "castles" : 1 }, - "neutralTowns" : { "towns" : 1 }, - "monsters" : "weak", - "minesLikeZone" : 1, - "treasureLikeZone" : 1 - }, - "3": - { - "type" : "cpuStart", "size" : 30, "owner" : 3, - "playerTowns" : { "castles" : 1 }, - "neutralTowns" : { "towns" : 1 }, - "monsters" : "weak", - "minesLikeZone" : 1, - "treasureLikeZone" : 1 - }, - "4": - { - "type" : "cpuStart", "size" : 30, "owner" : 4, - "playerTowns" : { "castles" : 1 }, - "neutralTowns" : { "towns" : 1 }, - "monsters" : "weak", - "minesLikeZone" : 1, - "treasureLikeZone" : 1 - }, - "5": - { - "type" : "playerStart", "size" : 30, "owner" : 5, - "playerTowns" : { "castles" : 1 }, - "neutralTowns" : { "towns" : 1 }, - "monsters" : "normal", - "minesLikeZone" : 1, - "treasureLikeZone" : 1 - }, - "6": - { - "type" : "cpuStart", "size" : 30, "owner" : 6, - "playerTowns" : { "castles" : 1 }, - "neutralTowns" : { "towns" : 1 }, - "monsters" : "weak", - "minesLikeZone" : 1, - "treasureLikeZone" : 1 - }, - "7": - { - "type" : "cpuStart", "size" : 30, "owner" : 7, - "playerTowns" : { "castles" : 1 }, - "neutralTowns" : { "towns" : 1 }, - "monsters" : "weak", - "minesLikeZone" : 1, - "treasureLikeZone" : 1 - }, - "8": - { - "type" : "cpuStart", "size" : 30, "owner" : 8, - "playerTowns" : { "castles" : 1 }, - "neutralTowns" : { "towns" : 1 }, - "monsters" : "weak", - "minesLikeZone" : 1, - "treasureLikeZone" : 1 - }, - "9": - { - "type" : "treasure", "size" : 15, - "terrainTypes" : ["subterra"], "matchTerrainToTown" : false, - "neutralTowns" : { "castles" : 1 }, - "monsters" : "strong", - "mines" : {"gems" : 1, "sulfur" : 1, "mercury" : 1, "crystal" : 1}, - "treasure" : [ - {"min" : 45000, "max": 75000, "density": 3}, - {"min" : 15000, "max": 50000, "density": 3}, - {"min" : 3080, "max": 12500, "density": 4} - ] - }, - "10": - { - "type" : "treasure", "size" : 15, - "terrainTypeLikeZone" : 9, - "neutralTowns" : { "castles" : 1 }, - "monsters" : "normal", - "minesLikeZone" : 9, - "treasureLikeZone" : 9 - }, - "11": - { - "type" : "treasure", "size" : 15, - "terrainTypeLikeZone" : 9, - "neutralTowns" : { "castles" : 1 }, - "monsters" : "normal", - "minesLikeZone" : 9, - "treasureLikeZone" : 9 - }, - "12": - { - "type" : "treasure", "size" : 15, - "terrainTypeLikeZone" : 9, - "neutralTowns" : { "castles" : 1 }, - "monsters" : "normal", - "minesLikeZone" : 9, - "treasureLikeZone" : 9 - }, - "13": - { - "type" : "treasure", "size" : 15, - "terrainTypeLikeZone" : 9, - "neutralTowns" : { "castles" : 1 }, - "monsters" : "strong", - "minesLikeZone" : 9, - "treasureLikeZone" : 9 - }, - "14": - { - "type" : "treasure", "size" : 15, - "terrainTypeLikeZone" : 9, - "neutralTowns" : { "castles" : 1 }, - "monsters" : "normal", - "minesLikeZone" : 9, - "treasureLikeZone" : 9 - }, - "15": - { - "type" : "treasure", "size" : 15, - "terrainTypeLikeZone" : 9, - "neutralTowns" : { "castles" : 1 }, - "monsters" : "normal", - "minesLikeZone" : 9, - "treasureLikeZone" : 9 - }, - "16": - { - "type" : "treasure", "size" : 15, - "terrainTypeLikeZone" : 9, - "neutralTowns" : { "castles" : 1 }, - "monsters" : "normal", - "minesLikeZone" : 9, - "treasureLikeZone" : 9 - }, - "17": - { - "type" : "junction", "size" : 30, - "terrainTypeLikeZone" : 9, - "allowedTowns" : ["neutral"], - "monsters" : "strong", - "mines" : {"gold" : 1}, - "treasure" : [ - {"min" : 65000, "max": 100000, "density": 3}, - {"min" : 50000, "max": 100000, "density": 3}, - {"min" : 10000, "max": 15000, "density": 3} - ] - }, - "18": - { - "type" : "junction", "size" : 30, - "terrainTypeLikeZone" : 9, - "allowedTowns" : ["neutral"], - "monsters" : "strong", - "minesLikeZone" : 17, - "treasureLikeZone" : 17 - }, - "19": - { - "type" : "junction", "size" : 30, - "terrainTypeLikeZone" : 9, - "allowedTowns" : ["neutral"], - "monsters" : "strong", - "minesLikeZone" : 17, - "treasureLikeZone" : 17 - }, - "20": - { - "type" : "junction", "size" : 30, - "terrainTypeLikeZone" : 9, - "allowedTowns" : ["neutral"], - "monsters" : "strong", - "minesLikeZone" : 17, - "treasureLikeZone" : 17 - }, - "21": - { - "type" : "treasure", "size" : 20, - "terrainTypeLikeZone" : 9, - "neutralTowns" : { "castles" : 1 }, - "monsters" : "strong", - "treasure" : [ - {"min" : 100000, "max": 130000, "density": 3}, - {"min" : 100000, "max": 150000, "density": 3}, - {"min" : 20000, "max": 60000, "density": 3} - ] - } - }, - "connections" : - [ - { "a" : "1", "b" : "9", "guard" : 36000 }, - { "a" : "2", "b" : "10", "guard" : 12000 }, - { "a" : "3", "b" : "11", "guard" : 12000 }, - { "a" : "4", "b" : "12", "guard" : 12000 }, - { "a" : "5", "b" : "13", "guard" : 36000 }, - { "a" : "6", "b" : "14", "guard" : 12000 }, - { "a" : "7", "b" : "15", "guard" : 12000 }, - { "a" : "8", "b" : "16", "guard" : 12000 }, - { "a" : "9", "b" : "17", "guard" : 75000 }, - { "a" : "10", "b" : "17", "guard" : 25000 }, - { "a" : "11", "b" : "18", "guard" : 25000 }, - { "a" : "12", "b" : "18", "guard" : 25000 }, - { "a" : "13", "b" : "19", "guard" : 75000 }, - { "a" : "14", "b" : "19", "guard" : 25000 }, - { "a" : "15", "b" : "20", "guard" : 25000 }, - { "a" : "16", "b" : "20", "guard" : 25000 }, - { "a" : "17", "b" : "18", "guard" : 50000 }, - { "a" : "19", "b" : "20", "guard" : 50000 }, - { "a" : "17", "b" : "21", "guard" : 60000 }, - { "a" : "18", "b" : "21", "guard" : 60000 }, - { "a" : "19", "b" : "21", "guard" : 60000 }, - { "a" : "20", "b" : "21", "guard" : 60000 } - ] - } -} diff --git a/Mods/vcmi/Mods/defaultTemplates/Mods/Coldshadows Fantasy/mod.json b/Mods/vcmi/Mods/defaultTemplates/Mods/Coldshadows Fantasy/mod.json deleted file mode 100644 index d185c8521..000000000 --- a/Mods/vcmi/Mods/defaultTemplates/Mods/Coldshadows Fantasy/mod.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name" : "Coldshadow's Fantasy", - "description" : "Random map template, 4-8p XL+U", - - "version" : "0.99", - "author" : "Coldshadow, ported by VCMI Team", - "contact" : "http://forum.vcmi.eu/index.php", - "modType" : "Templates", - "templates" : [ - "config/defaultTemplates/coldshadowsFantasy" - ], -} From 8e94b1c4d2f8b707dbbc50b9849cbdf2b3a3f901 Mon Sep 17 00:00:00 2001 From: Arseniy Shestakov Date: Sun, 4 Sep 2016 15:44:42 +0300 Subject: [PATCH 4/5] VCAI::objectRemoved: handle hero boat removal. Fix issue 2350 Avoid situation when AI attempt to visit boat after it's killed hero who used it. --- AI/VCAI/VCAI.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index 4b35c8451..e3a997def 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -398,6 +398,16 @@ void VCAI::objectRemoved(const CGObjectInstance *obj) for (auto h : cb->getHeroesInfo()) unreserveObject(h, obj); + //TODO: Find better way to handle hero boat removal + if(auto hero = dynamic_cast(obj)) + { + if(hero->boat) + { + vstd::erase_if_present(visitableObjs, hero->boat); + vstd::erase_if_present(alreadyVisited, hero->boat); + } + } + cachedSectorMaps.clear(); //invalidate all paths //TODO From 13aedac3f49fa0151bf1ae10539aaad4b3573b23 Mon Sep 17 00:00:00 2001 From: AlexVinS Date: Mon, 5 Sep 2016 05:15:53 +0300 Subject: [PATCH 5/5] Fixed war machines spell immunity. * Should fix http://bugs.vcmi.eu/view.php?id=2407 --- config/spells/ability.json | 19 +++++++++ config/spells/other.json | 80 +++++++++++++++++++------------------- config/spells/timed.json | 1 + 3 files changed, 61 insertions(+), 39 deletions(-) diff --git a/config/spells/ability.json b/config/spells/ability.json index 029bc9ded..92f4125ae 100644 --- a/config/spells/ability.json +++ b/config/spells/ability.json @@ -40,6 +40,9 @@ } } }, + "absoluteImmunity":{ + "SIEGE_WEAPON": true + }, "flags" : { "indifferent": true } @@ -74,6 +77,9 @@ } } }, + "absoluteImmunity":{ + "SIEGE_WEAPON": true + }, "immunity" : { "UNDEAD": true, "NON_LIVING": true @@ -139,6 +145,9 @@ } } }, + "absoluteImmunity":{ + "SIEGE_WEAPON": true + }, "immunity" : { "UNDEAD": true, "NON_LIVING": true @@ -179,6 +188,9 @@ } } }, + "absoluteImmunity":{ + "SIEGE_WEAPON": true + }, "flags" : { "negative": true } @@ -207,6 +219,9 @@ } } }, + "absoluteImmunity":{ + "SIEGE_WEAPON": true + }, "immunity" : { "UNDEAD": true, "NON_LIVING": true @@ -230,6 +245,9 @@ "range" : "0-1" } }, + "absoluteImmunity":{ + "SIEGE_WEAPON": true + }, "immunity" : { "UNDEAD": true, "NON_LIVING": true @@ -296,6 +314,7 @@ }, "absoluteImmunity" : { "UNDEAD": true, + "SIEGE_WEAPON": true, "NON_LIVING": true }, "flags" : { diff --git a/config/spells/other.json b/config/spells/other.json index 56cc57ade..9ff82216f 100644 --- a/config/spells/other.json +++ b/config/spells/other.json @@ -2,7 +2,7 @@ "quicksand" : { "index" : 10, "targetType" : "NO_TARGET", - + "sounds": { "cast": "QUIKSAND" }, @@ -18,7 +18,7 @@ "landMine" : { "index" : 11, "targetType" : "NO_TARGET", - + "sounds": { "cast": "" }, @@ -38,7 +38,7 @@ "forceField" : { "index" : 12, "targetType" : "LOCATION", - + "sounds": { "cast": "FORCEFLD" }, @@ -56,8 +56,8 @@ }, "fireWall" : { "index" : 13, - "targetType" : "LOCATION", - + "targetType" : "LOCATION", + "sounds": { "cast": "FIREWALL" }, @@ -66,7 +66,7 @@ "range" : "0", "targetModifier":{ "clearAffected": true - } + } } }, "flags" : { @@ -79,8 +79,8 @@ }, "earthquake" : { "index" : 14, - "targetType" : "NO_TARGET", - + "targetType" : "NO_TARGET", + "sounds": { "cast": "ERTHQUAK" }, @@ -94,27 +94,27 @@ "indifferent": true } }, - + "dispel" : { "index" : 35, - "targetType" : "CREATURE", - + "targetType" : "CREATURE", + "animation":{ "affect":["C05SPW"] //C05SPW0 - }, + }, "sounds": { "cast": "DISPELL" }, "levels" : { "base":{ - "targetModifier":{"smart":true}, + "targetModifier":{"smart":true}, "range" : "0" }, "advanced":{ - "targetModifier":{"smart":false} + "targetModifier":{"smart":false} }, "expert":{ - "targetModifier":{"smart":false}, + "targetModifier":{"smart":false}, "range" : "X" } }, @@ -124,11 +124,11 @@ }, "cure" : { "index" : 37, - "targetType" : "CREATURE", + "targetType" : "CREATURE", "animation":{ "affect":["C03SPW"]//C03SPW0 }, - + "sounds": { "cast": "CURE" }, @@ -147,8 +147,8 @@ }, "resurrection" : { "index" : 38, - "targetType" : "CREATURE", - + "targetType" : "CREATURE", + "animation":{ "affect":["C01SPE0"] }, @@ -167,16 +167,17 @@ }, "absoluteImmunity" : { "UNDEAD": true, + "SIEGE_WEAPON": true, "NON_LIVING": true } }, "animateDead" : { "index" : 39, - "targetType" : "CREATURE", - + "targetType" : "CREATURE", + "animation":{ "affect":["C01SPE0"] - }, + }, "sounds": { "cast": "ANIMDEAD" }, @@ -196,11 +197,11 @@ }, "sacrifice" : { "index" : 40, - "targetType" : "CREATURE", - + "targetType" : "CREATURE", + "animation":{ "affect":["C01SPE0"] - }, + }, "sounds": { "cast": "SACRIF1" }, @@ -215,14 +216,15 @@ "positive": true }, "absoluteImmunity" : { + "SIEGE_WEAPON": true, "UNDEAD": true, "NON_LIVING": true } }, "teleport" : { "index" : 63, - "targetType" : "CREATURE", - + "targetType" : "CREATURE", + "sounds": { "cast": "TELPTOUT" }, @@ -241,10 +243,10 @@ }, "removeObstacle" : { "index" : 64, - "targetType" : "OBSTACLE", + "targetType" : "OBSTACLE", "animation":{ "cast":[2] - }, + }, "sounds": { "cast": "REMOVEOB" }, @@ -259,10 +261,10 @@ }, "clone" : { "index" : 65, - "targetType" : "CREATURE", + "targetType" : "CREATURE", "animation":{ "cast":[2] - }, + }, "sounds": { "cast": "CLONE" }, @@ -281,10 +283,10 @@ }, "fireElemental" : { "index" : 66, - "targetType" : "NO_TARGET", + "targetType" : "NO_TARGET", "animation":{ "cast":[2] - }, + }, "sounds": { "cast": "SUMNELM" }, @@ -299,10 +301,10 @@ }, "earthElemental" : { "index" : 67, - "targetType" : "NO_TARGET", + "targetType" : "NO_TARGET", "animation":{ "cast":[2] - }, + }, "sounds": { "cast": "SUMNELM" }, @@ -317,10 +319,10 @@ }, "waterElemental" : { "index" : 68, - "targetType" : "NO_TARGET", + "targetType" : "NO_TARGET", "animation":{ "cast":[2] - }, + }, "sounds": { "cast": "SUMNELM" }, @@ -335,10 +337,10 @@ }, "airElemental" : { "index" : 69, - "targetType" : "NO_TARGET", + "targetType" : "NO_TARGET", "animation":{ "cast":[2] - }, + }, "sounds": { "cast": "SUMNELM" }, diff --git a/config/spells/timed.json b/config/spells/timed.json index 4b3c75f56..8366e75b4 100644 --- a/config/spells/timed.json +++ b/config/spells/timed.json @@ -310,6 +310,7 @@ "spell.curse": true }, "absoluteImmunity" : { + "SIEGE_WEAPON": true, "UNDEAD": true }, "flags" : {