Now setup.sh pulls latest data

This commit is contained in:
mathusummut
2019-03-08 11:45:31 +01:00
parent 14811e5964
commit e17cf9588e
3 changed files with 17 additions and 32 deletions

View File

@@ -6,7 +6,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd $DIR cd $DIR
mkdir build mkdir build
cd build cd build
git clone https://github.com/Glest/glest-data.git data --branch 2.0 git clone https://github.com/Glest/glest-data.git data
cd .. cd ..
if [ `id -u`'x' == '0x' ] || [ "$1" == "--manually" ]; then if [ `id -u`'x' == '0x' ] || [ "$1" == "--manually" ]; then

View File

@@ -282,6 +282,7 @@ namespace Game {
lastAttackingUnitId = 0; lastAttackingUnitId = 0;
gameOver = false; gameOver = false;
gameWon = false; gameWon = false;
debugMode = false;
currentTimerTriggeredEventId = 0; currentTimerTriggeredEventId = 0;
currentCellTriggeredEventId = 0; currentCellTriggeredEventId = 0;
currentCellTriggeredEventUnitId = 0; currentCellTriggeredEventUnitId = 0;
@@ -359,8 +360,7 @@ namespace Game {
luaScript.registerFunction(shakeCameraOnUnit, "shakeCameraOnUnit"); luaScript.registerFunction(shakeCameraOnUnit, "shakeCameraOnUnit");
luaScript.registerFunction(createUnit, "createUnit"); luaScript.registerFunction(createUnit, "createUnit");
luaScript.registerFunction(createUnitNoSpacing, "createUnitNoSpacing"); luaScript.registerFunction(createUnitNoSpacing, "createUnitNoSpacing");
luaScript.registerFunction(setLockedUnitForFaction, luaScript.registerFunction(setLockedUnitForFaction, "setLockedUnitForFaction");
"setLockedUnitForFaction");
luaScript.registerFunction(destroyUnit, "destroyUnit"); luaScript.registerFunction(destroyUnit, "destroyUnit");
luaScript.registerFunction(giveKills, "giveKills"); luaScript.registerFunction(giveKills, "giveKills");
luaScript.registerFunction(morphToUnit, "morphToUnit"); luaScript.registerFunction(morphToUnit, "morphToUnit");
@@ -647,26 +647,16 @@ namespace Game {
luaScript.endCall(); luaScript.endCall();
} }
} catch (const game_runtime_error & ex) { } catch (const game_runtime_error & ex) {
if (debugMode) { char szErrBuf[8096] = "";
//string sErrBuf = "";
//if(ex.wantStackTrace() == true) {
char
szErrBuf[8096] = "";
//snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); //snprintf(szErrBuf,8096,"In [%s::%s %d]",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
string string sErrBuf = string(szErrBuf) + string("An LUA error was encountered\n\n\t [") +
sErrBuf =
string(szErrBuf) +
string("The game may no longer be stable!\n\n\t [") +
string(ex.what()) + string("]\n"); string(ex.what()) + string("]\n");
//}
SystemFlags::OutputDebug(SystemFlags::debugError, sErrBuf.c_str()); SystemFlags::OutputDebug(SystemFlags::debugError, sErrBuf.c_str());
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem). if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled)
enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem, sErrBuf.c_str());
SystemFlags::OutputDebug(SystemFlags::debugSystem,
sErrBuf.c_str());
thisScriptManager-> if (debugMode) {
addMessageToQueue(ScriptManagerMessage thisScriptManager->addMessageToQueue(ScriptManagerMessage
(sErrBuf.c_str(), "error", -1, -1, true)); (sErrBuf.c_str(), "error", -1, -1, true));
thisScriptManager->onMessageBoxOk(false); thisScriptManager->onMessageBoxOk(false);
} }
@@ -1736,8 +1726,7 @@ namespace Game {
} }
void void
ScriptManager::setLockedUnitForFaction(const string & unitName, ScriptManager::setLockedUnitForFaction(const string & unitName, int factionIndex, bool lock) {
int factionIndex, bool lock) {
if (SystemFlags::getSystemSettingType(SystemFlags::debugLUA).enabled) if (SystemFlags::getSystemSettingType(SystemFlags::debugLUA).enabled)
SystemFlags::OutputDebug(SystemFlags::debugLUA, SystemFlags::OutputDebug(SystemFlags::debugLUA,
"In [%s::%s Line: %d] unit [%s] factionIndex = %d\n", "In [%s::%s Line: %d] unit [%s] factionIndex = %d\n",
@@ -1749,8 +1738,7 @@ namespace Game {
ut = ut =
world->getFaction(factionIndex)->getType()-> world->getFaction(factionIndex)->getType()->
getUnitType(unitName); getUnitType(unitName);
world->getFaction(factionIndex)->setLockedUnitForFaction(ut, world->getFaction(factionIndex)->setLockedUnitForFaction(ut, lock);
lock);
} else { } else {
throw throw
game_runtime_error game_runtime_error
@@ -3739,11 +3727,9 @@ namespace Game {
luaArguments.getInt(-2)); luaArguments.getInt(-2));
try { try {
thisScriptManager->setLockedUnitForFaction(luaArguments. thisScriptManager->setLockedUnitForFaction(luaArguments.getString(-3),
getString(-3),
luaArguments.getInt(-2), luaArguments.getInt(-2),
(luaArguments. (luaArguments.getInt(-1) ==
getInt(-1) ==
0 ? false : true)); 0 ? false : true));
} catch (const game_runtime_error & ex) { } catch (const game_runtime_error & ex) {
error(luaHandle, &ex, __FILE__, __FUNCTION__, __LINE__); error(luaHandle, &ex, __FILE__, __FUNCTION__, __LINE__);

View File

@@ -374,8 +374,7 @@ namespace Game {
public: public:
ScriptManager(); ScriptManager();
~ ~ScriptManager();
ScriptManager();
void void
init(World * world, GameCamera * gameCamera, const XmlNode * rootNode); init(World * world, GameCamera * gameCamera, const XmlNode * rootNode);