From 020120822cb298bd544072a9bbf13dfcffc9dc47 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Fri, 11 Nov 2016 19:43:03 +0300 Subject: [PATCH] hh --- uran/src/entitycache.cpp | 2 ++ uran/src/entitycache.h | 1 + uran/src/hacks/HEsp.cpp | 2 ++ uran/src/hacks/HEsp.h | 2 ++ 4 files changed, 7 insertions(+) diff --git a/uran/src/entitycache.cpp b/uran/src/entitycache.cpp index fa494bae..75e0a14f 100644 --- a/uran/src/entitycache.cpp +++ b/uran/src/entitycache.cpp @@ -62,6 +62,8 @@ void CachedEntity::Update(int idx) { m_iTeam = Var(eoffsets.iTeamNum); // TODO m_bEnemy = (m_iTeam != g_pLocalPlayer->team); m_bIsVisible = (IsEntityVisible(m_pEntity, 0) || IsEntityVisible(m_pEntity, 4)); + if (m_bIsVisible) m_lLastSeen = 0; + else m_lLastSeen++; } } diff --git a/uran/src/entitycache.h b/uran/src/entitycache.h index df4cbc53..09e31c23 100644 --- a/uran/src/entitycache.h +++ b/uran/src/entitycache.h @@ -40,6 +40,7 @@ public: bool m_bEnemy; bool m_bIsVisible; + unsigned long m_lLastSeen; // CBaseEntity diff --git a/uran/src/hacks/HEsp.cpp b/uran/src/hacks/HEsp.cpp index 520248bd..dde4716a 100644 --- a/uran/src/hacks/HEsp.cpp +++ b/uran/src/hacks/HEsp.cpp @@ -54,6 +54,8 @@ void HEsp::Create() { this->v_bShowFriendID = CreateConVar("u_esp_friendid", "0", "Show friend ID"); this->v_bShowFriends = CreateConVar("u_esp_friends", "1", "Show friends"); this->v_bVisCheck = CreateConVar("u_esp_vischeck", "1", "Visibility Checking"); + this->v_bLegit = CreateConVar("u_esp_legit", "0", "'legit' esp mode"); + this->v_bLegitSeenTicks = CreateConVar("u_esp_legit_seenticks", "800", "Ticks the entity is 'predicted'"); } #define ESP_HEIGHT 14 diff --git a/uran/src/hacks/HEsp.h b/uran/src/hacks/HEsp.h index 32bd3e10..0c96a0d8 100644 --- a/uran/src/hacks/HEsp.h +++ b/uran/src/hacks/HEsp.h @@ -36,6 +36,8 @@ public: ConVar* v_bShowFriendID; ConVar* v_bShowFriends; ConVar* v_bVisCheck; + ConVar* v_bLegit; + ConVar* v_bLegitSeenTicks; //ConVar* v_bModelInfo; };