mirror of
https://github.com/ENSL/NS.git
synced 2024-11-22 04:31:12 +00:00
add hud_drawwaypoints
This commit is contained in:
parent
b443eeb5a1
commit
152869e6b1
5 changed files with 25 additions and 0 deletions
|
@ -227,6 +227,7 @@ void CHud :: Init( void )
|
|||
CVAR_CREATE("hud_minimapnamesGreen", "255", FCVAR_ARCHIVE);
|
||||
CVAR_CREATE("hud_minimapnamesBlue", "255", FCVAR_ARCHIVE);
|
||||
CVAR_CREATE("hud_nameinfo", "1", FCVAR_ARCHIVE);
|
||||
CVAR_CREATE("hud_drawwaypoints", "2", FCVAR_ARCHIVE);
|
||||
|
||||
m_pSpriteList = NULL;
|
||||
|
||||
|
|
|
@ -1272,6 +1272,10 @@ void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int ac
|
|||
|
||||
if(!theOverrideImpulse)
|
||||
{
|
||||
if (in_impulse == ORDER_ACK){
|
||||
gHUD.SetDrawOrderOverlay(false);
|
||||
}
|
||||
|
||||
cmd->impulse = in_impulse;
|
||||
in_impulse = 0;
|
||||
}
|
||||
|
|
|
@ -2759,6 +2759,8 @@ int AvHHud::MsgFunc_SetOrder(const char* pszName, int iSize, void* pbuf)
|
|||
NetMsg_SetOrder( pbuf, iSize, theNewOrder );
|
||||
|
||||
AvHChangeOrder(this->mOrders, theNewOrder);
|
||||
|
||||
this->mDrawOrderOverlay = true;
|
||||
|
||||
// Give feedback on order
|
||||
this->OrderNotification(theNewOrder);
|
||||
|
@ -3786,6 +3788,7 @@ void AvHHud::Init(void)
|
|||
this->mCrosshairB = 0;
|
||||
|
||||
this->mDrawCombatUpgradeMenu = false;
|
||||
this->mDrawOrderOverlay = true;
|
||||
|
||||
// Initialize viewport
|
||||
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.
|
||||
|
|
|
@ -448,6 +448,9 @@ public:
|
|||
void ClearCenterText();
|
||||
// :
|
||||
|
||||
bool GetDrawOrderOverlay() const;
|
||||
void SetDrawOrderOverlay(bool drawOverlay);
|
||||
|
||||
private:
|
||||
|
||||
// :
|
||||
|
@ -868,6 +871,8 @@ private:
|
|||
typedef std::map<std::string, int> ServerVariableMapType;
|
||||
ServerVariableMapType mServerVariableMap;
|
||||
|
||||
bool mDrawOrderOverlay;
|
||||
|
||||
static bool sShowMap;
|
||||
|
||||
};
|
||||
|
|
|
@ -2900,7 +2900,9 @@ void AvHHud::RenderCommonUI()
|
|||
DrawInfoLocationText();
|
||||
DrawHUDStructureNotification();
|
||||
|
||||
if (CVAR_GET_FLOAT("hud_drawwaypoints") == 1 || (CVAR_GET_FLOAT("hud_drawwaypoints") == 2.0f && this->GetDrawOrderOverlay())) {
|
||||
this->DrawOrders();
|
||||
}
|
||||
this->DrawHelpIcons();
|
||||
// : 0000971
|
||||
this->DrawTeammateOrders();
|
||||
|
|
Loading…
Reference in a new issue