MantisBT - Zandronum
View Issue Details
0001110Zandronum[All Projects] Suggestionpublic2012-10-08 22:502014-06-29 20:58
AlexMax 
Torr Samaho 
normalminorN/A
feedbackopen 
1.0 
1.3 
0001110: Replace islobby with server command 'addlobby'
Pretty much what it says on the tin. Instead of using the Zandronum-specific 'islobby' MAPINFO bit, using the 'addlobby' command in the server will add a map to the maplist with all of the special properties of "islobby".

The reasoning behind this is to play nicer with ZDoom upstream by not having a proprietary MAPINFO lump. I will update Duel32/40 to address this change.
No tags attached.
Issue History
2012-10-08 22:50AlexMaxNew Issue
2014-01-05 22:27AlexMaxNote Added: 0007894
2014-01-06 00:48AlexMaxNote Edited: 0007894bug_revision_view_page.php?bugnote_id=7894#r4369
2014-01-09 04:18AlexMaxNote Added: 0007925
2014-01-09 16:56Blzut3Statusnew => needs review
2014-01-11 11:11Torr SamahoNote Added: 0007947
2014-01-11 11:12Torr SamahoAssigned To => Torr Samaho
2014-01-11 11:12Torr SamahoStatusneeds review => feedback
2014-01-11 20:22AlexMaxNote Added: 0007965
2014-01-11 20:22AlexMaxStatusfeedback => assigned
2014-01-11 21:04Torr SamahoNote Added: 0007966
2014-01-11 21:04Torr SamahoStatusassigned => needs testing
2014-01-11 21:04Torr SamahoTarget Version => 2.0
2014-01-13 23:11AlexMaxNote Added: 0007997
2014-01-14 01:15AlexMaxNote Added: 0007998
2014-01-14 08:26DuskNote Added: 0008000
2014-01-15 07:10Torr SamahoNote Added: 0008010
2014-01-15 22:56AlexMaxNote Added: 0008015
2014-01-16 07:09Torr SamahoNote Added: 0008021
2014-01-16 07:09Torr SamahoTarget Version2.0 => 1.3
2014-06-29 20:58ArcoNote Added: 0009797
2014-06-29 20:58ArcoStatusneeds testing => feedback

Notes
(0007894)
AlexMax   
2014-01-05 22:27   
(edited on: 2014-01-06 00:48)
Turns out that ZDaemon has a 'lobby' cvar that is similar to my feature request, but adds a number of features to 'islobby' as well.

---
// The "lobby" CVAR formalizes the "map00 lobby convention" in WADs.
// When that CVAR is 1, it activates the "lobby mode":
// 1. The server auto-switches to map00 when both players leave.
// 2. The server auto-switches to map00 when a map ends.
// 3. All maps will always be available for voting, no matter
// the value of sv_vote_map_skip.
// 4. There will be no time limit on map00.
// 5. Dynamic bots (minplayers) are excluded from map00.
//
// For this mode to get activated, you need to:
// a. Set the "lobby" CVAR to a value of 1.
// b. map00 should exist in the loaded WADs.
// c. Define a maplist on the server.
// d. Include map00 into the maplist.
---

Obviously we don't want to constrain ourselves to just 'map00', but I think that adding these functions to the lobby functionality would be a win as well. Perhaps we could keep 'islobby' as it is, add the 'lobby' cvar for maps that don't use it, and add the missing functionality.

(0007925)
AlexMax   
2014-01-09 04:18   
I ended up implementing it myself. Yay for contributing to Zandronum!

'https://bitbucket.org/Torr_Samaho/zandronum/pull-request/29/ [^]'

The pull request makes the following changes:
- Adds a new 'lobby' CVar. By default, it is a blank string, and it is intended to be set to a map lump (it will error if set to an invalid map lump). The map lump set in the CVar has the properties of an 'islobby' MAPINFO map plus more.
- Both MAPINFO and CVar lobbies ignore timelimits now.
- Cvar lobbies are always set to the next map (except if you're already on the lobby).
- If the server is empty for 30 seconds with a CVar lobby, the lobby map is loaded.
- I added an alias for MAPINFO 'islobby' called just 'lobby' - I always hated the name of the token, the 'is' is redundant.

The reason the CVar lobby can act as a 'destination' is because in theory there can be more than one MAPINFO lobby and that functionality can be nearly completely duplicated by hand through a global script and MAPINFO nextmap.
(0007947)
Torr Samaho   
2014-01-11 11:11   
The patches look good, I'm just not really convinced that we need the new alias, but I guess it doesn't hurt to have it either. Please add an entry to zandronum-history.txt that summarizes the changes, then I can pull them.
(0007965)
AlexMax   
2014-01-11 20:22   
Done. I went ahead and updated the pull request.
(0007966)
Torr Samaho   
2014-01-11 21:04   
Thanks! Pulled.
(0007997)
AlexMax   
2014-01-13 23:11   
I found a small issue with my patch - team clearing is not done in lobby maps. Unfortunately, this is checked before the level is loaded, so i can't use the nice GAMEMODE_IsLobbyMap() function I set up. Will submit a patch to fix, plus maybe some code cleanup elsewhere.
(0007998)
AlexMax   
2014-01-14 01:15   
'https://bitbucket.org/alexmax2742/zandronum/commits/e1a99ee42b069c2245badc017a4b457c1f8ae6e2 [^]'
(0008000)
Dusk   
2014-01-14 08:26   
Shouldn't this also be committed to 1.3?
(0008010)
Torr Samaho   
2014-01-15 07:10   
The feature is likely small enough to fit it in with our plans for 1.3, but it's in no way mandatory to have it in 1.3. I just followed the implicit wish of the author, since it was submitted as change against 2.0, not 1.3.
(0008015)
AlexMax   
2014-01-15 22:56   
I am fine with it being in 1.3 - I was under the impression that 1.3 was a more of a contingency plan than anything and that 2.0 was coming out Real Soon Now anyway.
(0008021)
Torr Samaho   
2014-01-16 07:09   
Your impression is along the lines what I was intending. Hopefully we can release 2.0 soon enough so that we don't need to release 1.3. Since porting things from 2.0 to 1.3 requires some manual work (unlike merging updates from 1.3 into 2.0 which can be done more or less automatically by hg), I propose to leave it as it is now and only decide whether it goes to 1.3 if we know that we actually release 1.3. To keep this in mind I'll set the target of this ticket to 1.3.
(0009797)
Arco   
2014-06-29 20:58   
I'm noticing an issue with this CVar - namely, whenever I assgin an invaild parametor to it, it removes the map from the lobby that was previously entered. Aside from that, it doesn't appear to be anything substantial.

Quote

> lobby map01
lobby changed to: map01
> lobby
"lobby" is "map01"
> lobby map00
map map00 doesn't exist.
lobby unset
> lobby
"lobby" is ""


Also, I tested this in v1.3 140610-2242 but the CVar doesn't appear to be there.