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:
@ -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);
|
||||
|
Reference in New Issue
Block a user