SVC_MESSAGE, sending more than one?

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
drm_wayne
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

SVC_MESSAGE, sending more than one?

Post by drm_wayne »

Im using a modified SVC_KILLEDMONSTER for sending some stats to the engine...
Is it possible to send the "real" stats to the engine?

I have this in the qc (the points_alliedscore gets the palyers points for killing enemys, objectives etc)

Code: Select all

points_alliedscore = points_alliedscore + 15;
WriteByte (MSG_ALL, SVC_ALLIEDSCORE);				// how can i add the REAL stats to the engine?
I want to submint the real points to the engine, how can i do that?
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: SVC_MESSAGE, sending more than one?

Post by Spike »

writebyte(foo, svc_updatestat); //3
writebyte(foo, STAT_MONSTERS); //14
writelong(foo, statvalue); //byte if in qw. use svc_updatestatlong=38 if you want a long in quakeworld.

don't think you can hack nq's ammo values to show larger numbers by using this. ammo counts are duplicated in every. single. packet. to override them you would need to also send the info in every single packet. which is almost achievable, or rather it would be if you had a msg_unreliable_one.
as a result, this svc is only useful for monster/secret counts, and maybe csqc if you don't want to use the builtin created for the purpose.

-- begin engine code dump --
STAT_TOTALSECRETS = 11,
STAT_TOTALMONSTERS = 12,
STAT_SECRETS = 13, // bumped on client side by svc_foundsecret
STAT_MONSTERS = 14, // bumped by svc_killedmonster
drm_wayne
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: SVC_MESSAGE, sending more than one?

Post by drm_wayne »

thx, i expected that this wasnt a good idea :P

I used the dirty "stuffcmd ftos" before and that worked, but that is the lame way...
Post Reply