1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Version set to 0.82.

Updated changelog.
Fixed crashes on losing.
This commit is contained in:
Michał W. Urbańczyk
2010-08-01 14:46:19 +00:00
parent b441143a73
commit 4140711b6d
5 changed files with 18 additions and 3 deletions

View File

@@ -1937,7 +1937,9 @@ void CGameHandler::setOwner(int objid, ui8 owner)
}
const CGObjectInstance * obj = getObj(objid);
if ((obj->ID == 17 || obj->ID == 20 ) && gs->getPlayer(owner)->dwellings.size()==1 )//first dwelling captured
const PlayerState * p = gs->getPlayer(owner);
if((obj->ID == 17 || obj->ID == 20 ) && p && p->dwellings.size()==1)//first dwelling captured
BOOST_FOREACH(const CGTownInstance *t, gs->getPlayer(owner)->towns)
if (t->subID == 5 && vstd::contains(t->builtBuildings, 22))
setPortalDwelling(t);//set initial creatures for all portals of summoning