@@ -1102,7 +1102,7 @@ InGameUI::InGameUI()
11021102
11031103 m_tooltipsDisabledUntil = 0 ;
11041104
1105- m_showDesignatorDecals = FALSE ;
1105+ // m_showDesignatorDecals = FALSE;
11061106 m_designatorCommand = NULL ;
11071107
11081108 // init hint lists
@@ -3251,15 +3251,15 @@ void InGameUI::setGUICommand( const CommandButton *command )
32513251
32523252 // Target designator checks
32533253 if (m_designatorCommand && m_designatorCommand != m_pendingGUICommand) {
3254- hideDesignatorDecals ();
3254+ // hideDesignatorDecals();
32553255 m_designatorCommand = NULL ;
32563256 }
32573257
32583258 if (command && BitIsSet (command->getOptions (), COMMAND_OPTION_NEED_TARGET )) {
32593259 const SpecialPowerTemplate* sp = command->getSpecialPowerTemplate ();
32603260 if (sp != nullptr && sp->isNeedsTargetDesignator ()) {
3261- m_showDesignatorDecals = TRUE ;
3262- showDesignatorDecals (command->getSpecialPowerTemplate ());
3261+ /* m_showDesignatorDecals = TRUE;
3262+ showDesignatorDecals(command->getSpecialPowerTemplate());*/
32633263 m_designatorCommand = command;
32643264 }
32653265 }
@@ -6495,47 +6495,57 @@ void InGameUI::drawPlayerInfoList()
64956495
64966496
64976497// -------------
6498- void InGameUI::showDesignatorDecals (const SpecialPowerTemplate* powerTemplate) {
6499-
6500- static NameKeyType key_SpecialPowerDesignatorUpdate = NAMEKEY (" SpecialPowerDesignatorUpdate" );
6501-
6502- PartitionFilterSamePlayer filterPlayer (ThePlayerList->getLocalPlayer ());
6503- PartitionFilterAlive filterAlive;
6504- PartitionFilterAcceptByKindOf filterKindOf (MAKE_KINDOF_MASK (KINDOF_TARGET_DESIGNATOR ), KINDOFMASK_NONE );
6505- PartitionFilter* filters[] = { &filterPlayer, &filterAlive, &filterKindOf, NULL };
6506- // scan objects on entire map
6507- ObjectIterator* iter = ThePartitionManager->iterateAllObjects (filters);
6508- Object* obj;
6509- MemoryPoolObjectHolder hold (iter);
6510- for (obj = iter->first (); obj; obj = iter->next ()) {
6511-
6512- SpecialPowerDesignatorUpdate* update = (SpecialPowerDesignatorUpdate*)obj->findUpdateModule (key_SpecialPowerDesignatorUpdate);
6513- if (update) {
6514- if (update->isValidDesignatorForSpecialPower (powerTemplate)) {
6515- update->setActive (true );
6516- }
6517- }
6518- }
6519- }
6520-
6521- void InGameUI::hideDesignatorDecals () { // const SpecialPowerTemplate *powerTemplate) {
6522- // ThePlayerList->getLocalPlayer()->iterateObjects( hideDesignatorDecal, &powerTemplate );
6523-
6524- static NameKeyType key_SpecialPowerDesignatorUpdate = NAMEKEY (" SpecialPowerDesignatorUpdate" );
6525-
6526- PartitionFilterSamePlayer filterPlayer (ThePlayerList->getLocalPlayer ());
6527- PartitionFilterAlive filterAlive;
6528- PartitionFilterAcceptByKindOf filterKindOf (MAKE_KINDOF_MASK (KINDOF_TARGET_DESIGNATOR ), KINDOFMASK_NONE );
6529- PartitionFilter* filters[] = { &filterPlayer, &filterAlive, &filterKindOf, NULL };
6530- // scan objects on entire map
6531- ObjectIterator* iter = ThePartitionManager->iterateAllObjects (filters);
6532- Object* obj;
6533- MemoryPoolObjectHolder hold (iter);
6534- for (obj = iter->first (); obj; obj = iter->next ()) {
6498+ // -------------
6499+ const SpecialPowerTemplate* InGameUI::getTargetDesignatorPower ()
6500+ {
6501+ if (m_designatorCommand != nullptr )
6502+ return m_designatorCommand->getSpecialPowerTemplate ();
65356503
6536- SpecialPowerDesignatorUpdate* update = (SpecialPowerDesignatorUpdate*)obj->findUpdateModule (key_SpecialPowerDesignatorUpdate);
6537- if (update) {
6538- update->setActive (false );
6539- }
6540- }
6504+ return nullptr ;
65416505}
6506+ // -------------
6507+ // -------------
6508+ // void InGameUI::showDesignatorDecals(const SpecialPowerTemplate* powerTemplate) {
6509+ //
6510+ // static NameKeyType key_SpecialPowerDesignatorUpdate = NAMEKEY("SpecialPowerDesignatorUpdate");
6511+ //
6512+ // PartitionFilterSamePlayer filterPlayer(ThePlayerList->getLocalPlayer());
6513+ // PartitionFilterAlive filterAlive;
6514+ // PartitionFilterAcceptByKindOf filterKindOf(MAKE_KINDOF_MASK(KINDOF_TARGET_DESIGNATOR), KINDOFMASK_NONE);
6515+ // PartitionFilter* filters[] = { &filterPlayer, &filterAlive, &filterKindOf, NULL };
6516+ // // scan objects on entire map
6517+ // ObjectIterator* iter = ThePartitionManager->iterateAllObjects(filters);
6518+ // Object* obj;
6519+ // MemoryPoolObjectHolder hold(iter);
6520+ // for (obj = iter->first(); obj; obj = iter->next()) {
6521+ //
6522+ // SpecialPowerDesignatorUpdate* update = (SpecialPowerDesignatorUpdate*)obj->findUpdateModule(key_SpecialPowerDesignatorUpdate);
6523+ // if (update) {
6524+ // if (update->isValidDesignatorForSpecialPower(powerTemplate)) {
6525+ // update->setActive(true);
6526+ // }
6527+ // }
6528+ // }
6529+ // }
6530+ //
6531+ // void InGameUI::hideDesignatorDecals() { //const SpecialPowerTemplate *powerTemplate) {
6532+ // //ThePlayerList->getLocalPlayer()->iterateObjects( hideDesignatorDecal, &powerTemplate );
6533+ //
6534+ // static NameKeyType key_SpecialPowerDesignatorUpdate = NAMEKEY("SpecialPowerDesignatorUpdate");
6535+ //
6536+ // PartitionFilterSamePlayer filterPlayer(ThePlayerList->getLocalPlayer());
6537+ // PartitionFilterAlive filterAlive;
6538+ // PartitionFilterAcceptByKindOf filterKindOf(MAKE_KINDOF_MASK(KINDOF_TARGET_DESIGNATOR), KINDOFMASK_NONE);
6539+ // PartitionFilter* filters[] = { &filterPlayer, &filterAlive, &filterKindOf, NULL };
6540+ // // scan objects on entire map
6541+ // ObjectIterator* iter = ThePartitionManager->iterateAllObjects(filters);
6542+ // Object* obj;
6543+ // MemoryPoolObjectHolder hold(iter);
6544+ // for (obj = iter->first(); obj; obj = iter->next()) {
6545+ //
6546+ // SpecialPowerDesignatorUpdate* update = (SpecialPowerDesignatorUpdate*)obj->findUpdateModule(key_SpecialPowerDesignatorUpdate);
6547+ // if (update) {
6548+ // update->setActive(false);
6549+ // }
6550+ // }
6551+ // }
0 commit comments