From 6e590dd71d285ea14fba7eb3477ee7e379e1c820 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sat, 7 Apr 2018 18:18:10 +0200 Subject: [PATCH] libglez pls --- src/fidgetspinner.cpp | 4 ++-- src/hack.cpp | 8 ++++++-- src/hacks/ESP.cpp | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/fidgetspinner.cpp b/src/fidgetspinner.cpp index 4c9914ca..497dd9b9 100644 --- a/src/fidgetspinner.cpp +++ b/src/fidgetspinner.cpp @@ -92,9 +92,9 @@ void DrawSpinner() const glez_rgba_t color = glez_rgba(255, 255, 255, 255); - draw_api::texture_handle_t text = draw_api::create_texture("/opt/cathook/data/res/atlas.png"); + draw_api::texture_handle_t text = draw_api::create_texture(DATA_PATH"/res/atlas.png"); while (!text.handle) - text = draw_api::create_texture("/opt/cathook/data/res/atlas.png"); + text = draw_api::create_texture(DATA_PATH"res/atlas.png"); draw_api::draw_rect_textured(draw::width / 2, draw::height / 2, size, size, colors::white, text, 0 + 64 * state, (3 + (v9mode ? 1 : 0)) * 64, 64, 64, angle); diff --git a/src/hack.cpp b/src/hack.cpp index 1acfcc3b..77c1c1b8 100755 --- a/src/hack.cpp +++ b/src/hack.cpp @@ -152,12 +152,16 @@ public: else if (!strcmp(name, "player_changeclass")) { int id = event->GetInt("userid"); player_info_s info; + g_IEngine->GetPlayerInfo(g_IEngine->GetPlayerForUserID(id), &info); PrintChat("\x07%06X%s\x01 changed to \x07%06X%s\x01", 0xa06ba0, info.name, 0xa06ba0, classname(event->GetInt("class"))); } else if (!strcmp(name, "player_builtobject")) { int obj = event->GetInt("object"); - - logging::Info("%d, %d, %d", obj == ENTITY_BUILDING, obj == CL_CLASS(CObjectSentrygun), obj); + int idx = event->GetInt("index"); + CachedEntity* building = ENTITY(idx); + if (CE_GOOD(building)) + logging::Info("%d, %d",building->m_iClassID, CL_CLASS(CObjectSentrygun)); + logging::Info("%d, %d, %d", obj, ENTITY_BUILDING, CL_CLASS(CObjectSentrygun)); } } }; diff --git a/src/hacks/ESP.cpp b/src/hacks/ESP.cpp index 30efbd1a..f4009aea 100644 --- a/src/hacks/ESP.cpp +++ b/src/hacks/ESP.cpp @@ -403,7 +403,7 @@ void _FASTCALL emoji(CachedEntity *ent) glez_rgba_t white = glez_rgba(255, 255, 255, 255); while (!textur) textur = glez_texture_load_png_rgba( - "/opt/cathook/data/res/atlas.png"); + DATA_PATH"res/atlas.png"); player_info_s info; unsigned int steamID; unsigned int steamidarray[32]{}; @@ -416,7 +416,7 @@ void _FASTCALL emoji(CachedEntity *ent) steamID = info.friendsID; if (!idspecific) idspecific = glez_texture_load_png_rgba( - "/opt/cathook/data/res/idspec.png"); + DATA_PATH"res/idspec.png"); if (idspecific && playerlist::AccessData(steamID).state == playerlist::k_EState::CAT) @@ -429,7 +429,7 @@ void _FASTCALL emoji(CachedEntity *ent) { while (!idspecific) idspecific = glez_texture_load_png_rgba( - "/opt/cathook/data/res/idspec.png"); + DATA_PATH"res/idspec.png"); if (idspecific) glez_rect_textured(head_scr.x - size / 2, head_scr.y - size / 2, size,