.qc (dot qc) - the group for quake c coders of all denominations. If you make quake one mods and write code in quake c, join our group! I'll try to answer any quake c questions - please post your inquiry in the forums...

Forum Thread
  Posts  
Server variable weirdness (Groups : qc : Forum : discuss() : Server variable weirdness) Locked
Thread Options
numbersix
numbersix quake-c coder++
Sep 22 2016 Anchor

So, I have this item respawn issue.
I just made considerable changes to the code that will reload entities from the admin side of things.

So, I did some bprint debug.

mph  +map pk12 +set deathmatch 1
Game is MapHack-Quake using base gamedir id1
MapHack-Quake Linux 18:01:31 Sep 22 2016 v0.6-14-ge43444b release

						bprint(" -- touched: "); /// REMOVE
						bprint(ftos(deathmatch));
						bprint("\n");

 -- touched: 0
You got the Bear Trap

1 possible variable:
deathmatch is "1" ["0"] deathmatch mode

What?

I dont get it. If deathmatch is "1", then it is.

But...

quake-c:
defs.qc:float		deathmatch;

engine c code:
progdefs.h:	float	deathmatch;
prvm_offsets.h:PRVM_DECLARE_clientglobalfloat(deathmatch)
prvm_offsets.h:PRVM_DECLARE_global(deathmatch)
prvm_offsets.h:PRVM_DECLARE_serverglobalfloat(deathmatch)
server.h:extern cvar_t deathmatch;

So what is likely happening is the console cvar is reporting deathmatch as "1"
while the engine is sending "0" to the qc code.

This is the sure fix:

mph -listen +map pk12

Using "-listen"or "-dedicated" is the only sure way to test deathmatch mods.

Using "+set deathmatch 1" via the launch command has unpredictable results, depending on the engine.

Edited by: numbersix

--

\|/
-*- Support free code: Patreon.com
/|\

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.