MantisBT - Zandronum
View Issue Details
0002598Zandronum[All Projects] Bugpublic2016-01-27 08:472018-09-30 21:40
throwaway 
Dusk 
normalminoralways
closedfixed 
2.1 
2.22.2 
0002598: ACS_ExecuteAlways from server to client corrupts negative arguments
When running ACS_ExecuteAlways on a clientside script from the server, any argument from -1 to -128 gets corrupted to 256+<value>. Anything positive, or lower than -128, is unaffected.
1. Host test.pk3.
2. Join server hosting test.pk3.
3. 'puke 1'
4. It should print -1, but prints 255 instead.
No tags attached.
? test.pk3 (8,029) 2016-01-27 08:47
https://zandronum.com/tracker/file_download.php?file_id=1715&type=bug
Issue History
2016-01-27 08:47throwawayNew Issue
2016-01-27 08:47throwawayFile Added: test.pk3
2016-01-29 18:57cruduxyNote Added: 0014225
2016-01-29 20:49DuskNote Added: 0014228
2016-01-29 20:49DuskAssigned To => Dusk
2016-01-29 20:49DuskStatusnew => assigned
2016-01-29 21:04throwawayNote Added: 0014230
2016-01-29 21:10DuskNote Added: 0014232
2016-01-29 21:10DuskStatusassigned => needs review
2016-01-29 21:12DuskNote Edited: 0014232bug_revision_view_page.php?bugnote_id=14232#r8594
2016-01-29 22:35throwawayNote Added: 0014233
2016-01-30 13:48cobaltStatusneeds review => needs testing
2016-01-30 13:48cobaltTarget Version => 2.2
2016-01-30 13:48cobaltSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8597#r8597
2016-01-30 13:48cobaltNote Added: 0014241
2016-01-30 13:48DuskStatusneeds testing => resolved
2016-01-30 13:48DuskFixed in Version => 2.2
2016-01-30 13:48DuskResolutionopen => fixed
2018-09-30 21:40Blzut3Statusresolved => closed

Notes
(0014225)
cruduxy   
2016-01-29 18:57   
Running client-sided scripts on the servers is the biggest problem here. The server should just print -Warning : DO NOT USE CLIENT SIDED SCRIPTS SERVER SIDE-
(0014228)
Dusk   
2016-01-29 20:49   
Hmm how did this manage to break? Oh well...

Quote
Running client-sided scripts on the servers is the biggest problem here. The server should just print -Warning : DO NOT USE CLIENT SIDED SCRIPTS SERVER SIDE-


Nonsense.
(0014230)
throwaway   
2016-01-29 21:04   
The clientside script is not running on the server, as Print(d:ConsolePlayerNumber()) would confirm. Only ACS_ExecuteWithResult can get the server to run clientside scripts itself, and this is using ACS_ExecuteAlways.
(0014232)
Dusk   
2016-01-29 21:10   
(edited on: 2016-01-29 21:12)
'https://bitbucket.org/Torr_Samaho/zandronum-stable/pull-requests/23 [^]'

Quote

Only ACS_ExecuteWithResult can get the server to run clientside scripts itself, and this is using ACS_ExecuteAlways.

This sounds like a bug. Though of course the server cannot get the result back from the client (fast enough anyway, the server would freeze until the answer is back), the server shouldn't in any circumstance run CLIENTSIDE scripts.

(0014233)
throwaway   
2016-01-29 22:35   
Fix confirmed to work.
(0014241)
cobalt   
2016-01-30 13:48   
Issue addressed by commit 9b42fb72d71c: Fixed: Server-to-client ACS script calls would corrupt arguments within the range [-128, -1], fixes 2598
Committed by Teemu Piippo [Dusk] on Wednesday 31 December 1969 23:59:57

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/cl_main.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)