MantisBT - Zandronum
View Issue Details
0003157Zandronum[All Projects] Bugpublic2017-06-19 03:592017-06-26 14:54
Dark-Assassin 
 
normalminoralways
closedno change required 
3.0-beta 
 
0003157: Having a problem with a clientsided ACS script with a clientsided actor online
I've been having this problem with custom particle actors not staying spawned if the relevant limit check script is clientsided.

The actor compares the amount of spawned particles using a global variable with r_maxparticles and determines if it should stay spawned or destroy itself. If the script is clientsided and the game is online, it always fails. The other checks such as small, round or smooth particles work as intended.
See attached file.
I'd like to know if it's actually a bug rather than the possibility of my coding being at fault.
No tags attached.
? particle.pk3 (5,518) 2017-06-19 03:59
/tracker/file_download.php?file_id=2123&type=bug
? particle2.pk3 (5,523) 2017-06-19 13:50
/tracker/file_download.php?file_id=2124&type=bug
? particlespawner.pk3 (5,612) 2017-06-20 13:43
/tracker/file_download.php?file_id=2126&type=bug
Issue History
2017-06-19 03:59Dark-AssassinNew Issue
2017-06-19 03:59Dark-AssassinFile Added: particle.pk3
2017-06-19 06:02FusedNote Added: 0017842
2017-06-19 06:25Dark-AssassinNote Added: 0017843
2017-06-19 06:26Dark-AssassinNote Edited: 0017843bug_revision_view_page.php?bugnote_id=17843#r10691
2017-06-19 12:46KorshunNote Added: 0017844
2017-06-19 12:46KorshunNote Edited: 0017844bug_revision_view_page.php?bugnote_id=17844#r10693
2017-06-19 12:47KorshunNote Edited: 0017844bug_revision_view_page.php?bugnote_id=17844#r10694
2017-06-19 13:09Dark-AssassinNote Added: 0017845
2017-06-19 13:14KorshunNote Added: 0017846
2017-06-19 13:14KorshunNote Edited: 0017846bug_revision_view_page.php?bugnote_id=17846#r10696
2017-06-19 13:15KorshunNote Edited: 0017846bug_revision_view_page.php?bugnote_id=17846#r10697
2017-06-19 13:50Dark-AssassinNote Added: 0017848
2017-06-19 13:50Dark-AssassinFile Added: particle2.pk3
2017-06-19 13:51Dark-AssassinNote Edited: 0017848bug_revision_view_page.php?bugnote_id=17848#r10701
2017-06-19 13:59KorshunNote Added: 0017849
2017-06-20 02:05Dark-AssassinNote Added: 0017852
2017-06-20 13:43KorshunNote Added: 0017854
2017-06-20 13:43KorshunFile Added: particlespawner.pk3
2017-06-26 07:34Dark-AssassinNote Added: 0017935
2017-06-26 14:54Ru5tK1ngStatusnew => closed
2017-06-26 14:54Ru5tK1ngResolutionopen => no change required

Notes
(0017842)
Fused   
2017-06-19 06:02   
A clientsided actor+script combination should always behave the same offline/online, since technically there's no difference for them. I can't check your PK3, but you should check if there's anything serversided involved, like accidental serversided parts or functions that are serverside, but you put clientside.
(0017843)
Dark-Assassin   
2017-06-19 06:25   
(edited on: 2017-06-19 06:26)
The actors have +CLIENTSIDEONLY, check use A_JumpIf with ACS_NamedExecuteWithResult and all scripts are CLIENTSIDE. Other similar scripts in here work fine though.

If I remove CLIENTSIDE from one specific script, it'll work fine. It's commented in the ACS source in the pk3.

(0017844)
Korshun   
2017-06-19 12:46   
(edited on: 2017-06-19 12:47)
Your ACS has 7 clientsided named scripts, but the disassembly shows this:

script=-1 flags=clientside
script=-2 flags=clientside
script=-3 flags=clientside
script=-6 flags=clientside
script=-7 flags=clientside

scripts -4 (RegisterParticle) and -5 (UnRegisterParticle) are not clientside. And calling a serverside script clientside will return 0 without executing the script.

Recompiling the script with ACC yields this:

script=-1 flags=clientside
script=-2 flags=clientside
script=-3 flags=clientside
script=-4 flags=clientside
script=-5 flags=clientside
script=-6 flags=clientside
script=-7 flags=clientside

(0017845)
Dark-Assassin   
2017-06-19 13:09   
I swear I recompiled it just before I uploaded.

So, is there no way to make global variables clientsided? I want the particles to spawn based on the client's r_particles count rather than the server's.
(0017846)
Korshun   
2017-06-19 13:14   
(edited on: 2017-06-19 13:15)
Global variables ARE clientsided. Your compiler is broken. What compiler do you use?

The server and the client have separate copies of global variables.

(0017848)
Dark-Assassin   
2017-06-19 13:50   
(edited on: 2017-06-19 13:51)
I use acc v1.55

Either way, if said scripts are clientsided, it simply does not work.
When they are not clientsided, they do work.

I just screwed up with the attached pk3, that's all.
I reattached it with the compiled script matching the source as particle2.pk3

(0017849)
Korshun   
2017-06-19 13:59   
How do I spawn the particles using this example wad?

Using "summon" is not an option, as "summon" spawns the actor serverside regardless of its flags.
(0017852)
Dark-Assassin   
2017-06-20 02:05   
This one is summon. In the mod it's used in: A_SpawnItemEx("ParticleActor",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)

If I have the flag SFX_CLIENTSIDE, it'll just not spawn at all, even with all the destroying checks commented out.
(0017854)
Korshun   
2017-06-20 13:43   
It works if the particle is spawned clientside. See example wad (summon ParticleSpawner).

Also, SXF_CLIENTSIDE is useless with +CLIENTSIDEONLY actors. It's only useful to force-spawn clientside an actor that is normally serverside.
(0017935)
Dark-Assassin   
2017-06-26 07:34   
This can be closed. It was a user error much deeper in my code.