- 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()); sprintf(szBuf,"In [%s::%s Line: %d]\nError [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,e.what());
SystemFlags::OutputDebug(SystemFlags::debugError,szBuf); SystemFlags::OutputDebug(SystemFlags::debugError,szBuf);
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,szBuf); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,szBuf);
abort(); //abort();
messageBoxIsSystemError = true; messageBoxIsSystemError = true;

View File

@@ -50,13 +50,12 @@ Checksum TechTree::loadTech(const string &techName,
name = ""; name = "";
Checksum techtreeChecksum; Checksum techtreeChecksum;
string path=findPath(techName); string path=findPath(techName);
if(path!=""){ if(path!="") {
//printf(">>> path=%s\n",path.c_str()); //printf(">>> path=%s\n",path.c_str());
load(path, factions, checksum, &techtreeChecksum, loadedFileList); load(path, factions, checksum, &techtreeChecksum, loadedFileList);
} }
else else {
{ printf(">>> techtree [%s] path not found.\n",techName.c_str());
printf(">>> schoen\n");
} }
return techtreeChecksum; return techtreeChecksum;
} }
@@ -332,7 +331,7 @@ const ResourceType *TechTree::getFirstTechResourceType() const{
return getResourceType(i); 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{ 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 World::showWorldForPlayer(int factionIndex) const {
bool ret = false; bool ret = false;
if(factionIndex == thisFactionIndex) { if(factionIndex == thisFactionIndex && game != NULL) {
// Player is an Observer // Player is an Observer
if(thisTeamIndex == GameConstants::maxPlayers -1 + fpt_Observer) { if(thisTeamIndex == GameConstants::maxPlayers -1 + fpt_Observer) {
ret = true; ret = true;