mirror of
https://github.com/glest/glest-source.git
synced 2025-09-30 09:29:25 +02:00
- more save / loadgame bugfixes
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
@@ -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{
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user