MantisBT - Zandronum
View Issue Details
0001478Zandronum[All Projects] Suggestionpublic2013-08-30 00:222017-06-11 15:39
Qent 
Torr Samaho 
normalminorN/A
assignedno change required 
MicrosoftWindowsXP/Vista/7
1.1.1 
 
0001478: Un-deprecate IsMultiplayer
IsMultiplayer is a useful ACS function to determine whether a game is online or offline. For the longest time it has been deprecated, according to both the Skulltag/Zandronum and ZDoom wikis; and ACC has not compiled it, replacing its opcode with the unimplemented PlayerOnTeam function. While the latter is an issue for the ACC maintainers to sort out, I would like to request here that support for IsMultiplayer be restored, or its functionality covered by other ACS functions.

The closest function that I have found so far is ConsolePlayerNumber. When run on the server, it will return -1, revealing that there is a server, and therefore the game is online; however, to work as a substitute for IsMultiplayer, ConsolePlayerNumber cannot be run CLIENTSIDE.
I have just written up a description of IsMultiplayer on the Zandronum wiki that truer to its current behavior.
No tags attached.
Issue History
2013-08-30 00:22QentNew Issue
2013-08-30 16:36DuskNote Added: 0007086
2013-08-30 16:37DuskNote Edited: 0007086bug_revision_view_page.php?bugnote_id=7086#r3971
2013-08-31 17:16WatermelonNote Added: 0007088
2013-09-04 15:21Blzut3Note Added: 0007104
2013-09-05 13:00QentNote Added: 0007110
2013-09-05 13:35QentNote Edited: 0007110bug_revision_view_page.php?bugnote_id=7110#r3994
2013-09-05 14:36Blzut3Note Added: 0007113
2013-09-07 09:07Torr SamahoNote Added: 0007131
2013-09-07 09:08Torr SamahoNote Edited: 0007131bug_revision_view_page.php?bugnote_id=7131#r4002
2013-09-07 09:08Torr SamahoNote Revision Dropped: 7131: 0004001
2013-09-10 15:56QentNote Added: 0007156
2013-09-11 05:41ZzZomboNote Added: 0007160
2013-09-11 05:41ZzZomboNote Edited: 0007160bug_revision_view_page.php?bugnote_id=7160#r4019
2013-09-11 17:50QentNote Added: 0007165
2013-10-10 16:58QentNote Added: 0007369
2013-10-10 16:58QentStatusnew => closed
2013-10-10 16:58QentResolutionopen => no change required
2016-06-19 08:57Torr SamahoNote Added: 0015097
2016-06-19 08:57Torr SamahoStatusclosed => new
2016-06-19 10:07Edward-sanNote Added: 0015098
2016-06-19 11:02Edward-sanNote Added: 0015099
2016-06-20 08:35Edward-sanNote Added: 0015100
2016-06-20 08:35Edward-sanAssigned To => Torr Samaho
2016-06-20 08:35Edward-sanStatusnew => assigned

Notes
(0007086)
Dusk   
2013-08-30 16:36   
(edited on: 2013-08-30 16:37)
Quote

[19:15:27] <@Dusk> hrm
[19:16:14] <@Dusk> what is `multiplayer` here? i'd think of it as the client and multiplayer emulation modes
[19:19:22] <@Qent> no, it checks if the game is online
[19:19:38] <@Dusk> not multiplayer emulation?
[19:19:44] <@Qent> i added a link to the wiki that describes what it does
[19:19:47] <@Qent> no
[19:19:49] <@Dusk> multiplayer emulation is multiplayer as far as gameplay goes
[19:20:12] <@Qent> but that is not what the function is for
[19:20:42] <@Qent> it's used to check if a game is online or not
[19:20:50] <@Dusk> isn't the name quite misleading then?
[19:21:20] <@Dusk> if you wish to check whether you're online or not, imo a GetNetstate() function would be a better option
[19:21:49] <@Dusk> hrm actually what you're asking here is a bit like NETWORK_InClientMode
[19:22:03] <@Qent> replacing IsMultiplayer's functionality with other functions would be fine with me
[19:22:14] <@Dusk> yeah i'm just thinking what would be the best way to do it
[19:22:39] <@Dusk> perhaps have a getnetstate() function which returns "client" if NETWORK_InClientMode() is true
[19:22:56] <@Dusk> so it works with demos too..
[19:23:23] <@Qent> IsMultiplayer works with demos i /think/
[19:23:32] <@Dusk> well everything should :P
[19:23:50] <@Dusk> ima post the ramblings in that ticket so they won't be lost


(0007088)
Watermelon   
2013-08-31 17:16   
An ACS function for NETWORK_GetState() may help here?
(0007104)
Blzut3   
2013-09-04 15:21   
Is there are reason that GameType() or SinglePlayer() do not return the proper value in multiplayer emulation? It would seem to me that a mode called "emulation" should actually emulate multiplayer as far as ACS scripts are concerned.
(0007110)
Qent   
2013-09-05 13:00   
(edited on: 2013-09-05 13:35)
Neither of those can distinguish between online and offline Deathmatch modes (needed for D2DM3). A function to expose NETWORK_GetState() would be great.

(0007113)
Blzut3   
2013-09-05 14:36   
Ahh, so this is "needed" for silly easter eggs. Still it would seem to me like SinglePlayer() could be modified to just be the inverse of IsMultiplayer(). If you really want to distinguish between offline deathmatch and true single player there are way you could still get that (count the players for example).
(0007131)
Torr Samaho   
2013-09-07 09:07   
(edited on: 2013-09-07 09:08)
As far as I can tell Zandronum still fully supports IsMultiplayer and the op code has been the same ever since I joined, i.e. since Skulltag 97c2. I don't see why we should remove this function (although I don't don't see why it was added it the first place, but now that it's there we'll have to keep it) and I don't know who flagged this as deprecated.

Modifying SinglePlayer() risks breaking mods that rely on its current behavior.

(0007156)
Qent   
2013-09-10 15:56   
So all that's needed now is for ACC to add it back in.
(0007160)
ZzZombo   
2013-09-11 05:41   
No. All what is needed is choosing an unused in ZDoom opcode for this function since ZDoom apparently never thought about Skulltag-specific function in its place (that's why PlayerOnTeam() is here) and will never change that in our favor.

(0007165)
Qent   
2013-09-11 17:50   
That would break compatibility with existing mods, and if we did that then we might as well deprecate IsMultiplayer in favor of an ACS function for NETWORK_GetState. But why do you think that PlayerOnTeam is ZDoom's (unused!) function? Both the ACC and ZDoom sources have it well within the "Skulltag pcodes."
(0007369)
Qent   
2013-10-10 16:58   
Since this requires only a change to ACC over which we have no control, I'm marking this closed.
(0015097)
Torr Samaho   
2016-06-19 08:57   
Repoened to sort out the op code naming differences.
(0015098)
Edward-san   
2016-06-19 10:07   
As I said here, imho IsMultiplayer must be renamed to IsNetworkGame because it doesn't do what it's supposed to do and also the acc parser still uses the old name.
(0015099)
Edward-san   
2016-06-19 11:02   
Now Singleplayer will do the same thing in both zandronum and zdoom git (see this commit).
(0015100)
Edward-san   
2016-06-20 08:35   
In the dev meeting it was decided that the function should be renamed IsNetworkGame, for clearer meaning. Applied the changes to ZDoom (here) and acc (here).