Skip to content

Commit ef8cdb4

Browse files
committed
steam network temporary fix
1 parent d87199a commit ef8cdb4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

data/cage/shaders/functions/sampleTextureAnimation.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vec4 sampleTextureAnimation(sampler2DArray tex, vec2 uv, vec4 anim, vec4 mat)
1212
else
1313
sampl = clamp(sampl, 0, float(frames) - 1);
1414
int i = int(sampl) % frames;
15-
float f = sampl - float(int(sampl));
15+
float f = sampl - float(int(sampl));
1616
vec4 a = texture(tex, vec3(uv, float(i)));
1717
vec4 b = texture(tex, vec3(uv, float((i + 1) % frames)));
1818
return mix(a, b, f);

sources/libcore/network/steam.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "net.h"
1212

1313
#include <cage-core/concurrent.h>
14+
#include <cage-core/math.h>
1415
#include <cage-core/concurrentQueue.h>
1516
#include <cage-core/endianness.h>
1617
#include <cage-core/networkSteam.h>
@@ -95,7 +96,9 @@ namespace cage
9596
return SeverityEnum::Note;
9697
}
9798
}();
98-
CAGE_LOG(level, "steamsocks", pszMsg);
99+
const uint32 len = min((uint32)std::strlen(pszMsg), (uint32)500);
100+
const String msg = String(PointerRange<const char>(pszMsg, pszMsg + len));
101+
CAGE_LOG(level, "steamsocks", msg);
99102
}
100103

101104
#if defined(CAGE_USE_STEAM_SDK)
@@ -153,7 +156,7 @@ namespace cage
153156
utils->SetDebugOutputFunction((ESteamNetworkingSocketsDebugOutputType)(sint32)confDebugLogLevel, &debugOutputHandler);
154157
utils->SetGlobalConfigValueFloat(k_ESteamNetworkingConfig_FakePacketLoss_Send, confSimulatedPacketLoss * 100);
155158
utils->SetGlobalConfigValueInt32(k_ESteamNetworkingConfig_FakePacketLag_Send, (sint32)confSimulatedPacketDelay);
156-
utils->SetGlobalConfigValueInt32(k_ESteamNetworkingConfig_IPLocalHost_AllowWithoutAuth, 1);
159+
//utils->SetGlobalConfigValueInt32(k_ESteamNetworkingConfig_IPLocalHost_AllowWithoutAuth, 1);
157160
}
158161
};
159162
static InitializerConfiguration initializerConfiguration;

0 commit comments

Comments
 (0)