mirror of
https://github.com/ENSL/NS.git
synced 2025-03-25 19:51:13 +00:00
Parasite indicator on player names
-Added indicator if looking at a parasited player -Changed commander parasited player indicator and color to always show, regardless if selected
This commit is contained in:
parent
a8f20956c4
commit
0e90cd5414
2 changed files with 22 additions and 12 deletions
main/source/mod
|
@ -5408,6 +5408,15 @@ bool AvHHud::GetEntityInfoString(int inEntityID, string& outEntityInfoString, bo
|
|||
outEntityInfoString += string(theStatusCStr);
|
||||
}
|
||||
|
||||
// Do this client side so the extra chars don't need to be transmitted. Welder handled server side in UpdateStatusBar.
|
||||
if (theEntity->curstate.team == theTeam)
|
||||
{
|
||||
if (GetHasUpgrade(theEntity->curstate.iuser4, MASK_PARASITED))
|
||||
{
|
||||
outEntityInfoString += " [Parasited]";
|
||||
}
|
||||
}
|
||||
|
||||
outIsEnemy = theIsEnemy;
|
||||
theSuccess = true;
|
||||
}
|
||||
|
|
|
@ -696,24 +696,25 @@ void AvHHud::DrawPlayerNames()
|
|||
int theR, theG, theB;
|
||||
this->GetPrimaryHudColor(theR, theG, theB, true, false);
|
||||
|
||||
// If selected, draw in different color
|
||||
// If selected or parasited, draw in different color
|
||||
if(inTopDownMode)
|
||||
{
|
||||
if (GetHasUpgrade(theCurrentPlayer->curstate.iuser4, MASK_PARASITED))
|
||||
{
|
||||
////Old NS 3.2 method. Now in AvHHud::GetEntityInfoString.
|
||||
//string thePrePendString;
|
||||
//LocalizeString(kParasited, thePrePendString);
|
||||
//theEntityName = string(theEntityName + " (" + thePrePendString + ")");
|
||||
|
||||
// Set color to parasited color
|
||||
UnpackRGB(theR, theG, theB, RGB_MARINE_PARASITED);
|
||||
}
|
||||
|
||||
bool theIsSelected = (std::find(this->mSelected.begin(), this->mSelected.end(), i) != this->mSelected.end());
|
||||
if(theIsSelected)
|
||||
if (theIsSelected)
|
||||
{
|
||||
// Selected color
|
||||
UnpackRGB(theR, theG, theB, RGB_MARINE_SELECTED);
|
||||
|
||||
if(GetHasUpgrade(theCurrentPlayer->curstate.iuser4, MASK_PARASITED))
|
||||
{
|
||||
string thePrePendString;
|
||||
LocalizeString(kParasited, thePrePendString);
|
||||
theEntityName = string(theEntityName + " (" + thePrePendString + ")");
|
||||
|
||||
// Set color to parasited color
|
||||
UnpackRGB(theR, theG, theB, RGB_MARINE_PARASITED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue