fix Sys_SendPacket dying?
This commit is contained in:
parent
64dbdba3f2
commit
36bd1df1cd
@ -250,14 +250,14 @@ namespace network
|
|||||||
void send_data(const game::netadr_s& address, const std::string& data)
|
void send_data(const game::netadr_s& address, const std::string& data)
|
||||||
{
|
{
|
||||||
auto size = static_cast<int>(data.size());
|
auto size = static_cast<int>(data.size());
|
||||||
if (size > 1280)
|
|
||||||
{
|
|
||||||
console::error("Packet was too long. Truncated!\n");
|
|
||||||
size = 1280;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (address.type == game::NA_LOOPBACK)
|
if (address.type == game::NA_LOOPBACK)
|
||||||
{
|
{
|
||||||
|
if (size > 1280)
|
||||||
|
{
|
||||||
|
console::error("Packet was too long. Truncated!\n");
|
||||||
|
size = 1280;
|
||||||
|
}
|
||||||
|
|
||||||
game::NET_SendLoopPacket(game::NS_CLIENT1, size, data.data(), &address);
|
game::NET_SendLoopPacket(game::NS_CLIENT1, size, data.data(), &address);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user