- more save / loadgame bugfixes

This commit is contained in:
Mark Vejvoda
2012-04-02 15:17:31 +00:00
parent 5b5d753341
commit d16396db0a
3 changed files with 6 additions and 7 deletions

View File

@@ -590,7 +590,7 @@ void Program::setState(ProgramState *programStateNew, bool cleanupOldState) {
sprintf(szBuf,"In [%s::%s Line: %d]\nError [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,e.what());
SystemFlags::OutputDebug(SystemFlags::debugError,szBuf);
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,szBuf);
abort();
//abort();
messageBoxIsSystemError = true;

View File

@@ -54,9 +54,8 @@ Checksum TechTree::loadTech(const string &techName,
//printf(">>> path=%s\n",path.c_str());
load(path, factions, checksum, &techtreeChecksum, loadedFileList);
}
else
{
printf(">>> schoen\n");
else {
printf(">>> techtree [%s] path not found.\n",techName.c_str());
}
return techtreeChecksum;
}
@@ -332,7 +331,7 @@ const ResourceType *TechTree::getFirstTechResourceType() const{
return getResourceType(i);
}
throw runtime_error("This tech tree has not tech resources, one at least is required");
throw runtime_error("This tech tree has no resources defined, at least one is required");
}
const ResourceType *TechTree::getResourceType(const string &name) const{

View File

@@ -1780,7 +1780,7 @@ void World::exploreCells(const Vec2i &newPos, int sightRange, int teamIndex) {
bool World::showWorldForPlayer(int factionIndex) const {
bool ret = false;
if(factionIndex == thisFactionIndex) {
if(factionIndex == thisFactionIndex && game != NULL) {
// Player is an Observer
if(thisTeamIndex == GameConstants::maxPlayers -1 + fpt_Observer) {
ret = true;