add buttons, scrolls, and anglediff to huddata_t

This commit is contained in:
rtldg 2022-06-12 16:08:40 +00:00
parent 6bba2072fe
commit 8e0e5ec8c1
2 changed files with 19 additions and 0 deletions

View File

@ -108,6 +108,11 @@ enum struct huddata_t
float fClosestVelocityDifference;
int iMapTier;
float fClosestReplayLength;
int iButtons;
int iScrolls;
int iScrollsPrev;
float fAngleDiff;
}
/**

View File

@ -1757,6 +1757,20 @@ void UpdateMainHUD(int client)
huddata.iPreviousSpeed = gI_PreviousSpeed[client];
huddata.iMapTier = gB_Rankings ? Shavit_GetMapTier() : 0;
if (IsValidClient(target))
{
huddata.fAngleDiff = gF_AngleDiff[target];
huddata.iButtons = gI_Buttons[target];
huddata.iScrolls = gI_ScrollCount[target];
huddata.iScrollsPrev = gI_LastScrollCount[target];
}
else
{
huddata.iButtons = Shavit_GetReplayButtons(target, huddata.fAngleDiff);
huddata.iScrolls = -1;
huddata.iScrollsPrev = -1;
}
huddata.fClosestReplayTime = -1.0;
huddata.fClosestVelocityDifference = 0.0;
huddata.fClosestReplayLength = 0.0;