mirror of
https://github.com/ENSL/NS.git
synced 2024-11-30 00:10:57 +00:00
Mantis 0001075:
o Fixed bug that made items on the popupmenu be disabled for aliens in classic games The bug was in AvHPlayer::UpdateTechNodes(), where the techs would not be set to researchable once flagged as unresearchable, causing them all to be unresearchable from the start of the game, and disallowing lifeforms after gestating to them. I also added a check so that the menu states won't be updated every frame for the client unless the menu is active. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@262 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
c01812d4b0
commit
877b337309
2 changed files with 36 additions and 3 deletions
|
@ -4610,8 +4610,16 @@ void AvHHud::UpdateCommonUI()
|
||||||
this->mSelectingNodeID = MESSAGE_NULL;
|
this->mSelectingNodeID = MESSAGE_NULL;
|
||||||
|
|
||||||
if(this->GetManager().GetVGUIComponentNamed(this->mPieMenuControl, thePieMenu))
|
if(this->GetManager().GetVGUIComponentNamed(this->mPieMenuControl, thePieMenu))
|
||||||
|
{
|
||||||
|
// tankefugl: Added check to ensure that it is only updated when a menu is visible
|
||||||
|
if (thePieMenu->getChildCount() > 0)
|
||||||
|
{
|
||||||
|
vgui::Panel *rootMenu = thePieMenu->getChild(0);
|
||||||
|
if (rootMenu && rootMenu->isVisible())
|
||||||
{
|
{
|
||||||
this->UpdateUpgradeCosts();
|
this->UpdateUpgradeCosts();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PieNode* theCurrentNode = NULL;
|
PieNode* theCurrentNode = NULL;
|
||||||
if(thePieMenu && thePieMenu->GetSelectedNode(theCurrentNode))
|
if(thePieMenu && thePieMenu->GetSelectedNode(theCurrentNode))
|
||||||
|
|
|
@ -9594,8 +9594,25 @@ void AvHPlayer::UpdateTechNodes()
|
||||||
theLifeform = ALIEN_LIFEFORM_FIVE;
|
theLifeform = ALIEN_LIFEFORM_FIVE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// tankefugl 0001075 : Reset techs to researchable before flagging them otherwise
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_LIFEFORM_ONE, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_LIFEFORM_TWO, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_LIFEFORM_THREE, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_LIFEFORM_FOUR, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_LIFEFORM_FIVE, true);
|
||||||
theTechNodes.SetIsResearchable(theLifeform, false);
|
theTechNodes.SetIsResearchable(theLifeform, false);
|
||||||
|
|
||||||
|
// tankefugl 0001075 : Reset techs to researchable before flagging them otherwise
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_EVOLUTION_ONE, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_EVOLUTION_TWO, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_EVOLUTION_THREE, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_EVOLUTION_SEVEN, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_EVOLUTION_EIGHT, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_EVOLUTION_NINE, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_EVOLUTION_TEN, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_EVOLUTION_ELEVEN, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_EVOLUTION_TWELVE, true);
|
||||||
|
|
||||||
// If not Gorge, set buildables to be unavailable
|
// If not Gorge, set buildables to be unavailable
|
||||||
if(theLifeform != ALIEN_LIFEFORM_TWO)
|
if(theLifeform != ALIEN_LIFEFORM_TWO)
|
||||||
{
|
{
|
||||||
|
@ -9608,6 +9625,14 @@ void AvHPlayer::UpdateTechNodes()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// tankefugl 0001075 : Reset techs to researchable before flagging them otherwise
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_BUILD_HIVE, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_BUILD_RESOURCES, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_BUILD_OFFENSE_CHAMBER, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_BUILD_DEFENSE_CHAMBER, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_BUILD_MOVEMENT_CHAMBER, true);
|
||||||
|
theTechNodes.SetIsResearchable(ALIEN_BUILD_SENSORY_CHAMBER, true);
|
||||||
|
|
||||||
// If we have the max hives, disable hives
|
// If we have the max hives, disable hives
|
||||||
|
|
||||||
bool theHasFreeUpgradeCategory = false;
|
bool theHasFreeUpgradeCategory = false;
|
||||||
|
|
Loading…
Reference in a new issue