Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000799Zandronum[All Projects] Bugpublic2012-04-22 01:382018-09-30 20:45
ReporterMediumTank 
Assigned ToTorr Samaho 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version98d 
Target Version1.1Fixed in Version1.1 
Summary0000799: 98e - Running more than one CLIENTSIDE script transfers to all other players upon activator disconnecting
DescriptionPretend player 1, 2 and 3 connect:

In the attached wad, if player 1 pukes script 01 (which is NET CLIENTSIDE), it will invoke ACS_ExecuteAlways for scripts 02, 03, and 04 (of which are all CLIENTSIDE, no 'NET' is on them).

Upon doing so, player 1 will see the text, player 2 and player 3 will *not* see any of the text, which shows that it is successfully clientsided for player 1. Note that the scripts will continue printing a string every few tics, I tried it with both Restart; and while(true) { ... } replacing 'restart;' to see if maybe the Restart ACS command did something, but both gave the same result.

Now when player 1 disconnects, script 02 is terminated and does not appear on any of the clients. This one is run first.
Script 03 and 04 however are passed on to all the other clients, and the ACS script runs on their client.



Therefore from what I've seen, when you run X amount of clientside scripts, the very first one successfully terminates upon quitting (or isn't passed onto everyone else), but the rest just execute for everyone.
This in turn limits only one clientside script being able to run for each player. Maybe this is how it's supposed to be and it's not a bug. I have to re-think a part of my wad now though because there's the possibility of a player quitting while a second one is running and that'd mess up everyone else's screen.


I have not investigated how functions work on clientside scripts or any other things. If you want more data just tell me what to do and I'll go see what happens. This was online btw.
Steps To Reproduce1. Open .wad file attached

2. Join 2+ players to an online game

3. Have one of them type "puke 1" in console

4. Quit Game for the player who puked script 1, then switch over to the other player(s) to see 2 of the 3 scripts suddenly start running on the non-invoker's machine
Additional Information#include "zcommon.acs"
#library "AHCRAP"

int serverNum = 2;

Script 1 (void) NET CLIENTSIDE
{
    ACS_ExecuteAlways(2, 0);
    ACS_ExecuteAlways(3, 0);
    ACS_ExecuteAlways(4, 0);
}

Script 2 (void) CLIENTSIDE
{
    int tid = ActivatorTID();
    int pn = PlayerNumber();
    serverNum = 8;
    while (true) {
        Print(d: serverNum, s: " _ Tid ", d: tid, s: ", PlayerNum ", d: pn, s: " = ", d: GetActorProperty(0, APROP_HEALTH));
        delay(35);
    }
    restart;
}

Script 3 (void) CLIENTSIDE
{
    serverNum = 1;
    Print(s: "Servernum = ", d: serverNum);
    delay(25);
    restart;
}

// Show that more than one clientside script gets messed up
Script 4 (void) CLIENTSIDE
{
    Print(s: "Omg script 4 is at it again");
    delay(53);
    restart;
}
Attached Files? file icon ClientsideProblems.wad [^] (1,208 bytes) 2012-04-22 01:38
? file icon script_clientside_disconnect_01.wad [^] (1,915 bytes) 2012-05-05 15:50
? file icon script_spectator_activator_01.wad [^] (2,226 bytes) 2012-05-08 03:04

- Relationships
related to 0000810closedTorr Samaho CLIENTSIDE ACS Script 1 floods the server and clients with data, extreme packet loss 

-  Notes
User avatar (0003379)
MediumTank (reporter)
2012-04-22 01:41

This may help:
98e alpha: r120405-0228
User avatar (0003380)
Torr Samaho (administrator)
2012-04-22 02:25

FYI, CLIENTSIDE does not mean that the script is only run on the activator's client. These scripts are run on all clients. If you replace Print by Printbold you should see this.

One potential bug I see here is that CLIENTSIDE scripts are likely not terminated when the activating player disconnects, even though they should be. I'll look into this.
User avatar (0003383)
MediumTank (reporter)
2012-04-22 15:14

> If you replace Print by Printbold you should see this.

I tried substituting PrintBold in for Print and I didn't see anything come out on other clients, just the client itself.
I loaded up the wad again this morning and I have no idea why it's working as normal.


For the clientside scripts not being terminated, would 'developer true' show that?
User avatar (0003433)
Torr Samaho (administrator)
2012-04-26 00:34

Some more clarifications: Puking NET CLIENTSIDE on a client, will only run the script on the client. If the server is instructed to start a CLIENTSIDE script (by puking, ACS_Execute, player entering the game, etc.), the server will not run the script, but tells all clients to do so.

0000810 of course affects this example wad, so if this ticket is meant to report a different problem, please supply an example wad that doesn't use 1 as script number.

This should fix that clients don't terminate CLIENTSIDE scripts whose activator is a player if that player disconnects. I couldn't test this fix though since I didn't have an appropriate example wad hand.
User avatar (0003563)
unknownna (updater)
2012-05-05 15:46

> This should fix that clients don't terminate CLIENTSIDE scripts whose activator is a player if that player disconnects.

It fixed the issue. It also works with the new compatflag. But switches that execute client-side scripts don't animate or play any sounds online.

What about scripts that are puked as a spectator? They aren't terminated when you turn into a player. And they aren't terminated when you turn into a spectator again or disconnect either.

Are non-CLIENTSIDE scripts executed within CLIENTSIDE scripts counted as CLIENTSIDE scripts?
User avatar (0003593)
Torr Samaho (administrator)
2012-05-08 02:04

> But switches that execute client-side scripts don't animate or play any sounds online.

Sounds like a completely different issue. Is this what script_clientside_disconnect_01.wad is supposed to show (didn't have a chance to check the wad yet)?

> What about scripts that are puked as a spectator? They aren't terminated when you turn into a player. And they aren't terminated when you turn into a spectator again or disconnect either.

Spectator are supposed not to be part of the game. According to this logic a spectator puked script should have the world as activator (if we want to allow spectator puking at all). Whether it works exactly like this needs to be tested.

> Are non-CLIENTSIDE scripts executed within CLIENTSIDE scripts counted as CLIENTSIDE scripts?

They should be, I'm not sure if anybody ever tested this.
User avatar (0003594)
unknownna (updater)
2012-05-08 02:25

> Sounds like a completely different issue. Is this what script_clientside_disconnect_01.wad is supposed to show (didn't have a chance to check the wad yet)?

Yes, the switch in the map doesn't display the switch animation or play the corresponding sound online.

> Spectator are supposed not to be part of the game. According to this logic a spectator puked script should have the world as activator (if we want to allow spectator puking at all). Whether it works exactly like this needs to be tested.

What I remember from my testing a few days ago is that scripts puked as a spectator are terminated if the spectator disconnects, but not if the spectator joins the game and then turns into a spectator again and disconnects. I could make a new example WAD later and test this.

> They should be, I'm not sure if anybody ever tested this.

I remember testing this and IIRC it seemed to work that way. But you can really mess things up locally if you change the map geometry, spawn things or alter player properties, etc.
User avatar (0003595)
unknownna (updater)
2012-05-08 03:11
edited on: 2012-05-08 03:12

> What I remember from my testing a few days ago is that scripts puked as a spectator are terminated if the spectator disconnects, but not if the spectator joins the game and then turns into a spectator again and disconnects.

Indeed, it seems to work this way.

1. skulltag.exe -file script_spectator_activator_01.wad -host
2. Connect a client to the server.
3. "puke 2" in the console.
4. "disconnect" in the console.
5. "reconnect" in the console. The script is terminated.
6. "puke 2" in the console.
7. "join" in the console.
8. "spectate" in the console. This step isn't needed.
9. "disconnect" in the console.
10. "reconnect" in the console. The script is still running.

User avatar (0004268)
Torr Samaho (administrator)
2012-08-05 16:23

Quote from unknownna
Yes, the switch in the map doesn't display the switch animation or play the corresponding sound online.

and
Quote from unknownna

scripts puked as a spectator are terminated if the spectator disconnects, but not if the spectator joins the game and then turns into a spectator again and disconnects

should be fixed now. For the latter scripts are terminated now when the spectator joins the game. Please confirm both in the upcoming beta build.
User avatar (0004761)
unknownna (updater)
2012-09-23 18:10

It seems that you fixed the issues.
User avatar (0004767)
Torr Samaho (administrator)
2012-09-23 18:36

From a quick look at this ticket it looks like all reported issues are fixed by now. Or is anything still open?
User avatar (0004773)
unknownna (updater)
2012-09-23 19:04

If a spectator pukes script 1 in ClientsideProblems.wad and then joins the game, the other scripts aren't terminated.

And if the server pukes script 1, client B will see the other scripts once client A joins the game.
User avatar (0005742)
Torr Samaho (administrator)
2013-01-12 21:25

Quote from unknownna
If a spectator pukes script 1 in ClientsideProblems.wad and then joins the game, the other scripts aren't terminated.

This should be fixed now. Probably this fix also fixes the other problem, i.e.:
Quote from unknownna
And if the server pukes script 1, client B will see the other scripts once client A joins the game.

Please test with this binary.
User avatar (0006023)
StrikerMan780 (reporter)
2013-02-13 20:55
edited on: 2013-02-13 20:57

So far this seems to be fixed. Between Dusk and I, we tested an issue in GoldenEye TC that was caused by this bug, which used to occur in 1.0. It doesn't happen in this build.


Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2012-04-22 01:38 MediumTank New Issue
2012-04-22 01:38 MediumTank File Added: ClientsideProblems.wad
2012-04-22 01:41 MediumTank Note Added: 0003379
2012-04-22 02:25 Torr Samaho Note Added: 0003380
2012-04-22 02:26 Torr Samaho Assigned To => Torr Samaho
2012-04-22 02:26 Torr Samaho Status new => feedback
2012-04-22 15:14 MediumTank Note Added: 0003383
2012-04-22 15:14 MediumTank Status feedback => assigned
2012-04-26 00:20 Torr Samaho Relationship added related to 0000810
2012-04-26 00:34 Torr Samaho Note Added: 0003433
2012-04-26 00:34 Torr Samaho Status assigned => feedback
2012-05-05 15:46 unknownna Note Added: 0003563
2012-05-05 15:50 unknownna File Added: script_clientside_disconnect_01.wad
2012-05-08 02:04 Torr Samaho Note Added: 0003593
2012-05-08 02:25 unknownna Note Added: 0003594
2012-05-08 03:04 unknownna File Added: script_spectator_activator_01.wad
2012-05-08 03:11 unknownna Note Added: 0003595
2012-05-08 03:12 unknownna Note Edited: 0003595 View Revisions
2012-06-09 13:22 Torr Samaho Category General => Bug
2012-08-05 16:23 Torr Samaho Note Added: 0004268
2012-08-05 16:23 Torr Samaho Status feedback => needs testing
2012-09-23 18:10 unknownna Note Added: 0004761
2012-09-23 18:36 Torr Samaho Note Added: 0004767
2012-09-23 19:04 unknownna Note Added: 0004773
2013-01-12 21:25 Torr Samaho Note Added: 0005742
2013-01-12 21:25 Torr Samaho Target Version => 1.1
2013-02-13 20:55 StrikerMan780 Note Added: 0006023
2013-02-13 20:56 StrikerMan780 Note Edited: 0006023 View Revisions
2013-02-13 20:57 StrikerMan780 Note Edited: 0006023 View Revisions
2013-02-13 22:23 Dusk Status needs testing => resolved
2013-02-13 22:23 Dusk Fixed in Version => 1.1
2013-02-13 22:23 Dusk Resolution open => fixed
2018-09-30 20:45 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker