Bug 2969 - get g_maxGameClients working
Status: RESOLVED FIXED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC Linux
: P4 enhancement
Assignee: Tremulous Bugs
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2006-12-19 21:54 EST by M. Kristall
Modified: 2007-09-25 02:47:24 EDT
0 users

See Also:


Attachments
g_maxGameClients (1.28 KB, patch)
2006-12-19 21:55 EST, M. Kristall
only if spectating (1.34 KB, patch)
2006-12-19 22:50 EST, M. Kristall

Description M. Kristall 2006-12-19 21:54:49 EST
g_maxGameClients is supposed to limit the number of currently connected clients who are allowed to play. But apparently it was unimplemented.
I found a reference in a comment somewhere indicating there should also be a queue so the game knows who should play next after one of the players leaves. I didn't bother with that though. I just compare g_maxGameClients vs. level.numPlayingClients in G_Team_f.

People with ADMF_FORCETEAMCHANGE can join teams even if too many people are currently playing, and g_maxGameClients has no effect on !putteam. I also changed it so that g_maxGameClients can be changed in game (might be useful for tournament organization).

I think the calculating of level.num*Clients is buggy and will lead to problems with this patch (I intend to submit a patch to fix that).
Comment 1 M. Kristall 2006-12-19 21:55:21 EST
Created attachment 1204 [details]
g_maxGameClients
Comment 2 M. Kristall 2006-12-19 22:50:34 EST
Created attachment 1208 [details]
only if spectating

I just realized my patch doesn't check if they are a spectator first. If they want to switch teams and there are too many people playing, so be it.
Comment 3 Tim Angus 2007-09-20 10:33:48 EDT
Looks good to commit?
Comment 4 M. Kristall 2007-09-25 02:47:24 EDT
Committed at revision 1010.