Commit graph

66 commits

Author SHA1 Message Date
Bill Currie
ca46503607 add -Wsign-compare (default for -Wall only in C++) and fix up the warnings 2004-07-13 19:14:01 +00:00
Bill Currie
6fd41b9e9d don't call SV_SendDemoMessage when it's only going to bail 2004-05-12 19:57:21 +00:00
Bill Currie
c188159384 various mvd fixes for bots, especially getting the angles written 2004-04-06 22:02:45 +00:00
Bill Currie
c1d5f230a9 minor cleanups 2004-03-31 19:14:55 +00:00
Bill Currie
c4807a095d if we're not going to check the pvs, why bother calculating it? 2004-03-07 00:25:09 +00:00
Bill Currie
a378581570 fix a couple places where reliable messages were getting sent to bots.
fixes the segs on bot_add in fbxa
2004-02-26 23:15:58 +00:00
Bill Currie
b502cfc3ce move ClientReliable* from sv_nchan to MSG_Reliabe* in msg_backbuf so the
backbuffer code can be shared between qw-server and qtv
2004-02-22 05:40:08 +00:00
Daniel Anderson
85beae40f0 Added the missing null terminator for a reliable message send. 2004-01-05 00:25:58 +00:00
Bill Currie
c917233165 make sure outputbuf's mem gets initialized (oops:) 2003-12-22 23:40:20 +00:00
Bill Currie
82975dfe1f send the correct number of bytes 2003-11-25 03:22:51 +00:00
Bill Currie
ce745c8078 better command output redirection handling: maplist over rcon should show
all (or most, there are limits still) of the maps on a server with many
maps.

move the optional progs funcs into sv_funcs_t and add UserInfoChanged,
ChatMessage and LocalinfoChanged callback support.

clean up PF_setinfo (and SV_SetInfo_f and SV_Localinfo_f) using shared code
where possible und to use the UserInfoChanged and LocalinfoChanged
callbacks.

add chat message callback to SV_Say. if it returns zero, normal chat
handling is done, otherwise it's assumed to have been handled by the progs.

provide a hook for unkown user commands. non-zero return means it's been
handled.
2003-11-21 06:09:21 +00:00
Bill Currie
8e0a464ad7 get server clients updated properly 2003-08-21 20:35:36 +00:00
Bill Currie
63c804310c more inline avoidance 2003-05-07 04:24:50 +00:00
Ragnvald Maartmann-Moe IV
5fb8aa07f3 Code style, people. Love it or leave it! 2003-03-21 21:25:44 +00:00
Bill Currie
2173151560 get packet logging working with mvds 2003-03-16 03:17:50 +00:00
Bill Currie
6c028a57bb bot player stats seem to be working working 2003-03-05 03:56:50 +00:00
Bill Currie
389542fda7 first step in creating an interface for the snagging of client slots by
the progs
2003-03-03 17:08:45 +00:00
Bill Currie
f4fdbeee4d make the low level network code and packet logging less incentuous 2003-02-10 21:41:22 +00:00
Bill Currie
761a7546dd re-arrange things so __attribute__ and __builtin_expect are properly
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie
71196fedf6 make gcc more anal about prototypes, string constants and function
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Bill Currie
ca4b3acd6c big protototype cleanup. Now, except for a few cases, all non-static
prototypes are in headers files.
2002-11-05 19:12:51 +00:00
Bill Currie
80d2f8e27d make it so the demo recorder and normal protocol use common code to
calculate the client stats
2002-10-07 22:15:19 +00:00
Bill Currie
cb368e0b3a support writing the extended stats to mvds 2002-10-07 18:58:54 +00:00
Bill Currie
212e40b54a mvd recording :) (thanks to qwex 0.165b and highlander) 2002-10-04 02:29:03 +00:00
Ragnvald Maartmann-Moe IV
c91f1a2aea Rename Length to VectorLength. 2002-08-20 02:22:40 +00:00
Bill Currie
0963c2476d improved server logging. "logfile" is gone from qw-server to be replaced
with "sv_logfile" and thus giving nq-server logging as well.
2002-08-07 18:46:53 +00:00
Bill Currie
44dcf74627 strip the \n from all(?) of the Sys_Error calls (Sys_Error itself will be
adding \n).
2002-05-14 06:12:29 +00:00
Bill Currie
9ea013888b eliminate GetEdictFieldValue, mostly merge SV_AddGravity, and clean up
some whitespace in sv_phys.c
2002-02-25 07:44:17 +00:00
Bill Currie
8ee5acb208 redo Sys_Error so it's more usable throughout quake 2002-02-20 19:22:52 +00:00
Bill Currie
013f503738 start getting const-correct on vec3_t params 2002-01-03 05:29:38 +00:00
Ragnvald Maartmann-Moe IV
2db08923e8 MSG_(Read|Write)(Coord|Angle|CoordAngle)V. Cleanups, and preparation for use of vector ops in msg.c. 2001-12-12 21:56:09 +00:00
Bill Currie
c5aec15569 This prepares for moving the net_svc code to a branch allowing both network
code cleanups and general performance work to be developed in relative peace.
While cleaning up the networking code /is/ important, fixing QF's perfomance
issues is of much higher priority.
2001-11-07 08:24:56 +00:00
Adam Olsen
9f088567d1 - convert svc_sound, svc_spawnbaseline, svc_spawnstatic, and
svc_tempentity

there isn't actually anything in the server that uses svc_tempentity,
only the progs do, so it's currently unused.
2001-11-02 10:40:20 +00:00
Adam Olsen
a77619f665 - convert svc_damage and svc_serverdata emitting 2001-11-02 08:10:41 +00:00
Adam Olsen
56f1d6f49b Begin phase 2 :)
- link net_svc.c to the server
- add a NET_SVC_Print_Emit function
- make the server use the above instead of svc_print manually

It's actually kind of ugly, because of how backbuffers are
implimented.  Hopefully I'll be able to clean that up later.
2001-11-02 07:32:19 +00:00
Bill Currie
78a3e398d5 * taniwha gets medieval on extern 2001-10-28 04:23:37 +00:00
Adam Olsen
dd19f7b500 - convert svc_deltapacketentities
- add a Host_NetError that dumps a packet log and disconnects, and use
  it instead of Host_EndGame in most cases
- fix a couple multiply-defined vars
2001-10-24 15:23:02 +00:00
Adam Olsen
9f7e1f864e - add a pr_double_remove cvar, that either ignores (0), warns about
(1), or causes a fatal error (2) when the progs remove an already
  removed entity.  default is 1.
- fix a segfault in FFnickFF parsing that causes a segfault
2001-10-09 22:47:14 +00:00
Adam Olsen
0785610296 - fix a little mistake in SV_PrintToClient that'd cause it to
segfault if your first call was with "".  Probably could cause
  crashes too
- add a string.c file to libQFutil, with a Q_strcasestr function,
  which strcasestr is defined to if it's not already defined.  (we'd
  get that with glibc if we defined __USE_GNU, but we don't)
- make client_t and SV_ExtractFromUserinfo both use NAME_MAX for
  their name arrays, instead of 32 for one and 80 for the other
- rewrite almost all of SV_ExtractFromUserinfo's name handling.
  - \r, \n, and \t are all converted to spaces
  - leading/trailing spaces are stripped
  - consecutive spaces are reduced to a single space
  - empty names are considered bad
  - user-* nicks are considered bad (unless forced to them)
  - a name containing console or admin is considered bad
  - a name that already exists is considered bad
  - if they have a bad name it gets forced to user-%d, where %d is
    their userid
  - netname in the progs is now updated properly
  - name changes are always reported unless it's the initial setting,
    rather than only if they're full connected and not a spectator
  - finally, if the name change fails (info string exceeded), give
    them the boot.  (before this was only done for duplicate names)

That's about it :)
2001-10-04 19:11:39 +00:00
Bill Currie
b1f4a778f9 the rcsid commit from hell }:> 2001-09-28 06:26:31 +00:00
Adam Olsen
376f05d357 - add some conversion builtins, now we have ftoi, ftos, itof, itos,
stof, stoi, stov, and vtos.
- fix PF_sprintf
- add FFnameFF support, where it tacks <userid> after the nick on the
  console.
2001-09-26 22:26:31 +00:00
Adam Olsen
5d757c0d85 - fix our favorite svc_updatefrags overflow bug! weeeeee 2001-09-24 18:26:23 +00:00
Adam Olsen
b52d7fd3d9 - when a client overflows print out the backbuf too, not just
netchan.message
- tweak the svc_print netlog spacing
2001-09-24 16:25:49 +00:00
Adam Olsen
19b6ce83a1 - fix overflow packet dumping. Oops :) 2001-09-24 14:47:36 +00:00
Bill Currie
49a85718f8 total nukage of Con_*Printf calls from libs (except for video). Sys_*Printf
(Sys_DPrintf is new) is now used exclusively for all lib printing. Con_Init
sets the sys printf recirection to Con_Print (which has been revamped
appropriatly) and the server sets it to SV_Print (which was SV_Printf and
the new SV_Printf calls /it/). This should fix the rcon print redirection
issues.
2001-09-21 04:22:46 +00:00
Ragnvald Maartmann-Moe IV
f4fd3178f4 More header and whitespace horror reduction. 2001-08-28 02:43:24 +00:00
Bill Currie
fb42199637 change all the SVFIELD calls to SVtype. this should make the code a little
easier to read.
2001-08-08 20:28:53 +00:00
Bill Currie
06b9f44741 prepend a 0ed header to the overflowed packet being dumped 2001-07-24 17:51:07 +00:00
Bill Currie
1c9e1b176f fear the mighty const correct patch 2001-07-15 07:04:17 +00:00
Bill Currie
7a06a2254a rename the Con_Printf in sv_send.c to SV_Printf and change all the calls to
Con_Printf in the server code to SV_Printf.
nuke Con_DPrintf from sv_send.c
2001-07-11 23:11:29 +00:00