Explorar o código

Version set to 0.80. (real, fixed release)
Hopefully fixed #412, #413, #414

Michał W. Urbańczyk %!s(int64=15) %!d(string=hai) anos
pai
achega
eec43d3c58
Modificáronse 6 ficheiros con 9 adicións e 5 borrados
  1. 1 1
      client/CAdvmapInterface.cpp
  2. 2 1
      client/CPlayerInterface.cpp
  3. 1 1
      client/Graphics.cpp
  4. 1 1
      global.h
  5. 3 0
      mapHandler.cpp
  6. 1 1
      server/CGameHandler.cpp

+ 1 - 1
client/CAdvmapInterface.cpp

@@ -1835,7 +1835,7 @@ void CAdvMapInt::keyPressed(const SDL_KeyboardEvent & key)
 	case SDLK_d: 
 		{
 			const CGHeroInstance *h = dynamic_cast<const CGHeroInstance*>(selection);
-			if(h && isActive())
+			if(h && isActive() && key.state == SDL_PRESSED)
 				LOCPLINT->tryDiggging(h);
 			return;
 		}

+ 2 - 1
client/CPlayerInterface.cpp

@@ -1947,8 +1947,9 @@ void CPlayerInterface::tryDiggging(const CGHeroInstance *h)
 		showInfoDialog(CGI->generaltexth->allTexts[60]); //Try looking on land!
 	else
 	{
+		const TerrainTile *t = cb->getTileInfo(h->getPosition());
 		CGI->mh->getTerrainDescr(h->getPosition(false), hlp, false);
-		if(hlp.length())
+		if(hlp.length() || t->blockingObjects.size() > 1)
 			showInfoDialog(CGI->generaltexth->allTexts[97]); //Try searching on clear ground.
 		else
 			cb->dig(h);

+ 1 - 1
client/Graphics.cpp

@@ -42,7 +42,7 @@ Graphics * graphics = NULL;
 
 SDL_Surface * Graphics::drawHeroInfoWin(const InfoAboutHero &curh)
 {
-	char buf[10];
+	char buf[15];
 	blueToPlayersAdv(hInfo,curh.owner);
 	SDL_Surface * ret = SDL_DisplayFormat(hInfo);
 	SDL_SetColorKey(ret,SDL_SRCCOLORKEY,SDL_MapRGB(ret->format,0,255,255));

+ 1 - 1
global.h

@@ -21,7 +21,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
 #define THC
 #endif
 
-#define NAME_VER ("VCMI 0.8")
+#define NAME_VER ("VCMI 0.80")
 extern std::string NAME; //full name
 extern std::string NAME_AFFIX; //client / server
 #define CONSOLE_LOGGING_LEVEL 5

+ 3 - 0
mapHandler.cpp

@@ -1085,6 +1085,9 @@ SDL_Surface * CMapHandler::getVisBitmap(int x, int y, const std::vector< std::ve
 
 bool CMapHandler::printObject(const CGObjectInstance *obj)
 {
+	if(!obj->defInfo->handler)
+		processDef(obj->defInfo);
+
 	const SDL_Surface *bitmap = obj->defInfo->handler->ourImages[0].bitmap;
 	int tilesW = bitmap->w/32,
 		tilesH = bitmap->h/32;

+ 1 - 1
server/CGameHandler.cpp

@@ -4030,7 +4030,7 @@ bool CGameHandler::dig( const CGHeroInstance *h )
 {
 	for (std::vector<CGObjectInstance*>::const_iterator i = gs->map->objects.begin(); i != gs->map->objects.end(); i++) //unflag objs
 	{
-		if((*i)->ID == 124  &&  (*i)->pos == h->getPosition())
+		if(*i && (*i)->ID == 124  &&  (*i)->pos == h->getPosition())
 		{
 			complain("Cannot dig - there is already a hole under the hero!");
 			return false;