[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Learning R00k's Joy

Learning R00k's Joy

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Learning R00k's Joy

Postby Baker » Wed Oct 17, 2012 6:41 am

I've run into some interesting challenges writing server side stats with QuakeC support.

I've also had to actually learn QuakeC, which is becoming less a mystery every second. But I can really say that the flow of QuakeC is a bit haphazard for client connections.
In my opinion, since as it natural comes it doesn't distinguish between new connections and reconnects (even though it does, but it is a bit of an entangled mess). I guess in Quakeworld this is rather irrelevant, as Spike says the server aliases are cleared and resent every level. [I might head towards that eventually, it can't hurt anything].

The fun part of working with QuakeC when you already are working with the engine is the "if things don't support what you are doing" frustration doesn't really happen. :D

You just say "whatever" and make some changes to the engine source.

Notes / Observations:

1. A lot of NetQuake mods use QuakeC for things that are completely wrong for QuakeC to be doing. Most of the admin functions in mods is all wrong and QuakeC shouldn't be doing it:
A. Checking for blank names. QuakeC can't even do this right due to special characters.
B. Banning/Muting/Kicking. Should be done in the server engine, exposed via rcon.
C. What is left that QuakeC admin functions do? Changing maps, maybe killing a player. I'm thinking admin functions in QuakeC is possibly as "wrong" as spectating functions in QuakeC (Although for now I'll have to live with it.)

2. Here is part of the reason that QuakeC administrative functions are "wrong", using old ProQuake server as an example. You can ban a player, but they can still rcon (since that is the engine). That's silly as hell.

3. Lacking Quakeworld serverinfo stuff, the most ridiculously hard thing that is common with a NetQuake server is setting the map rotation. In QuakeC, this is a crapton of work. In the engine? Ha! Throw in new cvar ("map_rotation"). If cvar isn't "", override PF_changelevel. No QuakeC modification required.

4. pq_teamscores is kind of a standard in ProQuake, the qccx hackage QuakeC for that is terrible. ALL the qccx hacks that I know of, this is the only thing that really is hard to displace in NetQuake. qccx hacks are used for ip masking and generally other stuff that QuakeC shouldn't really be doing.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Learning R00k's Joy

Postby Baker » Wed Oct 17, 2012 8:18 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Learning R00k's Joy

Postby r00k » Thu Oct 18, 2012 12:36 am

I wrote a modification to changelevel in Qrack that without a parameter it will load a random map based on the maps it finds in the path. I can't remember if the source on the Qrack page has that function included.
But ya most the admin functions should be engine side with a simple parameter passed from the mod.
I did modify pro quake back in the day by adding a mute command but also did it in qc for others versions of Pq that didn't have that chat "mute".
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Learning R00k's Joy

Postby Spike » Thu Oct 18, 2012 8:23 am

Hexen2 does clearly distinguish between new clients and clients-from-the-previous-map. *ALL* of the player's fields are copied over from one map to the next. This means you need to reset all timers and entities, of course. On the other hand, the parm system is more useful for respawning.

1A: The engine should reject blank/dupe names already. QuakeWorld does, I would assume NQ would too.
Note that if you use the char \xff in your name, QW clients might see a truncated string, so servers should be fixed for that bug.
1B: bans should be enforced by the server, yes, if only because the QC can't save its ban lists very easily between server restarts. Engines doing it means that the banned player never even consumes a player slot.
That said, what about mod-specific admin rights? With votekicks and the like?
1C: spectator mode should generally be done by the QC. There are too many weird cases if the server does this, including stuffcmds (like idlescale) sticking. Generally though, you'll need some csqc to make decent use of spectator modes.

2: Ban filters should be enforced by the engine, even if the ban is initiated by QC, yes.

3: so long as it doesn't break mods, like ones that use specific maps for certain things.

4: Anything using a qccx hack is a hack by definition. I don't know what's so special about pq_teamscores that make it require qccx hacks.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Learning R00k's Joy

Postby Baker » Thu Oct 18, 2012 10:15 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Learning R00k's Joy

Postby Baker » Thu Oct 18, 2012 10:21 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Learning R00k's Joy

Postby Spike » Thu Oct 18, 2012 11:06 am

Yeah, I do already know how the parms work. :P
Standard QC really doesn't care if the player is new this map or not. Starting from a clean slate on each map is a nice thing to be able to do. It means you don't get weird new bugs other than items not transitioning (like red armour!).

regarding names, why don't you just fix that engine-side? should be an easy fix inside Host_Name_f.
qc doing things that are so trivial and common sense is just stupid. which is why the whole mentality behind qccx hacks is wrong. If its broken in the engine, fix it in the damn engine, and name+shame any engines where its a problem (at least privately to their authors).
You'd be stupid to run an unmodified quake server on the internet (due to NAT issues or exploitable flaws), so there's very little reason to even bother taking the long route and working around it in the QC. The only reason is if you have absolutely zero contact with the (other?) engine authors.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Learning R00k's Joy

Postby Baker » Thu Oct 18, 2012 11:40 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Learning R00k's Joy

Postby r00k » Thu Oct 18, 2012 5:17 pm

r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests