Small fix

This commit is contained in:
Federico Cecchetto 2022-05-28 19:02:02 +02:00
parent 30f6333c17
commit 93a0d730a4
2 changed files with 10 additions and 10 deletions

View File

@ -352,7 +352,7 @@ namespace command
for (int i = 0; i < com_num_console_lines; i++)
{
game::Cmd_TokenizeString(com_console_lines[i]); // need to re-create this function
game::Cmd_TokenizeString(com_console_lines[i]);
// only +set dvar value
if (game::Cmd_Argc() >= 3 && game::Cmd_Argv(0) == "set"s && game::Cmd_Argv(1) == dvar)
@ -360,7 +360,7 @@ namespace command
game::Dvar_SetCommand(game::generateHashValue(game::Cmd_Argv(1)), "", game::Cmd_Argv(2));
}
game::Cmd_EndTokenizeString(); // need to re-create this function
game::Cmd_EndTokenizeString();
}
}

View File

@ -229,8 +229,8 @@ namespace network
}
// redirect dw_sendto to raw socket
utils::hook::jump(0x5EEC90_b, dw_send_to_stub, true);
utils::hook::jump(game::Sys_SendPacket, dw_send_to_stub, true);
utils::hook::jump(0x5EEC90_b, dw_send_to_stub);
utils::hook::jump(game::Sys_SendPacket, dw_send_to_stub);
// intercept command handling
utils::hook::jump(0x12F387_b, utils::hook::assemble(handle_command_stub), true);
@ -238,8 +238,8 @@ namespace network
// handle xuid without secure connection
utils::hook::nop(0x554222_b, 6);
utils::hook::jump(0x4F1800_b, net_compare_address, true);
utils::hook::jump(0x4F1850_b, net_compare_base_address, true);
utils::hook::jump(0x4F1800_b, net_compare_address);
utils::hook::jump(0x4F1850_b, net_compare_base_address);
// don't establish secure conenction
utils::hook::set<uint8_t>(0x358C8D_b, 0xEB);
@ -278,7 +278,7 @@ namespace network
dvars::override::register_int("sv_remote_client_snapshot_msec", 33, 33, 100, game::DVAR_FLAG_NONE);
// ignore impure client
utils::hook::jump(0x54EDD3_b, 0x54EE69_b, true);
utils::hook::jump(0x54EDD3_b, 0x54EE69_b);
// don't send checksum
utils::hook::set<uint8_t>(0x59E628_b, 0);
@ -287,11 +287,11 @@ namespace network
utils::hook::set(0x59E8B0_b, 0xC301B0);
// don't try to reconnect client
utils::hook::jump(0x54D220_b, reconnect_migratated_client, true);
utils::hook::jump(0x54D220_b, reconnect_migratated_client);
utils::hook::nop(0x54E168_b, 4); // this crashes when reconnecting for some reason
// allow server owner to modify net_port before the socket bind
utils::hook::call(0x5BD2B5_b, register_netport_stub);
utils::hook::call(0x5BD032_b, register_netport_stub);
utils::hook::call(0x5BD3F0_b, register_netport_stub);
// increase allowed packet size
@ -311,7 +311,7 @@ namespace network
// Use our own socket since the game's socket doesn't work with non localhost addresses
// why? no idea
utils::hook::jump(0x5BD210_b, create_socket, true);
utils::hook::jump(0x5BD210_b, create_socket);
}
}
};