2019-10-19 14:29 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000198Spring engineGeneralpublic2006-06-12 17:24
Reportercolorblind 
Assigned Tojcnossen 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000198: [patch] Tooltip for enemy radar dots
DescriptionIt turns out that I've introduced complete tooltip descriptions for enemy units that show up as radar dots in patching Mantis 0000185.
This patchs resolves it, showing only "Enemy unit" in the tooltip for radar dots.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • patch file icon radardotsTooltip.patch (2,453 bytes) 2006-06-12 16:12 -
    Index: Game/UI/MouseHandler.cpp
    ===================================================================
    --- Game/UI/MouseHandler.cpp	(revision 1460)
    +++ rts/Game/UI/MouseHandler.cpp	(working copy)
    @@ -13,6 +13,7 @@
     #include "Game/SelectedUnits.h"
     #include "Sim/Units/Unit.h"
     #include "Sim/Misc/Feature.h"
    +#include "Sim/Misc/LosHandler.h"
     #include "Game/Team.h"
     #include "InfoConsole.h"
     #include "MiniMap.h"
    @@ -553,21 +554,25 @@
     		feature=0;
     
     	if(unit){
    -		// show the player name instead of unit name if it has FBI tag showPlayerName
    -		if(unit->unitDef->showPlayerName)
    -		{
    -			s=gs->players[gs->Team(unit->team)->leader]->playerName.c_str();
    -		} else {
    -			s=unit->tooltip;
    -		}
    -		// don't show the unit health and other info if it has FBI tag hideDamage and isn't on our team
    -		if(!(unit->unitDef->hideDamage && unit->team != gu->myTeam))
    -		{
    -			char tmp[500];
    -			sprintf(tmp,"\nHealth %.0f/%.0f \nExperience %.2f Cost %.0f Range %.0f \n\xff\xd3\xdb\xffMetal: \xff\x50\xff\x50%.1f\xff\x90\x90\x90/\xff\xff\x50\x01-%.1f\xff\xd3\xdb\xff Energy: \xff\x50\xff\x50%.1f\xff\x90\x90\x90/\xff\xff\x50\x01-%.1f",
    -				unit->health,unit->maxHealth,unit->experience,unit->metalCost+unit->energyCost/60,unit->maxRange, unit->metalMake, unit->metalUse, unit->energyMake, unit->energyUse);
    -			s+=tmp;
    -		}
    +			// don't show the tooltip if it's a radar dot
    +			if(!gu->spectating && gs->AllyTeam(unit->team) != gu->myAllyTeam && !loshandler->InLos(unit,gu->myAllyTeam)){
    +				return "Enemy unit";
    +			}
    +			// show the player name instead of unit name if it has FBI tag showPlayerName
    +			if(unit->unitDef->showPlayerName)
    +			{
    +				s=gs->players[gs->Team(unit->team)->leader]->playerName.c_str();
    +			} else {
    +				s=unit->tooltip;
    +			}
    +			// don't show the unit health and other info if it has FBI tag hideDamage and isn't on our ally team
    +			if(!(!gu->spectating && unit->unitDef->hideDamage && gs->AllyTeam(unit->team) != gu->myAllyTeam))
    +			{
    +				char tmp[500];
    +				sprintf(tmp,"\nHealth %.0f/%.0f \nExperience %.2f Cost %.0f Range %.0f \n\xff\xd3\xdb\xffMetal: \xff\x50\xff\x50%.1f\xff\x90\x90\x90/\xff\xff\x50\x01-%.1f\xff\xd3\xdb\xff Energy: \xff\x50\xff\x50%.1f\xff\x90\x90\x90/\xff\xff\x50\x01-%.1f",
    +					unit->health,unit->maxHealth,unit->experience,unit->metalCost+unit->energyCost/60,unit->maxRange, unit->metalMake, unit->metalUse, unit->energyMake, unit->energyUse);
    +				s+=tmp;
    +			}
     		return s;
     	}
     	if(feature){
     
    
    patch file icon radardotsTooltip.patch (2,453 bytes) 2006-06-12 16:12 +

-Relationships
+Relationships

-Notes

~0000222

jcnossen (reporter)

patch applied now,
thanks
+Notes

-Issue History
Date Modified Username Field Change
2006-06-12 16:12 colorblind New Issue
2006-06-12 16:12 colorblind File Added: radardotsTooltip.patch
2006-06-12 17:24 jcnossen Status new => resolved
2006-06-12 17:24 jcnossen Resolution open => fixed
2006-06-12 17:24 jcnossen Assigned To => jcnossen
2006-06-12 17:24 jcnossen Note Added: 0000222
+Issue History