Skip to content

Commit cc53f0d

Browse files
committed
fix(screentext): byebye setprop
1 parent 360d0b7 commit cc53f0d

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

src/core/entrypoint.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,8 @@ void SwiftlyS2::AllPluginsLoaded()
285285

286286
std::string currentMap = "None";
287287

288-
void EraseScheduledCEntKeyVals();
289-
290288
void SwiftlyS2::OnLevelInit(char const* pMapName, char const* pMapEntities, char const* pOldLevel, char const* pLandmarkName, bool loadGame, bool background)
291289
{
292-
EraseScheduledCEntKeyVals();
293290
currentMap = pMapName;
294291
g_pluginManager.ExecuteEvent("core", "OnMapLoad", { currentMap }, nullptr);
295292
}

src/engine/vgui/screentext.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@
55
#include <sdk/schema.h>
66
#include <entities/system.h>
77

8-
std::vector<CEntityKeyValues*> scheduleForDelete;
9-
108
ScreenText::~ScreenText()
119
{
12-
if (pScreenEntity.IsValid()) {
13-
schema::SetProp<bool>(pScreenEntity.Get(), "CPointWorldText", "m_bEnabled", false);
14-
schema::SetProp<bool>(pScreenEntity.Get(), "CPointWorldText", "m_bDrawBackground", false);
15-
}
1610
}
1711

1812
void ScreenText::Create(Color color, std::string font, int size, bool drawBackground, bool isMenu)
@@ -28,8 +22,6 @@ void ScreenText::Create(Color color, std::string font, int size, bool drawBackgr
2822

2923
CEntityKeyValues* pMenuKV = new CEntityKeyValues();
3024

31-
scheduleForDelete.push_back(pMenuKV);
32-
3325
pMenuKV->SetBool("enabled", true);
3426
pMenuKV->SetFloat("world_units_per_pixel", (0.25 / 1050) * size);
3527
pMenuKV->SetInt("justify_horizontal", 0);
@@ -198,11 +190,4 @@ bool ScreenText::IsRenderingTo(CHandle<CEntityInstance> renderingTo)
198190
void ScreenText::SetRenderingTo(CEntityInstance* ent)
199191
{
200192
pRenderingTo.Set(ent);
201-
}
202-
203-
void EraseScheduledCEntKeyVals() {
204-
// for (auto e : scheduleForDelete) {
205-
// delete e;
206-
// }
207-
scheduleForDelete.clear();
208193
}

0 commit comments

Comments
 (0)