1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

* saving and resuming games should work!

(loading from the main menu, saving using "save [NAME]" command)
This commit is contained in:
Michał W. Urbańczyk
2009-01-12 20:05:56 +00:00
parent 3474fdaf05
commit b895fa35cb
15 changed files with 81 additions and 29 deletions

View File

@ -1088,7 +1088,7 @@ void CGResource::onHeroVisit( const CGHeroInstance * h ) const
}
else
{
fightForRes(1,h);
fightForRes(0,h);
}
}
else
@ -1116,9 +1116,9 @@ void CGResource::collectRes( int player ) const
cb->removeObject(id);
}
void CGResource::fightForRes(ui32 wantToFight, const CGHeroInstance *h) const
void CGResource::fightForRes(ui32 refusedFight, const CGHeroInstance *h) const
{
if(wantToFight)
if(refusedFight)
return;
cb->startBattleI(h->id,army,pos,boost::bind(&CGResource::endBattle,this,_1,h));