mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-04-20 13:35:43 +00:00
Add more structs and symbols.
Check for T4SP environment to prevent MP from being ravaged.
This commit is contained in:
parent
6a8f8dbcbe
commit
70e2f8bdb6
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE /*module_*/, DWORD ul_reason_for_call, LPVOID /*reserved_*/)
|
BOOL APIENTRY DllMain(HMODULE /*module_*/, DWORD ul_reason_for_call, LPVOID /*reserved_*/)
|
||||||
{
|
{
|
||||||
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
|
if (ul_reason_for_call == DLL_PROCESS_ATTACH && game::environment::t4sp())
|
||||||
{
|
{
|
||||||
component_loader::post_unpack();
|
component_loader::post_unpack();
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,135 @@ namespace game
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Scr_GetInt(game::scriptInstance_t inst, unsigned int arg_index)
|
||||||
|
{
|
||||||
|
static const auto call_addr = SELECT(0x0, 0x699C50);
|
||||||
|
int answer;
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
mov ecx, arg_index;
|
||||||
|
mov eax, inst;
|
||||||
|
call call_addr;
|
||||||
|
mov answer, eax;
|
||||||
|
}
|
||||||
|
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Scr_GetFloat(game::scriptInstance_t inst, unsigned int arg_index)
|
||||||
|
{
|
||||||
|
static const auto call_addr = SELECT(0x0, 0x699E90);
|
||||||
|
float answer;
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
mov ecx, arg_index;
|
||||||
|
mov eax, inst;
|
||||||
|
call call_addr;
|
||||||
|
mov answer, eax;
|
||||||
|
}
|
||||||
|
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
char* Scr_GetString(game::scriptInstance_t inst, unsigned int arg_index)
|
||||||
|
{
|
||||||
|
static const auto call_addr = SELECT(0x0, 0x699F30);
|
||||||
|
char* answer;
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
mov ecx, arg_index;
|
||||||
|
mov eax, inst;
|
||||||
|
call call_addr;
|
||||||
|
mov answer, eax;
|
||||||
|
}
|
||||||
|
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
gentity_s* Scr_GetEntity(unsigned int arg_index)
|
||||||
|
{
|
||||||
|
static const auto call_addr = SELECT(0x0, 0x546E30);
|
||||||
|
gentity_s* answer;
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
mov eax, arg_index;
|
||||||
|
call call_addr;
|
||||||
|
mov answer, eax;
|
||||||
|
}
|
||||||
|
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scr_AddEntity(game::scriptInstance_t inst, gentity_s* ent)
|
||||||
|
{
|
||||||
|
static const auto call_addr = SELECT(0x0, 0x546D90);
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
mov edi, inst;
|
||||||
|
mov eax, ent;
|
||||||
|
call call_addr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pathnode_t* Scr_GetPathnode(scriptInstance_t inst)
|
||||||
|
{
|
||||||
|
static const auto call_addr = SELECT(0x0, 0x559E20);
|
||||||
|
pathnode_t* answer;
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
mov eax, inst;
|
||||||
|
call call_addr;
|
||||||
|
mov answer, eax;
|
||||||
|
}
|
||||||
|
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scr_MakeArray(scriptInstance_t inst)
|
||||||
|
{
|
||||||
|
static const auto call_addr = SELECT(0x0, 0x69A9D0);
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
mov eax, inst;
|
||||||
|
call call_addr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scr_AddArrayStringIndexed(scriptInstance_t inst, unsigned short id)
|
||||||
|
{
|
||||||
|
static const auto call_addr = SELECT(0x0, 0x69AAF0);
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
mov edi, inst;
|
||||||
|
mov cx, id;
|
||||||
|
call call_addr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* SL_ConvertToString(scriptInstance_t inst, unsigned short id)
|
||||||
|
{
|
||||||
|
static const auto call_addr = SELECT(0x0, 0x699F30);
|
||||||
|
const char* answer;
|
||||||
|
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
mov ecx, inst;
|
||||||
|
mov eax, id;
|
||||||
|
call call_addr;
|
||||||
|
mov answer, eax;
|
||||||
|
}
|
||||||
|
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
const char* Cmd_Argv(int index)
|
const char* Cmd_Argv(int index)
|
||||||
{
|
{
|
||||||
static const auto call_addr = SELECT(0x0, 0x435CE0);
|
static const auto call_addr = SELECT(0x0, 0x435CE0);
|
||||||
|
1341
src/game/structs.hpp
1341
src/game/structs.hpp
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,9 @@ namespace game
|
|||||||
WEAK symbol<void(con_channel_e channel, const char* fmt, ...)> Com_PrintF{ 0x0, 0x59A2C0 };
|
WEAK symbol<void(con_channel_e channel, const char* fmt, ...)> Com_PrintF{ 0x0, 0x59A2C0 };
|
||||||
WEAK symbol<dvar_s*(const char* name, dvarType_t type, DvarFlags flags, DvarValue dval, DvarLimits dom, const char* desc)> Dvar_RegisterVariant{ 0x0, 0x5EED90 };
|
WEAK symbol<dvar_s*(const char* name, dvarType_t type, DvarFlags flags, DvarValue dval, DvarLimits dom, const char* desc)> Dvar_RegisterVariant{ 0x0, 0x5EED90 };
|
||||||
|
|
||||||
|
WEAK symbol<void(scriptInstance_t inst)> Scr_AddArray { 0x0, 0x69AA50 };
|
||||||
|
WEAK symbol<int(scriptInstance_t inst, char* string, int user, unsigned int len)> SL_GetStringOfSize { 0x0, 0x68DE50 };
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
|
|
||||||
WEAK symbol<cmd_function_s*> cmd_functions{ 0x0, 0x1F416F4 };
|
WEAK symbol<cmd_function_s*> cmd_functions{ 0x0, 0x1F416F4 };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user