MantisBT - Zandronum
View Issue Details
0003045Zandronum[All Projects] Suggestionpublic2017-03-28 09:442017-04-16 13:09
Fused 
 
highfeatureN/A
closeddenied 
3.0-beta 
 
0003045: (named) RequestScriptPuke improvements
This feature is pretty underused, but for what it's being used for, it can be really tedious to use because of two things.

- Have the function check properly if it worked at all. There's a chance your connection may stutter when this exact packet is being send, causing the request to never be received. The current return value is useless anyway because the game will log everyone the requested script is not NET anyway.

- Remove the NET requirement in general. This probably exists because you can modify clientsided scripts in skins for some reason, but at the very least give it its own tag or something. I can't secure these scripts myself most of the time, and it just makes it worse when you keep your code open source.
No tags attached.
Issue History
2017-03-28 09:44FusedNew Issue
2017-03-28 10:06DuskNote Added: 0017062
2017-03-28 10:06DuskStatusnew => closed
2017-03-28 10:06DuskResolutionopen => denied
2017-03-28 10:14FusedNote Added: 0017063
2017-03-28 10:14FusedStatusclosed => feedback
2017-03-28 10:14FusedResolutiondenied => reopened
2017-03-28 10:15FusedNote Edited: 0017063bug_revision_view_page.php?bugnote_id=17063#r10277
2017-03-28 10:16FusedNote Edited: 0017063bug_revision_view_page.php?bugnote_id=17063#r10278
2017-03-28 13:57DuskNote Added: 0017064
2017-04-16 12:58KorshunNote Added: 0017153
2017-04-16 13:00KorshunNote Edited: 0017153bug_revision_view_page.php?bugnote_id=17153#r10319
2017-04-16 13:01KorshunNote Edited: 0017153bug_revision_view_page.php?bugnote_id=17153#r10320
2017-04-16 13:03KorshunNote Edited: 0017153bug_revision_view_page.php?bugnote_id=17153#r10321
2017-04-16 13:07KorshunNote Edited: 0017153bug_revision_view_page.php?bugnote_id=17153#r10322
2017-04-16 13:09DuskStatusfeedback => closed
2017-04-16 13:09DuskResolutionreopened => denied

Notes
(0017062)
Dusk   
2017-03-28 10:06   
You don't seem to understand. The function involves a client requesting a script call on the server, exactly what `puke` does.

Quote
- Have the function check properly if it worked at all. There's a chance your connection may stutter when this exact packet is being send, causing the request to never be received. The current return value is useless anyway because the game will log everyone the requested script is not NET anyway.

All client to server traffic can be lost, this includes chat messages, attack buttons (which causes dropped shots)... and puke calls.

Quote
- Remove the NET requirement in general. This probably exists because you can modify clientsided scripts in skins for some reason, but at the very least give it its own tag or something. I can't secure these scripts myself most of the time, and it just makes it worse when you keep your code open source.

Absolutely not! The 'Puke' is in the name for a reason. The function does what the 'puke' console command does. So whatever RequestScriptPuke can call, the 'puke' console command can as well. So if the NET requirement was dropped "for RequestScriptPuke", it would also be dropped for the 'puke' command and that wouldn't be very great.
(0017063)
Fused   
2017-03-28 10:14   
(edited on: 2017-03-28 10:16)
Quote
All client to server traffic can be lost, this includes chat messages, attack buttons (which causes dropped shots)... and puke calls.


That's not as bad as having your whole mod desync because one script needs this function and it happends to mess up at this moment. It seems like this function purely exists as a sign of 'we can do this in our game', but not as much for 'you can actually use it in your mod', because of the flaws, which sucks because it's super useful if done right.

Quote
Absolutely not! The 'Puke' is in the name for a reason. The function does what the 'puke' console command does. So whatever RequestScriptPuke can call, the 'puke' console command can as well. So if the NET requirement was dropped "for RequestScriptPuke", it would also be dropped for the 'puke' command and that wouldn't be very great.


So does this mean the function is partially using puke to achieve what it does? Why? Why not make it a seperate function and have it check for a 'REQUESTABLE' tag or something? It's possible with puke obviously, so this shouldbe possible too

(0017064)
Dusk   
2017-03-28 13:57   
Quote

That's not as bad as having your whole mod desync because one script needs this function and it happends to mess up at this moment. It seems like this function purely exists as a sign of 'we can do this in our game', but not as much for 'you can actually use it in your mod', because of the flaws, which sucks because it's super useful if done right.

Sure but it'd require large rewrites on the netcode side to make it possible. For the function itself it is not possible.

Quote

So does this mean the function is partially using puke to achieve what it does? Why? Why not make it a seperate function and have it check for a 'REQUESTABLE' tag or something? It's possible with puke obviously, so this shouldbe possible too

It is not just partially using puke, it is specifically using it. The server cannot differentiate between consolecommand puke calls and ACS puke calls. If you try to differentiate it with a "REQUESTABLE" tag, a modified client could call those with the console anyway. The server only sees script call requests. It cannot tell where they originated from.
(0017153)
Korshun   
2017-04-16 12:58   
(edited on: 2017-04-16 13:07)
Making RequestScriptPuke return actual success or failure will make it wait some milliseconds. Currently, RequestScriptPuke is instant and can't be modified without breaking mods. If this is implemented, it should use a separate set of functions, like ReliablePuke(Named).

Modders can implement a system that replicates reliable puke:

while (!ScriptHasBeenRun())
{
    RequestScriptPuke(serversidescript, 0, 0, 0);
    Delay(10);
}

With serverside protection against double puke.

But ReliablePuke would be easier to use.

Actually, this would be implementable as an ACS library. But it would be a lot more efficient if'http://zandronum.com/tracker/view.php?id=2751 [^]' was implemented. And it would be nicer if custom latent functions were allowed.