Skip to content

Commit 80a12bb

Browse files
committed
Remove redundant / unused code
1 parent 3d75492 commit 80a12bb

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

Client/mods/deathmatch/logic/CClientDisplay.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
CClientDisplay::CClientDisplay(unsigned long ulID)
1414
{
1515
m_ulID = ulID;
16-
17-
m_ulExpirationTime = 0;
1816
m_bVisible = true;
1917
m_Color = SColorRGBA(255, 255, 255, 255);
2018
}

Client/mods/deathmatch/logic/CClientDisplay.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ class CClientDisplay
2929
unsigned long GetID() const { return m_ulID; }
3030
virtual eDisplayType GetType() = 0;
3131

32-
unsigned long GetExpirationTime() const { return m_ulExpirationTime; };
33-
void SetExpirationTime(unsigned long ulTime) { m_ulExpirationTime = ulTime; };
34-
unsigned long GetTimeTillExpiration() const { return m_ulExpirationTime - CClientTime::GetTime(); };
35-
void SetTimeTillExpiration(unsigned long ulMs) { m_ulExpirationTime = CClientTime::GetTime() + ulMs; };
36-
3732
virtual const CVector& GetPosition() { return m_vecPosition; };
3833
virtual void SetPosition(const CVector& vecPosition) { m_vecPosition = vecPosition; };
3934

@@ -47,10 +42,7 @@ class CClientDisplay
4742
virtual void Render() = 0;
4843

4944
protected:
50-
bool IsExpired() const { return (m_ulExpirationTime != 0 && (CClientTime::GetTime() > m_ulExpirationTime)); };
51-
5245
unsigned long m_ulID;
53-
unsigned long m_ulExpirationTime;
5446
bool m_bVisible;
5547
CVector m_vecPosition;
5648
SColor m_Color;

Client/mods/deathmatch/logic/CClientVectorGraphic.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ bool CClientVectorGraphic::LoadFromString(std::string strData)
4545

4646
bool CClientVectorGraphic::SetDocument(CXMLNode* node)
4747
{
48-
if (!m_pVectorGraphicDisplay || !node || !node->IsValid())
48+
if (!node || !node->IsValid())
4949
return false;
5050

5151
if (m_pXMLString && m_pXMLString->node != node)
@@ -79,9 +79,6 @@ bool CClientVectorGraphic::RemoveUpdateCallback()
7979

8080
void CClientVectorGraphic::OnUpdate()
8181
{
82-
if (!m_pVectorGraphicDisplay)
83-
return;
84-
8582
m_pVectorGraphicDisplay->UpdateTexture();
8683

8784
if (std::holds_alternative<CLuaFunctionRef>(m_updateCallbackRef))

Client/mods/deathmatch/logic/CClientVectorGraphicDisplay.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@ CClientVectorGraphicDisplay::CClientVectorGraphicDisplay(CClientVectorGraphic* p
2525

2626
void CClientVectorGraphicDisplay::Render()
2727
{
28-
// When the underlying vector graphic is deleted, this display will be destroyed automatically by the manager.
29-
// CClientVectorGraphicDisplay::Render should be called as long as the display manager is still alive.
30-
// see CClientDisplayManager::DoPulse
3128
if (!m_pVectorGraphic || m_pVectorGraphic->IsDestroyed())
32-
return SetTimeTillExpiration(1);
29+
return;
3330

3431
if (!m_bVisible)
3532
{

0 commit comments

Comments
 (0)