mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
bugfix for crashing when toggling pause
This commit is contained in:
@@ -212,9 +212,10 @@ namespace battleship{
|
||||
}
|
||||
|
||||
void Map::Minimap::update(){
|
||||
if(!GameManager::getSingleton()->getStateManager()->getAppStateByType(AppStateType::ACTIVE_STATE)) return;
|
||||
|
||||
Button *mb = ConcreteGuiManager::getSingleton()->getButton("minimap");
|
||||
|
||||
if(!(GameManager::getSingleton()->getStateManager()->getAppStateByType(AppStateType::ACTIVE_STATE) && mb)) return;
|
||||
|
||||
updateCamFrame(mb);
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -49,8 +49,10 @@ namespace battleship{
|
||||
|
||||
void ResearchButton::update(){
|
||||
Button::update();
|
||||
|
||||
ActiveGameState *activeState = (ActiveGameState*)(GameManager::getSingleton()->getStateManager()->getAppStateByType((int)AppStateType::ACTIVE_STATE));
|
||||
|
||||
if(!activeState) return;
|
||||
|
||||
vector<int> technologies = activeState->getPlayer()->getTechnologies();
|
||||
bool hasTech = (find(technologies.begin(), technologies.end(), techId) != technologies.end());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user