add hud_drawwaypoints

This commit is contained in:
pierow 2023-08-31 00:05:46 -04:00
parent b443eeb5a1
commit 152869e6b1
5 changed files with 25 additions and 0 deletions

View file

@ -227,6 +227,7 @@ void CHud :: Init( void )
CVAR_CREATE("hud_minimapnamesGreen", "255", FCVAR_ARCHIVE); CVAR_CREATE("hud_minimapnamesGreen", "255", FCVAR_ARCHIVE);
CVAR_CREATE("hud_minimapnamesBlue", "255", FCVAR_ARCHIVE); CVAR_CREATE("hud_minimapnamesBlue", "255", FCVAR_ARCHIVE);
CVAR_CREATE("hud_nameinfo", "1", FCVAR_ARCHIVE); CVAR_CREATE("hud_nameinfo", "1", FCVAR_ARCHIVE);
CVAR_CREATE("hud_drawwaypoints", "2", FCVAR_ARCHIVE);
m_pSpriteList = NULL; m_pSpriteList = NULL;

View file

@ -1272,6 +1272,10 @@ void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int ac
if(!theOverrideImpulse) if(!theOverrideImpulse)
{ {
if (in_impulse == ORDER_ACK){
gHUD.SetDrawOrderOverlay(false);
}
cmd->impulse = in_impulse; cmd->impulse = in_impulse;
in_impulse = 0; in_impulse = 0;
} }

View file

@ -2760,6 +2760,8 @@ int AvHHud::MsgFunc_SetOrder(const char* pszName, int iSize, void* pbuf)
AvHChangeOrder(this->mOrders, theNewOrder); AvHChangeOrder(this->mOrders, theNewOrder);
this->mDrawOrderOverlay = true;
// Give feedback on order // Give feedback on order
this->OrderNotification(theNewOrder); this->OrderNotification(theNewOrder);
@ -3786,6 +3788,7 @@ void AvHHud::Init(void)
this->mCrosshairB = 0; this->mCrosshairB = 0;
this->mDrawCombatUpgradeMenu = false; this->mDrawCombatUpgradeMenu = false;
this->mDrawOrderOverlay = true;
// Initialize viewport // Initialize viewport
this->mViewport[0] = this->mViewport[1] = this->mViewport[2] = this->mViewport[3] = 0; this->mViewport[0] = this->mViewport[1] = this->mViewport[2] = this->mViewport[3] = 0;
@ -7275,6 +7278,16 @@ float AvHHud::GetServerVariableFloat(const char* inName) const
} }
bool AvHHud::GetDrawOrderOverlay() const
{
return this->mDrawOrderOverlay;
}
void AvHHud::SetDrawOrderOverlay(bool drawOverlay)
{
mDrawOrderOverlay = drawOverlay;
}
/** /**
* Prints the call stack when an unhandled exception occurs. * Prints the call stack when an unhandled exception occurs.

View file

@ -448,6 +448,9 @@ public:
void ClearCenterText(); void ClearCenterText();
// : // :
bool GetDrawOrderOverlay() const;
void SetDrawOrderOverlay(bool drawOverlay);
private: private:
// : // :
@ -868,6 +871,8 @@ private:
typedef std::map<std::string, int> ServerVariableMapType; typedef std::map<std::string, int> ServerVariableMapType;
ServerVariableMapType mServerVariableMap; ServerVariableMapType mServerVariableMap;
bool mDrawOrderOverlay;
static bool sShowMap; static bool sShowMap;
}; };

View file

@ -2900,7 +2900,9 @@ void AvHHud::RenderCommonUI()
DrawInfoLocationText(); DrawInfoLocationText();
DrawHUDStructureNotification(); DrawHUDStructureNotification();
if (CVAR_GET_FLOAT("hud_drawwaypoints") == 1 || (CVAR_GET_FLOAT("hud_drawwaypoints") == 2.0f && this->GetDrawOrderOverlay())) {
this->DrawOrders(); this->DrawOrders();
}
this->DrawHelpIcons(); this->DrawHelpIcons();
// : 0000971 // : 0000971
this->DrawTeammateOrders(); this->DrawTeammateOrders();