From a4fcaa728bba8f1c0528134415cb160840ed57d2 Mon Sep 17 00:00:00 2001 From: tankefugl Date: Tue, 5 Jul 2005 01:21:43 +0000 Subject: [PATCH] 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 --- main/source/mod/AvHTechTree.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main/source/mod/AvHTechTree.cpp b/main/source/mod/AvHTechTree.cpp index 9d90dc22..ae8cb770 100644 --- a/main/source/mod/AvHTechTree.cpp +++ b/main/source/mod/AvHTechTree.cpp @@ -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?