mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-29 00:41:38 +02:00
- compile fixes
- fixed portrait initialization for random heroes
This commit is contained in:
@ -683,8 +683,9 @@ void CGameState::randomizeObject(CGObjectInstance *cur)
|
||||
CGHeroInstance *h = dynamic_cast<CGHeroInstance *>(cur);
|
||||
if(!h) {tlog2<<"Wrong random hero at "<<cur->pos<<std::endl; return;}
|
||||
cur->ID = ran.first;
|
||||
h->portrait = cur->subID = ran.second;
|
||||
cur->subID = ran.second;
|
||||
h->type = VLC->heroh->heroes[ran.second];
|
||||
h->portrait = h->type->imageIndex;
|
||||
h->randomizeArmy(h->type->heroClass->faction);
|
||||
map->heroes.push_back(h);
|
||||
return; //TODO: maybe we should do something with definfo?
|
||||
|
Reference in New Issue
Block a user