- Статус
- Оффлайн
- Регистрация
- 19 Апр 2020
- Сообщения
- 286
- Реакции
- 29
attempt to redefine 'glow_object_definition_t'
UPD: с c_glow_object_mngr та же песня, в в2 все было рабочим
1:
local ffi = require("ffi")
_DEBUG = true
ffi.cdef[[
struct glow_object_definition_t {
int m_next_free_slot;
void *m_ent;
float r;
float g;
float b;
float a;
bool m_glow_alpha_capped_by_render_alpha;
float m_glow_alpha_function_of_max_velocity;
float m_glow_alpha_max;
float m_glow_pulse_overdrive;
bool m_render_when_occluded;
bool m_render_when_unoccluded;
bool m_full_bloom_render;
char pad_0;
int m_full_bloom_stencil_test_value;
int m_style;
int split_screen_slot;
static const int END_OF_FREE_LIST = -1;
static const int ENTRY_IN_USE = -2;
};
struct c_glow_object_mngr {
struct glow_object_definition_t *m_glow_object_definitions;
int m_max_size;
int m_pad;
int m_size;
struct glow_object_definition_t *m_glow_object_definitions2;
int m_current_objects;
};
typedef void*(__thiscall* get_client_entity_t)(void*, int);
typedef void*(__thiscall* get_view_model_fn)(void*, int);
typedef struct { float x; float y; float z; } vmodel_vec3_t;
typedef struct { float x; float y; float z; } vmodel_ang3_t;
bool CreateDirectoryA(const char* lpPathName, void* lpSecurityAttributes);
void* __stdcall URLDownloadToFileA(void* LPUNKNOWN, const char* LPCSTR, const char* LPCSTR2, int a, int LPBINDSTATUSCALLBACK);
bool DeleteUrlCacheEntryA(const char* lpszUrlName);
]]
local cast = ffi.cast
local glow_object_manager_sig = "0F 11 05 ? ? ? ? 83 C8 01"
local sus = utils.opcode_scan("client.dll", glow_object_manager_sig) or error("sig not found")
local glow_object_manager = cast("struct c_glow_object_mngr**", cast("char*", sus) + 3)[0] or error("glow_object_manager is nil")
local rawientitylist = utils.create_interface("client.dll", "VClientEntityList003") or error("VClientEntityList003 wasnt found", 2)
local ientitylist = cast(ffi.typeof("void***"), rawientitylist) or error("rawientitylist is nil", 2)
local get_client_entity = cast("get_client_entity_t", ientitylist[0][3]) or error("get_client_entity is nil", 2)