mirror of
https://github.com/ENSL/NS.git
synced 2025-01-21 17:00:46 +00:00
research tracker info in demo/hltv
-not sure if there's a demo verison that needs to be updated
This commit is contained in:
parent
93d134dca4
commit
60c4e0901c
2 changed files with 27 additions and 0 deletions
|
@ -3162,6 +3162,9 @@ void AvHGamerules::UpdateHLTVProxy()
|
|||
const HiveInfoListType tmp;
|
||||
NetMsg_AlienInfo_Hives( NULL, theTeamHiveInfo, tmp );
|
||||
|
||||
ResearchInfoListType theTeamResearchInfo = this->mTeamA.GetResearchInfoList();
|
||||
NetMsg_PlayHUDNotification_Research(NULL, 2, theTeamResearchInfo);
|
||||
|
||||
this->mTimeOfLastHLTVProxyUpdate = gpGlobals->time;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4141,6 +4141,20 @@ int AvHHud::InitializeDemoPlayback(int inSize, unsigned char* inBuffer)
|
|||
this->mHiveInfoList.push_back(theHiveInfo);
|
||||
}
|
||||
|
||||
// Read in number of research infos
|
||||
this->mResearchInfoList.clear();
|
||||
|
||||
int theNumResearchInfos = 0;
|
||||
LoadData(&theNumResearchInfos, inBuffer, sizeof(int), theBytesRead);
|
||||
|
||||
// For each one, add a new research info
|
||||
for (i = 0; i < theNumResearchInfos; i++)
|
||||
{
|
||||
AvHResearchInfo theResearchInfo;
|
||||
LoadData(&theResearchInfo, inBuffer, sizeof(AvHResearchInfo), theBytesRead);
|
||||
this->mResearchInfoList.push_back(theResearchInfo);
|
||||
}
|
||||
|
||||
// Load and set current pie menu control
|
||||
int thePieMenuControlLength = 0;
|
||||
LoadData(&thePieMenuControlLength, inBuffer, sizeof(int), theBytesRead);
|
||||
|
@ -4253,6 +4267,9 @@ void AvHHud::InitializeDemoRecording()
|
|||
int theNumHiveInfoRecords = (int)this->mHiveInfoList.size();
|
||||
int theHiveInfoSize = sizeof(int) + theNumHiveInfoRecords*sizeof(AvHHiveInfo);
|
||||
|
||||
int theNumResearchInfoRecords = (int)this->mResearchInfoList.size();
|
||||
int theResearchInfoSize = sizeof(int) + theNumResearchInfoRecords * sizeof(AvHResearchInfo);
|
||||
|
||||
string thePieMenuControl = gPieMenuHandler.GetPieMenuControl();
|
||||
int theCurrentPieMenuControlSize = sizeof(int) + (int)thePieMenuControl.size();
|
||||
|
||||
|
@ -4282,6 +4299,13 @@ void AvHHud::InitializeDemoRecording()
|
|||
SaveData(theCharArray, &(*theHiveInfoIter), sizeof(AvHHiveInfo), theCounter);
|
||||
}
|
||||
|
||||
// Write out num research info records
|
||||
SaveData(theCharArray, &theNumResearchInfoRecords, sizeof(int), theCounter);
|
||||
for (ResearchInfoListType::iterator theResearchInfoIter = this->mResearchInfoList.begin(); theResearchInfoIter != this->mResearchInfoList.end(); theResearchInfoIter++)
|
||||
{
|
||||
SaveData(theCharArray, &(*theResearchInfoIter), sizeof(AvHResearchInfo), theCounter);
|
||||
}
|
||||
|
||||
// Save length of pie menu control name
|
||||
int thePieMenuControlNameLength = (int)thePieMenuControl.size();
|
||||
SaveData(theCharArray, &thePieMenuControlNameLength, sizeof(int), theCounter);
|
||||
|
|
Loading…
Reference in a new issue