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
0000904Zandronum[All Projects] Suggestionpublic2012-07-01 16:212018-09-30 19:52
ReporterWatermelon 
Assigned ToTorr Samaho 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version1.0 
Summary0000904: DISCONNECT scripts return negative player number on specating (new CompatFlag?), or new DISCONNECT parameter
DescriptionWhen a player spectates, he/she triggers the DISCONNECT (int playerNumberHere) script. There is a usefulness for being able to tell if "the player just spectated" or "player has outright left the game".

There are some minor advantages to this with respect to checking if something in the level should continue if the player is just spectating or not, or if "data on the player" should be left on the server for a specific player... example: Lets say the server stores the location of the player -- he needs to spectate for an unknown reason -- upon rejoining (if he didnt leave) it could restore them to the same spot with ACS.
This could also help with storing server data in ACS and not just dumping it asap upon disconnection. If they fully log out/time out/whatever, the server will be able to tell if its a positive or negative number and adjust accordingly.

There is the ability to use the second argument of the three available to return a true/false (1 = exit outright, 0 = just spectated, or kicked from the game to spectator or whatever).

I don't know if the second one (new parameter) is easier to code in or not, but to prevent backwards compatibility, maybe
Compat_SpectateDisconnectNegative true/false could be added, if enabled (disabled by default).

Or possibly a new flag?
Script 123 (int num) DISCONNECT SPECTATE

I'm not sure if there's an easy way to do this or not.




IN ADDITION:
So far there is a cheap way around it by just having a DISCONNECT CLIENTSIDE script puke a command to the server saying "I'm still here!", but lag could interfere with this (ex: how long should the server wait before dumping stored information on a player from ACS? etc); by implementing what kind of exit is performed by the player, the server would have more control over what happens in the game.
Attached Files

- Relationships

-  Notes
User avatar (0003879)
Watermelon (developer)
2012-07-01 16:24

Also:
'http://zandronum.com/tracker/view.php?id=700 [^]'

Torr Samaho said in this area that it would be possible for ACS to determine if a client is spectating or not easily. Do not know if this applies here or not.
User avatar (0003914)
Torr Samaho (administrator)
2012-07-08 09:58
edited on: 2012-07-08 09:59

I don't think that we should touch the return value of DISCONNECT scripts, but you want intend should be achievable with a new function: To test this I added the new ACS function PlayerIsSpectator, please test if this binary works as intended. To use the new function you need to add
-101:PlayerIsSpectator(1),
to your zspecial.acs.

You will not see though when the spectator disconnects, but an altered DISCONNECT return value wouldn't allow this either.

User avatar (0003980)
Torr Samaho (administrator)
2012-07-15 09:25

Since I didn't get any feedback on the new function so far, I added it to our repository in the hope that it will be tested when the next official beta build is released.
User avatar (0003992)
ZzZombo (reporter)
2012-07-15 13:55

Actually I tested it once but forgot to mention it. Sorry, it worked fine for me.
User avatar (0004193)
Watermelon (developer)
2012-08-02 13:36

Tested in the latest build, worked successfully

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-07-01 16:21 Watermelon New Issue
2012-07-01 16:24 Watermelon Note Added: 0003879
2012-07-08 09:58 Torr Samaho Note Added: 0003914
2012-07-08 09:58 Torr Samaho Assigned To => Torr Samaho
2012-07-08 09:58 Torr Samaho Status new => feedback
2012-07-08 09:59 Torr Samaho Note Edited: 0003914 View Revisions
2012-07-08 10:00 Torr Samaho Note Revision Dropped: 3914: 0002145
2012-07-15 09:25 Torr Samaho Note Added: 0003980
2012-07-15 09:29 Torr Samaho Status feedback => needs testing
2012-07-15 13:55 ZzZombo Note Added: 0003992
2012-08-02 13:36 Watermelon Note Added: 0004193
2012-08-02 19:07 Torr Samaho Status needs testing => resolved
2012-08-02 19:07 Torr Samaho Fixed in Version => 1.0
2012-08-02 19:07 Torr Samaho Resolution open => fixed
2018-09-30 19:52 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker