Bug 4702 - [patch] Put g_humanplayers, g_needpass in server info
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: All All
: P3 enhancement
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2010-08-13 14:38 EDT by Simon McVittie
Modified: 2021-11-02 15:31:19 EDT
2 users (show)

See Also:


Attachments
Put g_humanplayers and g_needpass in server info (2.95 KB, patch)
2010-08-13 14:39 EDT, Simon McVittie
Add g_humanplayers cvar to g_main.c (1.69 KB, patch)
2010-08-25 18:15 EDT, Zack Middleton
Server finds number of humanplayers (1.16 KB, patch)
2010-08-27 16:59 EDT, Zack Middleton
Add g_humansplayers (found by server) and g_needpass (cvar) to serverinfo (3.12 KB, patch)
2011-02-04 16:14 EST, Zack Middleton

Description Simon McVittie 2010-08-13 14:38:01 EDT
OpenArena's modified ioquake3 engine includes g_humanplayers and g_needpass in server info. The OpenArena UI optionally uses this information to exclude bots when displaying how full a server is, and to hide servers which need a password; these both seem like good things for a mod or standalone game to do.

Patch on the way once I have a bug number; this is part of ongoing work in Debian to replace OpenArena's modified engine with a more current ioquake3, plus a wrapper script that sets com_standalone, fs_game, etc. as appropriate.
Comment 1 Simon McVittie 2010-08-13 14:39:26 EDT
Created attachment 2401 [details]
Put g_humanplayers and g_needpass in server info

Patch based on one extracted from OpenArena's engine source tarballs.
Comment 2 Zack Middleton 2010-08-25 18:15:27 EDT
Created attachment 2417 [details]
Add g_humanplayers cvar to g_main.c

Created a patch based on OpenArena/oax to add g_humanplayer to game.

Changes from oax are: (1) use 'trap_Cvar_VariableIntegerValue( "g_humanplayers" )' instead of 'g_humanplayers.integer' to fix setting g_humanplayers after map_restart. (2) count connecting players as human (they are using a client slot after all). and (3) send the number of humans during intermission.
Comment 3 Zack Middleton 2010-08-27 16:59:12 EDT
Created attachment 2418 [details]
Server finds number of humanplayers

Replace the need for g_humanplayers cvar by having the server find the value. This allows g_humanplayers to be set for all mods.
Comment 4 Simon McVittie 2011-02-04 15:35:59 EST
(In reply to comment #3)
> Created attachment 2418 [details]
> Server finds number of humanplayers

Thanks, this looks like a good start; it's missing g_needpass and the client-side, but I'll look into adding those.
Comment 5 Zack Middleton 2011-02-04 16:14:29 EST
Created attachment 2576 [details]
Add g_humansplayers (found by server) and g_needpass (cvar) to serverinfo

Combined two previous patches, Simon's patch and my automatic setting of g_humanplayers in server patch.
Comment 6 Simon McVittie 2011-02-04 17:37:53 EST
(In reply to comment #5)
> Created attachment 2576 [details]
> Add g_humansplayers (found by server) and g_needpass (cvar) to serverinfo

Looks good to me! I'll try it out in Debian shortly.
Comment 7 Simon McVittie 2011-02-10 12:34:57 EST
We're now applying this in Debian (since version 1.36+svn1858-1).
Comment 8 Thilo Schulz 2011-03-07 18:13:06 EST
This can't hurt adding. Applied r1914