mirror of
https://github.com/ENSL/NS.git
synced 2024-11-10 15:21:54 +00:00
o Changed column label for player level in combat
o Fixed chamber count display on reconnect git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@452 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
db871e2fc8
commit
084eb4714a
7 changed files with 87 additions and 29 deletions
|
@ -746,14 +746,17 @@ void ScorePanel::FillGrid()
|
|||
}
|
||||
|
||||
bool bNextRowIsGap = false;
|
||||
m_HeaderLabels[COLUMN_EXTRA].setText(CHudTextMessage::BufferedLocaliseTextString("#EXTRA"));
|
||||
if ( strnicmp(gHUD.GetMapName().c_str(), "ns_", 3) == 0 ) {
|
||||
if ( gHUD.GetIsMarine() ) {
|
||||
m_HeaderLabels[COLUMN_EXTRA].setText(CHudTextMessage::BufferedLocaliseTextString("#COLWEAP"));
|
||||
}
|
||||
else if ( gHUD.GetIsAlien() ) {
|
||||
m_HeaderLabels[COLUMN_EXTRA].setText(CHudTextMessage::BufferedLocaliseTextString("#COLRES"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_HeaderLabels[COLUMN_EXTRA].setText(CHudTextMessage::BufferedLocaliseTextString("#EXTRA"));
|
||||
m_HeaderLabels[COLUMN_EXTRA].setText(CHudTextMessage::BufferedLocaliseTextString("#COLLEVEL"));
|
||||
}
|
||||
|
||||
for(int row=0; row < NUM_ROWS; row++)
|
||||
|
|
|
@ -68,6 +68,9 @@ AvHEntityHierarchy::AvHEntityHierarchy()
|
|||
|
||||
void AvHEntityHierarchy::Clear()
|
||||
{
|
||||
mNumMovement=0;
|
||||
mNumSensory=0;
|
||||
mNumDefence=0;
|
||||
this->mEntityList.clear();
|
||||
}
|
||||
|
||||
|
@ -95,6 +98,18 @@ void AvHEntityHierarchy::GetEntityInfoList(MapEntityMap& outList) const
|
|||
outList = mEntityList;
|
||||
}
|
||||
|
||||
int AvHEntityHierarchy::GetNumSensory() const {
|
||||
return this->mNumSensory;
|
||||
}
|
||||
|
||||
int AvHEntityHierarchy::GetNumMovement() const {
|
||||
return this->mNumMovement;
|
||||
}
|
||||
|
||||
int AvHEntityHierarchy::GetNumDefense() const {
|
||||
return this->mNumDefence;
|
||||
}
|
||||
|
||||
////////////////
|
||||
// end shared //
|
||||
////////////////
|
||||
|
@ -129,9 +144,6 @@ int GetHotkeyGroupContainingPlayer(AvHPlayer* player)
|
|||
return -1;
|
||||
|
||||
}
|
||||
static int numMovement=0;
|
||||
static int numSensory=0;
|
||||
static int numDefence=0;
|
||||
|
||||
void AvHEntityHierarchy::BuildFromTeam(const AvHTeam* inTeam, BaseEntityListType& inBaseEntityList)
|
||||
{
|
||||
|
@ -269,22 +281,13 @@ void AvHEntityHierarchy::BuildFromTeam(const AvHTeam* inTeam, BaseEntityListType
|
|||
sc=min(3, sc);
|
||||
dc=min(3,dc);
|
||||
mc=min(3,mc);
|
||||
if ( numSensory != sc || numDefence != dc || numMovement != mc ) {
|
||||
numSensory=sc;
|
||||
numDefence=dc;
|
||||
numMovement=mc;
|
||||
int mask=0;
|
||||
mask |= ( numSensory & 0x3 );
|
||||
mask <<= 2;
|
||||
mask |= ( numDefence & 0x3 );
|
||||
mask <<= 2;
|
||||
mask |= ( numMovement & 0x3 );
|
||||
mask |= 0x80;
|
||||
NetMsg_HUDSetUpgrades(mask);
|
||||
if ( this->mNumSensory != sc || this->mNumDefence != dc || this->mNumMovement != mc ) {
|
||||
this->mNumSensory=sc;
|
||||
this->mNumDefence=dc;
|
||||
this->mNumMovement=mc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Returns true when something was sent
|
||||
|
|
|
@ -110,13 +110,18 @@ public:
|
|||
bool operator!=(const AvHEntityHierarchy& inHierarchy) const;
|
||||
bool operator==(const AvHEntityHierarchy& inHierarchy) const;
|
||||
|
||||
int GetNumSensory() const;
|
||||
int GetNumDefense() const;
|
||||
int GetNumMovement() const;
|
||||
private:
|
||||
|
||||
|
||||
// The encoded entity info that has been sent to clients
|
||||
|
||||
MapEntityMap mEntityList;
|
||||
|
||||
int mNumMovement;
|
||||
int mNumSensory;
|
||||
int mNumDefence;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -661,6 +661,9 @@ void AvHHud::ClearData()
|
|||
this->mHasWelder=false;
|
||||
this->mHasMines=false;
|
||||
this->mHasGrenades=false;
|
||||
this->mNumSensory=0;
|
||||
this->mNumMovement=0;
|
||||
this->mNumDefense=0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2586,6 +2589,9 @@ void AvHHud::ResetGame(bool inMapChanged)
|
|||
this->mHasGrenades=false;
|
||||
this->mHasMines=false;
|
||||
this->mHasWelder=false;
|
||||
this->mNumSensory=0;
|
||||
this->mNumMovement=0;
|
||||
this->mNumDefense=0;
|
||||
}
|
||||
|
||||
BIND_MESSAGE(SetGmma);
|
||||
|
|
|
@ -3579,6 +3579,9 @@ void AvHPlayer::Init()
|
|||
this->mPurchasedCombatUpgrades.clear();
|
||||
this->mGiveCombatUpgrades.clear();
|
||||
this->mMarineHUDUpgrades=0;
|
||||
this->mNumSensory=0;
|
||||
this->mNumMovement=0;
|
||||
this->mNumDefense=0;
|
||||
}
|
||||
|
||||
void AvHPlayer::InitializeFromTeam(float inHealthPercentage, float inArmorPercentage)
|
||||
|
@ -7101,6 +7104,9 @@ void AvHPlayer::ResetEntity(void)
|
|||
this->mDesiredNetName = theSavedDesiredNetName;
|
||||
this->mClientInfoLocations = theSavedClientInfoLocations;
|
||||
this->mMarineHUDUpgrades=0;
|
||||
this->mNumSensory=0;
|
||||
this->mNumMovement=0;
|
||||
this->mNumDefense=0;
|
||||
}
|
||||
|
||||
void AvHPlayer::ResetOverwatch()
|
||||
|
@ -9273,6 +9279,32 @@ void AvHPlayer::UpdateAlienUI()
|
|||
this->mClientHiveInfo = theTeamHiveInfo;
|
||||
}
|
||||
}
|
||||
|
||||
if ( theIsAlien ) {
|
||||
int currentMask=0;
|
||||
currentMask |= ( this->mNumSensory & 0x3 );
|
||||
currentMask <<= 2;
|
||||
currentMask |= ( this->mNumDefense & 0x3 );
|
||||
currentMask <<= 2;
|
||||
currentMask |= ( this->mNumMovement & 0x3 );
|
||||
currentMask |= 0x80;
|
||||
|
||||
int teamMask=0;
|
||||
AvHEntityHierarchy& theEntHier=GetGameRules()->GetEntityHierarchy(this->GetTeam());
|
||||
teamMask |= ( theEntHier.GetNumSensory() & 0x3 );
|
||||
teamMask <<= 2;
|
||||
teamMask |= ( theEntHier.GetNumDefense() & 0x3 );
|
||||
teamMask <<= 2;
|
||||
teamMask |= ( theEntHier.GetNumMovement() & 0x3 );
|
||||
teamMask |= 0x80;
|
||||
|
||||
if ( currentMask != teamMask ) {
|
||||
this->mNumSensory=theEntHier.GetNumSensory();
|
||||
this->mNumDefense=theEntHier.GetNumDefense();
|
||||
this->mNumMovement=theEntHier.GetNumMovement();
|
||||
NetMsg_HUDSetUpgrades(this->pev, teamMask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -836,6 +836,10 @@ private:
|
|||
|
||||
string mNetworkID;
|
||||
int mMarineHUDUpgrades;
|
||||
int mNumMovement;
|
||||
int mNumSensory;
|
||||
int mNumDefense;
|
||||
|
||||
struct ServerVariable
|
||||
{
|
||||
std::string mName;
|
||||
|
|
|
@ -381,6 +381,11 @@ COLWEAP
|
|||
Weapon
|
||||
}
|
||||
|
||||
COLLEVEL
|
||||
{
|
||||
Level
|
||||
}
|
||||
|
||||
COLRES
|
||||
{
|
||||
Res
|
||||
|
|
Loading…
Reference in a new issue