From 51946e60a5663187b3087e455ff7332ca5db6fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Fri, 12 Feb 2010 00:53:25 +0000 Subject: [PATCH] Fixed #351. Fixed grail placement. Fixed crashbug with removing monster on RoE map. Version set to 0.75d --- client/CPlayerInterface.cpp | 5 +++-- global.h | 2 +- lib/NetPacksLib.cpp | 2 +- lib/map.cpp | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index fbbfeb21e..114377503 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -230,9 +230,10 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details) if(makingTurn && ho->tempOwner == playerID) //we are moving our hero - we may need to update assigned path { - if(details.result == TryMoveHero::TELEPORTATION/* || details.start == details.end*/) + if(details.result == TryMoveHero::TELEPORTATION || details.start == details.end) { - adventureInt->eraseCurrentPathOf(ho); + if(adventureInt->terrain.currentPath) + adventureInt->eraseCurrentPathOf(ho); return; //teleport - no fancy moving animation //TODO: smooth disappear / appear effect } diff --git a/global.h b/global.h index 97508e182..287405181 100644 --- a/global.h +++ b/global.h @@ -20,7 +20,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte) #define THC #endif -#define NAME_VER ("VCMI 0.75c") +#define NAME_VER ("VCMI 0.75d") extern std::string NAME; //full name extern std::string NAME_AFFIX; //client / server #define CONSOLE_LOGGING_LEVEL 5 diff --git a/lib/NetPacksLib.cpp b/lib/NetPacksLib.cpp index 015fbfe40..d207bf91f 100644 --- a/lib/NetPacksLib.cpp +++ b/lib/NetPacksLib.cpp @@ -286,7 +286,7 @@ DLL_EXPORT void RemoveObject::applyGs( CGameState *gs ) //TODO: add to the pool? } - else if (obj->ID==CREI_TYPE) //only fixed monsters can be a part of quest + else if (obj->ID==CREI_TYPE && gs->map->version > CMapHeader::RoE) //only fixed monsters can be a part of quest { CGCreature *cre = static_cast(obj); gs->map->monsters[cre->identifier]->pos = int3 (-1,-1,-1); //use nonexistent monster for quest :> diff --git a/lib/map.cpp b/lib/map.cpp index 46cb83493..8ecf6d0a6 100644 --- a/lib/map.cpp +++ b/lib/map.cpp @@ -529,7 +529,7 @@ void Mapa::addBlockVisTiles(CGObjectInstance * obj) } } Mapa::Mapa(std::string filename) - :grailPos(-1, -1, -1) + :grailPos(-1, -1, -1), grailRadious(0) { int mapsize = 0;