mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
updating CPU player AI only if debugging is on
This commit is contained in:
@@ -108,19 +108,16 @@ namespace battleship{
|
|||||||
guiManager->parseLuaScript("gamePaused.lua");
|
guiManager->parseLuaScript("gamePaused.lua");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sol::state_view SOL_LUA_VIEW = generateView();
|
|
||||||
|
|
||||||
for(string f : configData::scripts)
|
|
||||||
SOL_LUA_VIEW.script_file(gm->getPath() + f);
|
|
||||||
|
|
||||||
initLuaPlayers();
|
|
||||||
guiManager->readLuaScreenScript("inGame.lua", activeState->getGuiButtons());
|
guiManager->readLuaScreenScript("inGame.lua", activeState->getGuiButtons());
|
||||||
|
|
||||||
string gop = SOL_LUA_VIEW["gameObjPrefix"], vfxp = SOL_LUA_VIEW["vfxPrefix"];
|
|
||||||
AssetManager::getSingleton()->load(gm->getPath() + gop, true);
|
|
||||||
AssetManager::getSingleton()->load(gm->getPath() + vfxp, true);
|
|
||||||
|
|
||||||
if(debug){
|
if(debug){
|
||||||
|
sol::state_view SOL_LUA_VIEW = generateView();
|
||||||
|
|
||||||
|
for(string f : configData::scripts)
|
||||||
|
SOL_LUA_VIEW.script_file(gm->getPath() + f);
|
||||||
|
|
||||||
|
initLuaPlayers();
|
||||||
|
|
||||||
vector<GameObject*> gameObjs;
|
vector<GameObject*> gameObjs;
|
||||||
|
|
||||||
for(Player *pl : Game::getSingleton()->getPlayers()){
|
for(Player *pl : Game::getSingleton()->getPlayers()){
|
||||||
@@ -134,6 +131,10 @@ namespace battleship{
|
|||||||
for(ResourceDeposit *dep : civilianPlayer->getResourceDeposits())
|
for(ResourceDeposit *dep : civilianPlayer->getResourceDeposits())
|
||||||
gameObjs.push_back((GameObject*)dep);
|
gameObjs.push_back((GameObject*)dep);
|
||||||
|
|
||||||
|
string gop = SOL_LUA_VIEW["gameObjPrefix"], vfxp = SOL_LUA_VIEW["vfxPrefix"];
|
||||||
|
AssetManager::getSingleton()->load(gm->getPath() + gop, true);
|
||||||
|
AssetManager::getSingleton()->load(gm->getPath() + vfxp, true);
|
||||||
|
|
||||||
for(GameObject *obj : gameObjs)
|
for(GameObject *obj : gameObjs)
|
||||||
obj->reinit();
|
obj->reinit();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user