1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

* improved slider ( #58 )

* fixed problems with horde buildings (won't block original dwellings)
* giving primary skill when hero get level (but there is still no dialog)
* if an upgraded creature is available it'll be shown as the first in a recruitment window
* creature levels not messed in Fortress
* war machines are added to the hero's inventory, not to the garrison
* support for H3-style PCX graphics in Data/ (not tested)
* started doing support for ZSoft PCX graphics in Data/
* VCMI won't crash when is unable to initialize audio system
* fixed displaying wrong town defs
* minor fixes and improvements
This commit is contained in:
Michał W. Urbańczyk
2008-05-03 15:30:11 +00:00
parent 33e3bf4849
commit 2f2169b71f
14 changed files with 218 additions and 124 deletions

View File

@ -209,7 +209,24 @@ void CMapHandler::randomizeObject(CGObjectInstance *cur)
{
std::pair<int,int> ran = pickObject(cur);
if(ran.first<0 || ran.second<0) //this is not a random object, or we couldn't find anything
{
if(cur->ID==98) //town - set def
{
CGTownInstance *t = dynamic_cast<CGTownInstance*>(cur);
if(t->hasCapitol())
t->defInfo = capitols[t->subID];
else if(t->hasFort())
t->defInfo = CGI->dobjinfo->castles[t->subID];
else
t->defInfo = villages[t->subID];
if(!t->defInfo->handler)
{
t->defInfo->handler = CGI->spriteh->giveDef(t->defInfo->name);
alphaTransformDef(t->defInfo);
}
}
return;
}
else if(ran.first==34)//special code for hero
{
CGHeroInstance *h = dynamic_cast<CGHeroInstance *>(cur);