Ticket #41075

New networking ACS functions

Open Date: 2020-12-27 13:45 Last Update: 2020-12-28 06:16

Reporter:
Owner:
(None)
Type:
Status:
Closed
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Accepted
File:
2

Details

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.

Ticket History (3/7 Histories)

2020-12-27 13:45 Updated by: akmdm
  • New Ticket "New networking ACS functions" created
2020-12-27 13:46 Updated by: akmdm
  • Details Updated
2020-12-28 06:06 Updated by: torr_samaho
Comment

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.

2020-12-28 06:06 Updated by: torr_samaho
  • Resolution Update from None to Accepted
  • Status Update from Open to Closed
2020-12-28 06:16 Updated by: akmdm
Comment

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.

Attachment File List

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login