-
Автор темы
- #1
Been trying for hours. Whenever I use my cmd pointer to access something, it crashes.
screenshot of the crash:
The code for the CreateMove proxy and the function it calls:
screenshot of the crash:
Пожалуйста, авторизуйтесь для просмотра ссылки.
The code for the CreateMove proxy and the function it calls:
Код:
static void __stdcall CreateMove(int sequenceNumber, float inputSampleFrametime, bool isActive, bool& sendPacket) noexcept
{
// process original CHLClient::CreateMove -> CInput::CreateMove
h::CreateMoveOriginal(i::client, 0, sequenceNumber, inputSampleFrametime, isActive);
UserCmd* cmd = i::input->GetUserCmd(sequenceNumber);
VerifiedUserCmd* verifiedCmd = i::input->GetVerifiedUserCmd(sequenceNumber);
// check do we have valid commands, finished signing on to server and not playing back demos (where our commands are ignored)
if (!cmd || !isActive || !cmd->commandNumber)
return;
verifiedCmd->userCmd = *cmd;
verifiedCmd->hashCrc = cmd->GetChecksum();
}
__declspec(naked) void __stdcall h::CreateMoveProxy(BaseClientDll* thisptr, int edx, int sequenceNumber, float inputSampleFrametime, bool isActive)
{
__asm
{
push ebp
mov ebp, esp;
push ebx; // bSendPacket
push esp;
push dword ptr[isActive]; // ebp + 16
push dword ptr[inputSampleFrametime]; // ebp + 12
push dword ptr[sequenceNumber]; // ebp + 8
call CreateMove
pop ebx
pop ebp
retn 0Ch
}
}
Вложения
-
65.8 KB Просмотры: 53