1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

- Commanders will now be properly intialized

- Commanders show in the battle
This commit is contained in:
DjWarmonger
2012-04-28 11:41:20 +00:00
parent b0371597cd
commit 82f3bc8135
7 changed files with 40 additions and 8 deletions

View File

@@ -949,20 +949,21 @@ ui8 CStackInstance::bearerType() const
CCommanderInstance::CCommanderInstance()
{
init();
name = "Unnamed";
}
CCommanderInstance::CCommanderInstance (TCreature id)
{
init();
CStackInstance (id, 1); //init with single unit
setType(id);
name = "Commando"; //TODO - parse them
}
void CCommanderInstance::init()
void CCommanderInstance::init() //called only after CStackInstance::init was executed
{
alive = true;
experience = 0;
count = 0;
count = 1;
type = NULL;
idRand = -1;
_armyObj = NULL;