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

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002932Zandronum[All Projects] Bugpublic2016-11-25 18:402017-04-30 01:46
ReporterCatastrophe 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version2.1 
Target VersionFixed in Version 
Summary0002932: OPEN CLIENTSIDE scripts do not run upon connection
DescriptionHello, the wiki states "Open scripts will executed by the world when the level loads on the client (i.e. upon connection)". From my investigations however, this does not appear to be the case. To demonstrate, I have prepared two wads, both which spawn a skybox if you are using open-gl upon connection.

Currently, for a clientsided script to run upon connection, you you need two scripts like this: openclientside-bug.pk3:'http://pastebin.com/raw/EthaZ1bA [^]'

However, this SHOULD be doable in one script without loops as demonstrated in openclientside-should.pk3:'http://pastebin.com/raw/w0Fm6LP0 [^]'

Unfortunately, that is not the case for 2.0, 2.1, and the latest publicly-available beta build. To my knowledge, this strange behavior has been around for years now.
Steps To ReproduceJust host a server loading either of the wads and connect, don't join the game.
Additional Informationopenclientside-bug.pk3 -> How to run clientside scripts upon connection currently
openclientside-should.pk3 -> How it should be, but isn't.
Attached Files? file icon openclientside-bug.pk3 [^] (2,389 bytes) 2016-11-25 18:40
? file icon openclientside-should.pk3 [^] (2,273 bytes) 2016-11-25 18:40
? file icon openclientside-fixed.pk3 [^] (2,323 bytes) 2017-04-27 14:39

- Relationships

-  Notes
User avatar (0017363)
Korshun (reporter)
2017-04-27 14:36
edited on: 2017-04-27 14:38

> if(consoleplayernumber() != playernumber()) terminate;
OPEN scripts (including CLIENTSIDE) don't have an activator. Remove this line.

This script works:

script 1 OPEN CLIENTSIDE
{
    printbold(s:"This is an open clientside script. It only runs on the client that has connected. It doesn't run for other clients when a client connects.");
}

User avatar (0017370)
Fused (reporter)
2017-04-27 18:46
edited on: 2017-04-27 18:48

The whole OPEN CLIENTSIDE script type is weird in general.
I guess since the game does not take spectators as activators, you really cannot to a lot with this scripttype, unless you wanna use ConsolePlayerNumber() everywhere. It would be great if you could set them as activators, instead of having everybody force to join first. But I guess this would mean a rewrite of the existing system, and possibly breaking mods?

User avatar (0017372)
Korshun (reporter)
2017-04-27 19:21
edited on: 2017-04-27 19:21

The OPEN CLIENTSIDE script type is not weird at all. It's just a script that is ran by the client when it loads the level.

And what can you do with a spectator activator? This should be a separate feature request.

User avatar (0017375)
Fused (reporter)
2017-04-27 20:05

Quote

The OPEN CLIENTSIDE script type is not weird at all. It's just a script that is ran by the client when it loads the level.


Well in that case you could also just use an ENTER CLIENTSIDE type script for this. This will only not work for spectators of course like said above.
I guess another ticket for it is indeed best.
User avatar (0017377)
ibm5155 (reporter)
2017-04-27 21:13

-open clientside will only be executed when the map start.
-no need for printbold in clientside, print should work just fine.

you could make a clientside connect script that calls all those open clientside script...
If I remember clientside works fine with spectators, the only problem is that as a spectator, you do not have a body to register your movments and also your position .

AND that's a nice feature that could be done, do something so GetPlayerInput works for spectators only if called by a clientside script (so there's no need to send those data for the server)
User avatar (0017412)
Torr Samaho (administrator)
2017-04-29 16:34

Let me quote the ZDoom Wiki:
Quote
Code that affects the script activator should not be used in an OPEN script, as the "activator" for these types of scripts is the game world and not a specific player. Use the ENTER script type if you want to script actions that directly affect the player(s) at the beginning of the level.


So it sounds to me as if OPEN CLIENTSIDE already work as intended.
User avatar (0017433)
Catastrophe (reporter)
2017-04-29 22:24

In that case, this can be closed then.

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: Korshun

- Issue History
Date Modified Username Field Change
2016-11-25 18:40 Catastrophe New Issue
2016-11-25 18:40 Catastrophe File Added: openclientside-bug.pk3
2016-11-25 18:40 Catastrophe File Added: openclientside-should.pk3
2017-04-27 14:36 Korshun Note Added: 0017363
2017-04-27 14:38 Korshun Note Edited: 0017363 View Revisions
2017-04-27 14:39 Korshun File Added: openclientside-fixed.pk3
2017-04-27 18:46 Fused Note Added: 0017370
2017-04-27 18:47 Fused Note Edited: 0017370 View Revisions
2017-04-27 18:48 Fused Note Edited: 0017370 View Revisions
2017-04-27 19:21 Korshun Note Added: 0017372
2017-04-27 19:21 Korshun Note Edited: 0017372 View Revisions
2017-04-27 20:05 Fused Note Added: 0017375
2017-04-27 21:13 ibm5155 Note Added: 0017377
2017-04-29 16:34 Torr Samaho Note Added: 0017412
2017-04-29 22:24 Catastrophe Note Added: 0017433
2017-04-30 01:46 Ru5tK1ng Status new => closed
2017-04-30 01:46 Ru5tK1ng Resolution open => no change required






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker