Damn, I'm stuck. There is some bug in calling "execute command" command (like sv_map_reset, sv_map_next, etc.) from sapp... Both this 2 calling method have the same fault:
//1st, orig;
ExecuteCommandRaw = ( int(__cdecl*)(const char*) ) 0x0047EA30;
int ( __cdecl *ExecuteCommandRaw)(const char *cmd);
int result = ExecuteCommandRaw(command.c_str());
//2nd
long addr = 0x004B3990; // the highest call, in the end this call 0x0047EA30
char* cmd = (char*)command.c_str();
__asm
{
pushad
pushfd
mov edi, cmd
call addr
popfd
popad
}
both can successfully execute commands EXCEPT the "sv_map map mode" command. Well also this too, but then SOMETIMES Halo gets Access Violation error and crash. Sometimes for the first execute, sometimes just for the idk 5th.. Any ideas y dis happens?
Bookmarks