Browse Source

Fix hero serialization

nordsoft 2 years ago
parent
commit
bd32bd66b3
1 changed files with 6 additions and 1 deletions
  1. 6 1
      mapeditor/mapcontroller.cpp

+ 6 - 1
mapeditor/mapcontroller.cpp

@@ -128,10 +128,15 @@ void MapController::repairMap()
 			assert(type->heroClass);
 			//TODO: find a way to get proper type name
 			if(obj->ID == Obj::HERO)
+			{
 				nih->typeName = "hero";
+				nih->subTypeName = type->heroClass->identifier;
+			}
 			if(obj->ID == Obj::PRISON)
+			{
 				nih->typeName = "prison";
-			nih->subTypeName = type->heroClass->identifier;
+				nih->subTypeName = "prison";
+			}
 			
 			nih->type = type;
 			if(nih->name.empty())