AntiDisguise.cpp: make it work with visuals disabled

This commit is contained in:
Unnamed 2019-04-22 21:33:01 +00:00 committed by TotallyNotElite
parent 1b6c221b38
commit af776b7d8d

View File

@ -14,7 +14,7 @@ static settings::Bool no_invisibility{ "remove.cloak", "0" };
namespace hacks::tf2::antidisguise namespace hacks::tf2::antidisguise
{ {
void Draw() void cm()
{ {
CachedEntity *ent; CachedEntity *ent;
if (!*enable && !*no_invisibility) if (!*enable && !*no_invisibility)
@ -36,7 +36,5 @@ void Draw()
} }
} }
} }
#if ENABLE_VISUALS static InitRoutine EC([]() { EC::Register(EC::CreateMove, cm, "antidisguise", EC::average); });
static InitRoutine EC([]() { EC::Register(EC::Draw, Draw, "antidisguise", EC::average); });
#endif
} // namespace hacks::tf2::antidisguise } // namespace hacks::tf2::antidisguise