Localize ESP weapon strings
This commit is contained in:
parent
7189435317
commit
c086aefcf2
@ -15,6 +15,7 @@ namespace vgui
|
||||
{
|
||||
class ISurface;
|
||||
class IPanel;
|
||||
class ILocalize;
|
||||
} // namespace vgui
|
||||
|
||||
class IToolFrameworkInternal;
|
||||
@ -66,6 +67,7 @@ extern void *demoplayer;
|
||||
extern IEngineSound *g_ISoundEngine;
|
||||
extern vgui::ISurface *g_ISurface;
|
||||
extern vgui::IPanel *g_IPanel;
|
||||
extern vgui::ILocalize *g_ILocalize;
|
||||
extern IClientEntityList *g_IEntityList;
|
||||
extern ICvar *g_ICvar;
|
||||
extern IGameEventManager2 *g_IEventManager2;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <studio.h>
|
||||
#include <vgui/ISurface.h>
|
||||
#include <vgui/IPanel.h>
|
||||
#include <vgui/ILocalize.h>
|
||||
#include <mathlib/vmatrix.h>
|
||||
#include <inetmessage.h>
|
||||
#include <iclient.h>
|
||||
|
@ -26,6 +26,7 @@ void *demoplayer = nullptr;
|
||||
IEngineSound *g_ISoundEngine = nullptr;
|
||||
vgui::ISurface *g_ISurface = nullptr;
|
||||
vgui::IPanel *g_IPanel = nullptr;
|
||||
vgui::ILocalize *g_ILocalize = nullptr;
|
||||
IClientEntityList *g_IEntityList = nullptr;
|
||||
ICvar *g_ICvar = nullptr;
|
||||
IGameEventManager2 *g_IEventManager2 = nullptr;
|
||||
@ -163,6 +164,7 @@ void CreateInterfaces()
|
||||
g_IMDLCache = BruteforceInterface<IMDLCache>("MDLCache", sharedobj::datacache());
|
||||
|
||||
g_IPanel = BruteforceInterface<vgui::IPanel>("VGUI_Panel", sharedobj::vgui2());
|
||||
g_ILocalize = BruteforceInterface<vgui::ILocalize>("VGUI_Localize", sharedobj::vgui2());
|
||||
g_pUniformStream = **(IUniformRandomStream ***) (gSignatures.GetVstdSignature("A3 ? ? ? ? C3 89 F6") + 0x1);
|
||||
g_IToolFramework = BruteforceInterface<IToolFrameworkInternal>("VTOOLFRAMEWORKVERSION", sharedobj::engine());
|
||||
#if ENABLE_VISUALS
|
||||
|
@ -1687,8 +1687,7 @@ void _FASTCALL ProcessEntity(CachedEntity *ent)
|
||||
CachedEntity *weapon = ENTITY(widx);
|
||||
if (CE_VALID(weapon) && re::C_BaseCombatWeapon::IsBaseCombatWeapon(RAW_ENT(weapon)))
|
||||
{
|
||||
|
||||
const char *weapon_name = re::C_BaseCombatWeapon::GetPrintName(RAW_ENT(weapon));
|
||||
const char *weapon_name = g_ILocalize->FindAsUTF8(re::C_BaseCombatWeapon::GetPrintName(RAW_ENT(weapon)));
|
||||
if (weapon_name)
|
||||
AddEntityString(ent, std::string(weapon_name));
|
||||
}
|
||||
|
Reference in New Issue
Block a user