mirror of
https://github.com/fedddddd/iw5-gsc-utils.git
synced 2025-12-06 02:07:47 +00:00
update
This commit is contained in:
@@ -270,6 +270,11 @@ namespace gsc
|
||||
{
|
||||
void add(const std::string& name, const script_method& func)
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto index = 0u;
|
||||
auto& ctx = (*game::plutonium::gsc_ctx);
|
||||
|
||||
|
||||
@@ -179,4 +179,4 @@ namespace io
|
||||
};
|
||||
}
|
||||
|
||||
REGISTER_COMPONENT(io::component)
|
||||
//REGISTER_COMPONENT(io::component)
|
||||
|
||||
@@ -194,4 +194,4 @@ namespace json
|
||||
};
|
||||
}
|
||||
|
||||
REGISTER_COMPONENT(json::component)
|
||||
//REGISTER_COMPONENT(json::component)
|
||||
|
||||
@@ -71,4 +71,4 @@ namespace notifies
|
||||
};
|
||||
}
|
||||
|
||||
REGISTER_COMPONENT(notifies::component)
|
||||
//REGISTER_COMPONENT(notifies::component)
|
||||
|
||||
@@ -144,4 +144,4 @@ namespace scheduler
|
||||
};
|
||||
}
|
||||
|
||||
REGISTER_COMPONENT(scheduler::component)
|
||||
//REGISTER_COMPONENT(scheduler::component)
|
||||
|
||||
@@ -136,4 +136,4 @@ namespace scripting
|
||||
};
|
||||
}
|
||||
|
||||
REGISTER_COMPONENT(scripting::component)
|
||||
//REGISTER_COMPONENT(scripting::component)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace signatures
|
||||
std::string mask(string.size(), 'x');
|
||||
const auto base = reinterpret_cast<size_t>(GetModuleHandle("plutonium-bootstrapper-win32.exe"));
|
||||
utils::hook::signature signature(base, get_image_size() - base);
|
||||
|
||||
OutputDebugString(utils::string::va("%p %p\n", base, get_image_size()));
|
||||
auto found = false;
|
||||
signature.add({
|
||||
string,
|
||||
@@ -70,37 +70,23 @@ namespace signatures
|
||||
|
||||
bool process_gsc_ctx()
|
||||
{
|
||||
OutputDebugString("HELLOOO");
|
||||
|
||||
const auto string_ref = find_string_ref("in call to builtin %s \"%s\"");
|
||||
if (!string_ref)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto gsc_ctx_ptr = *reinterpret_cast<size_t*>(string_ref - 0xAD);
|
||||
|
||||
const auto gsc_ctx_ptr = *reinterpret_cast<size_t*>(string_ref + 215);
|
||||
OutputDebugString(utils::string::va("gsc_ctx_ptr: %p\n", gsc_ctx_ptr));
|
||||
game::plutonium::gsc_ctx.set(gsc_ctx_ptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool process_printf()
|
||||
{
|
||||
const auto string_ref = find_string_ref("A critical exception occured!\n");
|
||||
if (!string_ref)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto offset = *reinterpret_cast<size_t*>(string_ref + 5);
|
||||
const auto printf_ptr = string_ref + 4 + 5 + offset;
|
||||
OutputDebugString(utils::string::va("printf_ptr: %p\n", printf_ptr));
|
||||
game::plutonium::printf.set(printf_ptr);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool process()
|
||||
{
|
||||
load_function_tables();
|
||||
return process_printf() && process_gsc_ctx();
|
||||
return process_gsc_ctx();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,4 @@ namespace string
|
||||
};
|
||||
}
|
||||
|
||||
REGISTER_COMPONENT(string::component)
|
||||
//REGISTER_COMPONENT(string::component)
|
||||
|
||||
@@ -193,4 +193,4 @@ namespace userinfo
|
||||
};
|
||||
}
|
||||
|
||||
REGISTER_COMPONENT(userinfo::component)
|
||||
//REGISTER_COMPONENT(userinfo::component)
|
||||
|
||||
Reference in New Issue
Block a user