MantisBT - Zandronum |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0000904 | Zandronum | [All Projects] Suggestion | public | 2012-07-01 16:21 | 2018-09-30 19:52 |
|
Reporter | Watermelon | |
Assigned To | Torr Samaho | |
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 1.0 | |
|
Summary | 0000904: DISCONNECT scripts return negative player number on specating (new CompatFlag?), or new DISCONNECT parameter |
Description | When 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. |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
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 | bug_revision_view_page.php?bugnote_id=3914#r2146 |
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 |
Notes |
|
|
|
|
(0003914)
|
Torr Samaho
|
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.
|
|
|
|
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. |
|
|
|
Actually I tested it once but forgot to mention it. Sorry, it worked fine for me. |
|
|
|
Tested in the latest build, worked successfully |
|