From f97628e67f2130c70ba7f23281142874933bdd44 Mon Sep 17 00:00:00 2001 From: mateuszb Date: Fri, 19 Sep 2008 11:19:14 +0000 Subject: [PATCH] a few minor fixes --- CAdvmapInterface.cpp | 32 ++++++++++++++++++++++++++++++++ hch/CDefObjInfoHandler.cpp | 4 ---- server/CGameHandler.cpp | 2 +- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/CAdvmapInterface.cpp b/CAdvmapInterface.cpp index db40dbef8..e9b4f4e29 100644 --- a/CAdvmapInterface.cpp +++ b/CAdvmapInterface.cpp @@ -485,6 +485,14 @@ void CTerrainRect::showPath() } else if (cv[i+1].coord.x == cv[i].coord.x && cv[i+1].coord.y == cv[i].coord.y-1) { + if(cv[i-1].coord.x == cv[i].coord.x+1 && cv[i-1].coord.y == cv[i].coord.y-1) + { + pn = 2; + } + if(cv[i-1].coord.x == cv[i].coord.x+1 && cv[i-1].coord.y == cv[i].coord.y) + { + pn = 3; + } if(cv[i-1].coord.x == cv[i].coord.x+1 && cv[i-1].coord.y == cv[i].coord.y+1) { pn = 4; @@ -497,6 +505,14 @@ void CTerrainRect::showPath() { pn = 22; } + if(cv[i-1].coord.x == cv[i].coord.x-1 && cv[i-1].coord.y == cv[i].coord.y) + { + pn = 23; + } + if(cv[i-1].coord.x == cv[i].coord.x-1 && cv[i-1].coord.y == cv[i].coord.y-1) + { + pn = 24; + } } else if (cv[i+1].coord.x == cv[i].coord.x+1 && cv[i+1].coord.y == cv[i].coord.y-1) { @@ -561,6 +577,14 @@ void CTerrainRect::showPath() } else if (cv[i+1].coord.x == cv[i].coord.x && cv[i+1].coord.y == cv[i].coord.y+1) { + if(cv[i-1].coord.x == cv[i].coord.x-1 && cv[i-1].coord.y == cv[i].coord.y+1) + { + pn = 6; + } + if(cv[i-1].coord.x == cv[i].coord.x-1 && cv[i-1].coord.y == cv[i].coord.y) + { + pn = 7; + } if(cv[i-1].coord.x == cv[i].coord.x-1 && cv[i-1].coord.y == cv[i].coord.y-1) { pn = 8; @@ -573,6 +597,14 @@ void CTerrainRect::showPath() { pn = 18; } + else if(cv[i-1].coord.x == cv[i].coord.x+1 && cv[i-1].coord.y == cv[i].coord.y) + { + pn = 19; + } + else if(cv[i-1].coord.x == cv[i].coord.x+1 && cv[i-1].coord.y == cv[i].coord.y+1) + { + pn = 20; + } } else if (cv[i+1].coord.x == cv[i].coord.x-1 && cv[i+1].coord.y == cv[i].coord.y+1) { diff --git a/hch/CDefObjInfoHandler.cpp b/hch/CDefObjInfoHandler.cpp index 172168750..62e44e73a 100644 --- a/hch/CDefObjInfoHandler.cpp +++ b/hch/CDefObjInfoHandler.cpp @@ -27,7 +27,6 @@ void CDefObjInfoHandler::load() std::istringstream inp(bitmaph->getTextFile("ZOBJCTS.TXT")); int objNumber; inp>>objNumber; - std::set ids; for(int hh=0; hh>nobj->subid; inp>>nobj->type; if(nobj->type == 2 || nobj->type == 3 || nobj->type == 4 || nobj->type == 5 || nobj->id == 111) //creature, hero, artifact, resource or whripool - { nobj->visitDir = 0xff; - ids.insert(nobj->id); - } else nobj->visitDir = (8|16|32|64|128); //disabled visiting from the top inp>>nobj->printPriority; diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 7f0204f38..c4d3ec5b7 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -1273,7 +1273,7 @@ void CGameHandler::setupBattle( BattleInfo * curB, int3 tile, CCreatureSet &army positions.open("config" PATHSEPARATOR "battleStartpos.txt", std::ios_base::in|std::ios_base::binary); if(!positions.is_open()) { - tlog0<<"Unable to open battleStartpos.txt!"<>dump; positions>>dump;