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

CGHeroInstance* can be serialized over network even when hero has been defeated. Strongly typed hero type ID introduced.

Should fix #1260.
This commit is contained in:
Michał W. Urbańczyk
2013-05-18 22:30:48 +00:00
parent f95e6c233b
commit be7c2bd07f
19 changed files with 113 additions and 75 deletions

View File

@@ -371,11 +371,11 @@ void CMapHandler::init()
offsetX = (mapW - (2*frameW+1)*32)/2;
offsetY = (mapH - (2*frameH+1)*32)/2;
for(int i=0;i<map->heroes.size();i++)
for(int i=0;i<map->heroesOnMap.size();i++)
{
if( !graphics->getDef(map->heroes[i]) )
if( !graphics->getDef(map->heroesOnMap[i]) )
{
initHeroDef(map->heroes[i]);
initHeroDef(map->heroesOnMap[i]);
}
}