mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-04 02:55:50 +03:00
Fixed the "server failed to transmit file 'AY&SY..." bug
This commit is contained in:
parent
b08e7cb679
commit
328c32f8c9
@ -4619,6 +4619,12 @@ void SV_UpdateToReliableMessages(void)
|
|||||||
SZ_Clear(&g_psv.spectator);
|
SZ_Clear(&g_psv.spectator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Fix for the "server failed to transmit file 'AY&SY..." bug
|
||||||
|
//https://github.com/dreamstalker/rehlds/issues/38
|
||||||
|
#ifdef REHLDS_FIXES
|
||||||
|
bool svReliableCompressed = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Send broadcast data
|
// Send broadcast data
|
||||||
for (i = 0; i < g_psvs.maxclients; i++)
|
for (i = 0; i < g_psvs.maxclients; i++)
|
||||||
{
|
{
|
||||||
@ -4626,6 +4632,19 @@ void SV_UpdateToReliableMessages(void)
|
|||||||
|
|
||||||
if (!client->fakeclient && client->active)
|
if (!client->fakeclient && client->active)
|
||||||
{
|
{
|
||||||
|
//Fix for the "server failed to transmit file 'AY&SY..." bug
|
||||||
|
//https://github.com/dreamstalker/rehlds/issues/38
|
||||||
|
#ifdef REHLDS_FIXES
|
||||||
|
if (!svReliableCompressed && g_psv.reliable_datagram.cursize + client->netchan.message.cursize < client->netchan.message.maxsize)
|
||||||
|
{
|
||||||
|
SZ_Write(&client->netchan.message, g_psv.reliable_datagram.data, g_psv.reliable_datagram.cursize);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Netchan_CreateFragments(TRUE, &client->netchan, &g_psv.reliable_datagram);
|
||||||
|
svReliableCompressed = true;
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (g_psv.reliable_datagram.cursize + client->netchan.message.cursize < client->netchan.message.maxsize)
|
if (g_psv.reliable_datagram.cursize + client->netchan.message.cursize < client->netchan.message.maxsize)
|
||||||
{
|
{
|
||||||
SZ_Write(&client->netchan.message, g_psv.reliable_datagram.data, g_psv.reliable_datagram.cursize);
|
SZ_Write(&client->netchan.message, g_psv.reliable_datagram.data, g_psv.reliable_datagram.cursize);
|
||||||
@ -4634,6 +4653,7 @@ void SV_UpdateToReliableMessages(void)
|
|||||||
{
|
{
|
||||||
Netchan_CreateFragments(TRUE, &client->netchan, &g_psv.reliable_datagram);
|
Netchan_CreateFragments(TRUE, &client->netchan, &g_psv.reliable_datagram);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (g_psv.datagram.cursize + client->datagram.cursize < client->datagram.maxsize)
|
if (g_psv.datagram.cursize + client->datagram.cursize < client->datagram.maxsize)
|
||||||
{
|
{
|
||||||
|
@ -1055,7 +1055,7 @@
|
|||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>REHLDS_FLIGHT_REC;REHLDS_OPT_PEDANTIC;REHLDS_SELF;REHLDS_CHECKS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>REHLDS_FIXES;REHLDS_FLIGHT_REC;REHLDS_OPT_PEDANTIC;REHLDS_SELF;REHLDS_CHECKS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
Loading…
Reference in New Issue
Block a user