Closed surv0013 closed 1 month ago
There shouldn't be any effect - Player.ReceiveTakeScreenshot
and the related code don't check the plugin widget flags. Are you sure?
I add a UI effect and a modal flag with a blur and without a dot to the player, and then I try to take a screenshot, the screenshot does not arrive on the server.
EffectManager.sendUIEffect(id, key, SteamPlayer.transportConnection, true);
Player.setAllPluginWidgetFlags((Player.pluginWidgetFlags | EPluginWidgetFlags.Modal) & ~EPluginWidgetFlags.ShowCenterDot);
I double-checked and it seemed to work fine for me. I ran the same code from the server to set the modal flag and disable the center dot flag, then I ran the spy command from the server console and the image showed up in the server folder. Could you send the client and server logs after reproducing it please? Maybe there's a related error. That said, I'm very skeptical that this is a vanilla bug because the spy functionality and UI effects + widget flags are entirely unrelated.
The screenshot gets rejected by this check. You can replicate it in singleplayer on Buak by spying yourself at this position but it will not work.
Also, for some reason, neither GitHub nor Imgur allows me to upload the Spy.jpg file. Even when I zip it.
The screenshot gets rejected by this check. You can replicate it in singleplayer on Buak by spying yourself at this position but it will not work.
Hmm, he’s right, apparently, due to the complex UI, which has many icons and colors, the file weight exceeds the maximum available.
UPD: And yet, on our server there are slightly non-standard textures that contain a deep color palette, perhaps this also indirectly affects the result.
Thanks @CyberAndrii! I should add logging to the client for that case. Ideally it would be nice to have a better way to send larger packets between client and server. Internally I don't think there's limit, or at least old Steam Networking docs mentioned it was fine to send multi-megabyte buffers, but the game still assumes the message fits within a few kilobytes.
Steam seems to have some kind of internal limit or buffer of around 65kb of data in the send buffer, even if the send buffer size is configured higher. Maybe I'm doing something wrong but i had to create a wrapper class to send larger packets slowly for my multiplayer map editor module. I needed to send the Map.png and Chart.png files to the server which can be quite large. You can see my implementation here if you like but its a bit messy. You could probably safely up the 30k limit to like 45k-55k without any changes though.
Steam seems to have some kind of internal limit or buffer of around 65kb
It may well be that the limit variable is of type ushort
.
In the next version it logs if the jpg size is too big. Also, I raised the limit from 30 KB to 40 KB.
The screenshot does not occur if the player has a modal* window enabled.
*I'm talking about plugin flags.