Fix dialog-spam about invalid special node types when loading legacy scenarios

This commit is contained in:
2015-07-03 17:16:39 -04:00
parent fecd268d5a
commit 558b1b8f62

View File

@@ -437,8 +437,13 @@ void cSpecial::append(legacy::special_node_type& old){
case 197:
type = eSpecType::TOWN_SET_ATTITUDE;
break;
case -1:
break;
default:
giveError("Unrecognized node type found: " + std::to_string(old.type));
if(old.type >= 0 && old.type < 255)
giveError("Unrecognized node type found: " + std::to_string(old.type));
else std::cout << "Unrecognized node type found: " + std::to_string(old.type)
<< "\n\tNote: This could indicate corruption in the scenario, but more likely is just a result of garbage data in unused nodes or in the memory structures they were read into. The unrecognized node type has been replaced with invalid type -1.";
}
}