Looks fine, so I added your patches. I think it would be good it it's thoroughly tested and discussed in the corresponding tickets on our tracker.
Reply To torr_samaho
Looks fine, so I added your patches. I think it would be good it it's thoroughly tested and discussed in the corresponding tickets on our tracker.
I was able to do a quick test with two computers to see if these functions worked as intended before submitting them here. Everything seemed to work as they should without any issues or side effects. I do agree with you though, these still need to be thoroughly tested and discussed more on their corresponding tickets.
The following patches add new ACS functions to Zandronum that can be extremely useful for clientsided scripting: ExecuteClientScript, NamedExecuteClientScript, SendNetworkString, and NamedSendNetworkString. These patches address tickets: https://zandronum.com/tracker/view.php?id=2751 and https://zandronum.com/tracker/view.php?id=2836 on the tracker.
ExecuteClientScript works almost exactly like ACS_ExecuteWithResult, except it lets the server send the command for only one client as opposed to all of them, which can optimize net traffic especially if script arguments need to be passed. This way, clients who aren't supposed to execute these scripts never get the command to do so. Apart from single player, this function only works on the server and if the script to be executed has the CLIENTSIDE flag.
SendNetworkString allows ACS strings to be sent easily between server and client, and vice versa. The string is then passed as the first argument of the script. If called on the server's end, the script to be executed must have the CLIENTSIDE flag. Likewise, if called on the client's end, the script to be executed must have the NET flag, just like with RequestScriptPuke. Additionally, there's no guarantee that strings sent by the client will reach the server, so modders still need to be mindful of that. Currently, only the string can be passed with this script, so additional arguments aren't supported.