Mantis 73:

o Fixed bug where the commander UI buttons would not function (select all, go to requests, etc)

AvHTechTree::GetIsMessageAvailable would not return true because no tech tree nodes would be found for these messages. I inserted a check to bypass the node checking for these messages. It's a hack, but since they're already hacked into the TechNode code, it should do for now.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@235 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-07-05 01:21:43 +00:00
parent 1181201aa8
commit a4fcaa728b

View file

@ -194,6 +194,21 @@ bool AvHTechTree::GetIsMessageAvailable(const AvHMessageID inMessageID) const
const AvHTechNode* Subnode;
const AvHTechNode* Node = GetNode(inMessageID);
// tankefugl: 73
// HACK to bypass the node checks when issuing one of the CC UI impulses
// Could probably be reworked prettier by assigning nodes to each of these
// messages, but this will have to do for now
if (inMessageID == COMMANDER_SELECTALL ||
inMessageID == COMMANDER_NEXTAMMO ||
inMessageID == COMMANDER_NEXTHEALTH ||
inMessageID == COMMANDER_NEXTIDLE ||
inMessageID == GROUP_SELECT_1 ||
inMessageID == GROUP_SELECT_2 ||
inMessageID == GROUP_SELECT_3 ||
inMessageID == GROUP_SELECT_4 ||
inMessageID == GROUP_SELECT_5)
return true;
// :tankefugl
if( Node == NULL ) //not found
{ returnVal = false; }
else if( Node->getIsResearched() && !Node->getAllowMultiples() ) //can only research once?