mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-22 04:31:14 +00:00
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:
parent
1181201aa8
commit
a4fcaa728b
1 changed files with 15 additions and 0 deletions
|
@ -194,6 +194,21 @@ bool AvHTechTree::GetIsMessageAvailable(const AvHMessageID inMessageID) const
|
||||||
const AvHTechNode* Subnode;
|
const AvHTechNode* Subnode;
|
||||||
const AvHTechNode* Node = GetNode(inMessageID);
|
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
|
if( Node == NULL ) //not found
|
||||||
{ returnVal = false; }
|
{ returnVal = false; }
|
||||||
else if( Node->getIsResearched() && !Node->getAllowMultiples() ) //can only research once?
|
else if( Node->getIsResearched() && !Node->getAllowMultiples() ) //can only research once?
|
||||||
|
|
Loading…
Reference in a new issue