Anonymous | Login | Signup for a new account | 2024-04-25 07:21 UTC |
My View | View Issues | Change Log | Roadmap | Zandronum Issue Support Ranking | Rules | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0002670 | Zandronum | [All Projects] Bug | public | 2016-03-07 04:16 | 2018-09-30 21:50 | ||||
Reporter | throwaway | ||||||||
Assigned To | Torr Samaho | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 3.0-beta | ||||||||
Target Version | 3.0 | Fixed in Version | 3.0 | ||||||
Summary | 0002670: ACS_NamedExecuteWithResult on clientside script online - arguments get shifted as it goes to client | ||||||||
Description | Simple enough. Arguments from ACS_NamedExecuteWithResult on a clientside script, when getting sent to the client, all get shifted to the left by 1. <arg1, arg2, arg3, arg4> becomes <arg2, arg3, arg4, 0>. | ||||||||
Steps To Reproduce | Take these two scripts: script "y" (int a1, int a2, int a3) { ACS_NamedExecuteWithResult("z", a1,a2,a3); } script "z" (int a1, int a2, int a3) clientside { Log(s:"<", d:a1, s:", ", d:a2, s:", ", d:a3, s:">"); } 1. Join a netgame with those two scripts and sv_cheats on. 2. Go to console 3. pukename y 1 2 3 You should see "<1, 2, 3>" get logged. Offline, it does. Online, "<2, 3, 0>" gets logged instead. | ||||||||
Attached Files | acsexecrestest.pk3 [^] (656 bytes) 2016-09-17 15:10 | ||||||||
Notes | |
(0014565) Dusk (developer) 2016-03-07 09:04 |
There's two problems here: - the server indeed sends the incorrect arguments to the client, because it was copy/pasted from ACS_ExecuteWithResult without adjusting the arguments in relation to the missing map parameter. Thanks, Carn. - ACS_(Named)ExecuteWithResult shouldn't be used to execute clientside scripts like this. The point of the function is to immediately call the script and request the result value from it. The client/server mechanism provides neither. Since it's not working at all in the first place, there shouldn't be any mods relying on it, so I suggest we disable it. |
(0014567) Fused (reporter) 2016-03-07 12:12 |
Having it work in clientsided scripts can create nice features though. For example I wanted to create a waterfall that has a different translucency for software users, because it looks different compared to opengl. Same goes for other clientsided actors that could support software mode in a way. |
(0014568) throwaway (reporter) 2016-03-07 19:19 |
If you're going to disable it, print a warning the first time the scripts tries to WithResult a clientside script online, because I ran into this entirely by accident. (I use ExecuteWithResult to instantly execute tracer scripts in single player, without the potential inexplicable one-tic delay of ExecuteAlways) |
(0014569) Catastrophe (reporter) 2016-03-08 01:41 edited on: 2016-03-08 01:42 |
> Having it work in clientsided scripts can create nice features though. For example I wanted to create a waterfall that has a different translucency for software users, because it looks different compared to opengl. Same goes for other clientsided actors that could support software mode in a way. Sorry but gotta agree with Dusk here. ACS_executewithresult needs to return something immediately. Using it for client-server communication is a big no-no due to latency. However, if you are using ACS_executewithresult on clientside script to clientside script, then you should be fine. The examples you gave can be more or less done purely with clientside scripts only. |
(0014570) FascistCat (reporter) 2016-03-08 17:24 edited on: 2016-03-08 17:25 |
Maybe the same issue happens (where values are handled with an offset) when returning values using clientside scripts like here:'http://zandronum.com/tracker/view.php?id=2367 [^]' , because the returning value is always zero on a netgame. |
(0014571) Dusk (developer) 2016-03-10 11:36 |
Quote from "Fused" That has nothing to do with ACS_(Named)ExecuteWithResult in particular. That simply relies on server→client ACS calls that work with ACS_(Named)Execute(Always). Quote from "FascistCat" That is a different issue, relating to DECORATE. |
(0014720) Leonard (developer) 2016-04-16 18:55 |
Of course the return value problem is hopeless but ACS_ExecuteWithResult supports a 4th argument that no other ACS-calling function has and this advantage could be useful even for clientside scripts. |
(0014772) Fused (reporter) 2016-04-30 09:31 |
We've been using a non-official 3.0 binary that properly handles this to properly test our mod since a few weeks now. Will this be addressed at all? At the very least the arguments shouldn't be shifted on the clients and the 4th argument should be useable as it is very useful in many cases. |
(0015242) Torr Samaho (administrator) 2016-07-09 17:38 |
The arguments definitely shouldn't be shifted on the clients. If you add a minimal example wad, I'll look into this. Would also be helpful if you post the code changes of the non-official binary you are using. |
(0015645) Fused (reporter) 2016-09-16 19:18 edited on: 2016-09-16 19:18 |
Sorry, but the binary was kind of lost as time passed because it was not going to get updated every time a new 3.0 build was released. Has there been progress on this? I can't work without this because of desync, and it's a pretty bad bug. |
(0015646) Torr Samaho (administrator) 2016-09-17 08:35 |
I'm still waiting for the minimal example wad I asked for two months ago. Also disclosing the code changes of the non-official binary would be helpful. |
(0015647) Ivan (reporter) 2016-09-17 14:14 |
Made the example wad as the OP suggested:'https://www.dropbox.com/s/x572n4gl7n2yi2l/acsexecrestest.pk3?dl=0 [^]' However I see nothing online for some reason. Offline works fine. |
(0015648) Torr Samaho (administrator) 2016-09-17 15:13 |
As far as I can tell, the script "Y" was not flagged as CLIENTSIDE in the compiled ACS lump in your example pk3. I recompiled the ACS source and uploaded the result. When using this, the CLIENTSIDE script is executed on the clients. I also fixed the argument shifting. Note: Currently, ACS_ExecuteWithResult still only supports three arguments on CLIENTSIDE scripts. |
(0015649) Ivan (reporter) 2016-09-17 15:34 |
It indeed wasn't, as I just copied the example scripts provided in the OP. The OP forgot CLIENTSIDE on script "y" which caused the problem on my end. |
(0016694) Ru5tK1ng (updater) 2017-01-26 05:59 |
Tested with the latest changes and the argument shifting seems to be gone now. |
This issue is already marked as resolved. If you feel that is not the case, please reopen it and explain why. |
|
Supporters: | fr-blood FascistCat Leonard Fused |
Opponents: | No one explicitly opposes this issue yet. |
Issue History | |||
Date Modified | Username | Field | Change |
2016-03-07 04:16 | throwaway | New Issue | |
2016-03-07 09:04 | Dusk | Note Added: 0014565 | |
2016-03-07 12:12 | Fused | Note Added: 0014567 | |
2016-03-07 19:19 | throwaway | Note Added: 0014568 | |
2016-03-08 01:41 | Catastrophe | Note Added: 0014569 | |
2016-03-08 01:42 | Catastrophe | Note Edited: 0014569 | View Revisions |
2016-03-08 17:24 | FascistCat | Note Added: 0014570 | |
2016-03-08 17:25 | FascistCat | Note Edited: 0014570 | View Revisions |
2016-03-10 11:36 | Dusk | Note Added: 0014571 | |
2016-04-16 18:55 | Leonard | Note Added: 0014720 | |
2016-04-30 09:31 | Fused | Note Added: 0014772 | |
2016-07-09 17:38 | Torr Samaho | Note Added: 0015242 | |
2016-07-09 17:38 | Torr Samaho | Assigned To | => Torr Samaho |
2016-07-09 17:38 | Torr Samaho | Status | new => feedback |
2016-09-16 19:18 | Fused | Note Added: 0015645 | |
2016-09-16 19:18 | Fused | Note Edited: 0015645 | View Revisions |
2016-09-17 08:35 | Torr Samaho | Note Added: 0015646 | |
2016-09-17 14:14 | Ivan | Note Added: 0015647 | |
2016-09-17 14:44 | Torr Samaho | File Added: acsexecrestest.pk3 | |
2016-09-17 14:56 | Torr Samaho | File Deleted: acsexecrestest.pk3 | |
2016-09-17 15:10 | Torr Samaho | File Added: acsexecrestest.pk3 | |
2016-09-17 15:13 | Torr Samaho | Note Added: 0015648 | |
2016-09-17 15:13 | Torr Samaho | Status | feedback => needs testing |
2016-09-17 15:34 | Ivan | Note Added: 0015649 | |
2016-12-24 22:42 | Dusk | Target Version | => 3.0 |
2017-01-26 05:59 | Ru5tK1ng | Note Added: 0016694 | |
2017-01-26 05:59 | Ru5tK1ng | Status | needs testing => resolved |
2017-01-26 05:59 | Ru5tK1ng | Resolution | open => fixed |
2017-01-26 05:59 | Ru5tK1ng | Fixed in Version | => 3.0 |
2018-09-30 21:50 | Blzut3 | Status | resolved => closed |
Copyright © 2000 - 2024 MantisBT Team |