mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix freshly recruited hero phantom in castle entrance
This commit is contained in:
parent
05dff6b8e2
commit
7ac4e6ed18
@ -494,13 +494,19 @@ void HeroRecruited::applyCl( CClient *cl )
|
||||
logNetwork->errorStream() << "Something wrong with hero recruited!";
|
||||
}
|
||||
|
||||
CGI->mh->printObject(h);
|
||||
|
||||
if(vstd::contains(cl->playerint,h->tempOwner))
|
||||
bool needsPrinting = true;
|
||||
if(vstd::contains(cl->playerint, h->tempOwner))
|
||||
{
|
||||
cl->playerint[h->tempOwner]->heroCreated(h);
|
||||
if(const CGTownInstance *t = GS(cl)->getTown(tid))
|
||||
{
|
||||
cl->playerint[h->tempOwner]->heroInGarrisonChange(t);
|
||||
needsPrinting = false;
|
||||
}
|
||||
}
|
||||
if (needsPrinting)
|
||||
{
|
||||
CGI->mh->printObject(h);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -386,7 +386,7 @@ public:
|
||||
|
||||
void getTerrainDescr(const int3 &pos, std::string & out, bool terName); //if tername == false => empty string when tile is clear
|
||||
CGObjectInstance * createObject(int id, int subid, int3 pos, int owner=254); //creates a new object with a certain id and subid
|
||||
bool printObject(const CGObjectInstance * obj, bool fadein = false); //puts appropriate things to ttiles, so obj will be visible on map
|
||||
bool printObject(const CGObjectInstance * obj, bool fadein = false); //puts appropriate things to tiles, so obj will be visible on map
|
||||
bool hideObject(const CGObjectInstance * obj, bool fadeout = false); //removes appropriate things from ttiles, so obj will be no longer visible on map (but still will exist)
|
||||
bool removeObject(CGObjectInstance * obj, bool fadeout = false); //removes object from each place in VCMI (I hope)
|
||||
void init();
|
||||
|
Loading…
Reference in New Issue
Block a user