Merge remote-tracking branch 'origin/newui' into newui
This commit is contained in:
commit
d29e62fb59
@ -188,9 +188,12 @@ void CreateMove()
|
||||
return;
|
||||
|
||||
#if ENABLE_VISUALS
|
||||
static effect_chams::EffectChams Effectchams;
|
||||
hacks::shared::esp::SetEntityColor(target_entity, colors::pink);
|
||||
Effectchams.SetEntityColor(target_entity, colors::pink);
|
||||
if (target_entity->m_Type() != ENTITY_PLAYER)
|
||||
{
|
||||
static effect_chams::EffectChams Effectchams;
|
||||
hacks::shared::esp::SetEntityColor(target_entity, colors::pink);
|
||||
Effectchams.SetEntityColor(target_entity, colors::pink);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Attemt to auto-shoot
|
||||
|
@ -139,7 +139,9 @@ DEFINE_HOOKED_METHOD(GetFriendPersonaName, const char *, ISteamFriends *this_,
|
||||
|
||||
if ((*force_name).size() > 1 && steam_id == g_ISteamUser->GetSteamID())
|
||||
{
|
||||
return force_name.toString().c_str();
|
||||
auto new_name = force_name.toString();
|
||||
ReplaceString(new_name, "\\n", "\n");
|
||||
return new_name.c_str();
|
||||
}
|
||||
return original::GetFriendPersonaName(this_, steam_id);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <visual/SDLHooks.hpp>
|
||||
#include <glez/draw.hpp>
|
||||
#include "HookedMethods.hpp"
|
||||
#include "timer.hpp"
|
||||
#include <SDL2/SDL_syswm.h>
|
||||
|
||||
static bool init{ false };
|
||||
@ -20,12 +21,17 @@ typedef SDL_bool (*SDL_GetWindowWMInfo_t)(SDL_Window *window,
|
||||
SDL_SysWMinfo *info);
|
||||
static SDL_GetWindowWMInfo_t GetWindowWMInfo = nullptr;
|
||||
static SDL_GLContext tf2_sdl = nullptr;
|
||||
|
||||
Timer delay{};
|
||||
namespace hooked_methods
|
||||
{
|
||||
|
||||
DEFINE_HOOKED_METHOD(SDL_GL_SwapWindow, void, SDL_Window *window)
|
||||
{
|
||||
if (!delay.check(2000))
|
||||
{
|
||||
original::SDL_GL_SwapWindow(window);
|
||||
return;
|
||||
}
|
||||
if (!init_wminfo)
|
||||
{
|
||||
GetWindowWMInfo = *reinterpret_cast<SDL_GetWindowWMInfo_t *>(
|
||||
|
@ -98,7 +98,7 @@ static void initPlayerlist()
|
||||
});
|
||||
controller->setOpenSteamCallback([](unsigned steam) {
|
||||
CSteamID id{};
|
||||
id.SetFromUint64((0b1000100000000000000000001 << 32) | steam);
|
||||
id.Set(steam, EUniverse::k_EUniversePublic, EAccountType::k_EAccountTypeIndividual);
|
||||
g_ISteamFriends->ActivateGameOverlayToUser("steamid", id);
|
||||
});
|
||||
}
|
||||
@ -169,7 +169,6 @@ bool gui::handleSdlEvent(SDL_Event *event)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return zerokernel::Menu::instance->handleSdlEvent(event) &&
|
||||
!zerokernel::Menu::instance->isInGame();
|
||||
}
|
||||
|
@ -85,9 +85,7 @@ void zerokernel::Select::handleMessage(zerokernel::Message &msg,
|
||||
bool is_relayed)
|
||||
{
|
||||
if (variable && !is_relayed && msg.name == "OptionSelected")
|
||||
{
|
||||
variable->fromString((std::string) msg.kv["value"]);
|
||||
}
|
||||
|
||||
BaseMenuObject::handleMessage(msg, is_relayed);
|
||||
}
|
||||
|
Reference in New Issue
Block a user