mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Fix for starting hero being passable
This commit is contained in:
parent
ef61456681
commit
cef25cca03
@ -150,6 +150,11 @@ bool CGHeroInstance::isCoastVisitable() const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CGHeroInstance::isBlockedVisitable() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
BattleField CGHeroInstance::getBattlefield() const
|
||||
{
|
||||
return BattleField::NONE;
|
||||
@ -281,6 +286,7 @@ CGHeroInstance::CGHeroInstance():
|
||||
ID = Obj::HERO;
|
||||
secSkills.emplace_back(SecondarySkill::NONE, -1);
|
||||
blockVisit = true;
|
||||
removable = true;
|
||||
}
|
||||
|
||||
PlayerColor CGHeroInstance::getOwner() const
|
||||
@ -301,6 +307,7 @@ void CGHeroInstance::setHeroType(HeroTypeID heroType)
|
||||
|
||||
void CGHeroInstance::initHero(CRandomGenerator & rand, const HeroTypeID & SUBID)
|
||||
{
|
||||
blockVisit = true;
|
||||
subID = SUBID.getNum();
|
||||
initHero(rand);
|
||||
}
|
||||
|
@ -301,6 +301,7 @@ public:
|
||||
void updateFrom(const JsonNode & data) override;
|
||||
|
||||
bool isCoastVisitable() const override;
|
||||
bool isBlockedVisitable() const override;
|
||||
BattleField getBattlefield() const override;
|
||||
protected:
|
||||
void setPropertyDer(ObjProperty what, ObjPropertyID identifier) override;//synchr
|
||||
|
Loading…
Reference in New Issue
Block a user