Commit Graph

737 Commits

Author SHA1 Message Date
Adam Olsen e0dfa2b453 - convert ALL the remaining svc's on the client. woot, hehe 2001-11-05 20:13:27 +00:00
Bill Currie 54ddb94132 urk, I forgot Info_ParseString uses Hunk_TempAlloc :/ 2001-11-05 17:19:26 +00:00
Bill Currie 6c2145f9b5 make work with the new info api and fix what looks to be a malloc bug 2001-11-05 17:09:27 +00:00
Bill Currie b286afc7f7 don't install skin_stencil.h 2001-11-05 16:22:03 +00:00
Adam Olsen ded1b4c057 - add some missing boundschecking to CDAudio_Play's track remap (in
specific plugins only)
- convert updateping, updatepl, updateentertime, updatestat,
  updatestatlong, cdtrack intermission, finale, muzzleflashchokecount,
  maxspeed, entgravity, and setpause on the client.  Can you say all
  that in one breath? :)
2001-11-05 16:17:45 +00:00
Adam Olsen d693bc27ff - merge the svc_strings arrays for cl_parse.c and net_packetlog.c into
net_svc.c, and add add a NET_SVC_GetString function to access it.
  As an added bonus, it actually boundschecks it!
- preexpand that annoying SHOWNET macro, which was only used twice,
  and was quite small and pointless
- whitespace cleanup and a comment typo fix
2001-11-05 07:53:03 +00:00
Brian Koropoff 008b59b777 The beginnings of an f_* reply system have been added. f_version works
like normal, f_skins reports the average percent fullbright for all loaded
skins, and f_skins skinname reports the fullbright percent for a signle
skin.  cl_freply controls the time in seconds before another query can be
made.  Set it to 0 to disable them.  More queries will be added later.
The table for accessing special characters from the console has been
tweaked a bit.  Expect it to get tweaked more in the future.
2001-11-05 07:23:51 +00:00
Bill Currie f91abcb3d5 fix the default for cmd_warncmd for the server 2001-11-05 02:15:30 +00:00
Bill Currie c443e2c024 info.c:
support unlimited info strings when maxsize is 0
sv_main.c:
	make localinfo unlimited
2001-11-05 02:08:20 +00:00
Bill Currie ac93a620d7 remove instead of set "" info keys for localinfo 2001-11-05 02:03:37 +00:00
Bill Currie bf4570de72 fix some reversed logic that caused the server to send the wrong info keys
to a connecting client.
2001-11-04 23:02:43 +00:00
Adam Olsen 87a0a4d7d6 - a TODO item
- converted svc_packetentities and svc_deltapacketentities
- added some convenience defines for U_foo grouping
- tweaked Host_NetError's "please report this" print, but it still
  doesn't work
2001-11-04 21:23:22 +00:00
Bill Currie 7c5c53774f cache some info strings (team and skin from client user info) and values
(no_pogo_stick and teamplay from server info) to cut down on the calls to
Info_ValueForKey (from over 550k to 23.5k in spam2.qwd).
2001-11-04 19:06:50 +00:00
Bill Currie dcd9b0040e rewrite the info strings to use hash tables instead of a static string.
This required changes to the api (info_t instead of char *) but should be
a net gain in speed (not a lot, admittedly: it was pretty fast to begin
with, but this paves the way for some other changes I have in mind).
2001-11-04 07:50:39 +00:00
Adam Olsen c5f4af0109 - convert svc_playerinfo, cvs_nails, svc_modellist, and svc_soundlist 2001-11-03 10:48:55 +00:00
Bill Currie 6daf712d5f turns out the server can send MAX_MSGLEN + 8 bytes, so handle this when
reading demo packets.
2001-11-03 00:54:18 +00:00
Bill Currie 9209138fac nuke the max message lengths from qdefs.h 2001-11-03 00:27:01 +00:00
Bill Currie e1e56c417d Host_NetError is not appropriate for an oversize packet as that packet's data
has not yet been read.
2001-11-02 23:57:22 +00:00
Adam Olsen d7e5f88ee3 - conver svc_spawnstaticsound, svc_updateuserinfo, svc_setinfo,
svc_serverinfo, and svc_download

I havn't tested svc_download, since I don't want to play with having
seperate dirs for the client vs server on one computer.
2001-11-02 14:52:29 +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
Adam Olsen f9ab09356e - make nails, soundlist, and modellist return NET_ERROR when there's
too many items in the block
2001-11-02 06:39:51 +00:00
Adam Olsen 1c30d89149 - add a net_status_t enum, containing NET_OK, NET_SHORT, and
NET_ERROR.
- change all the NET_SVC_*_Parse return values from qboolean to
  net_status_t
- make NET_SVC_{,Delta}PacketEntities_Parse return NET_ERROR instead
  of 1 (NET_SHORT now) if the struct size is exceeded
2001-11-02 06:00:21 +00:00
Adam Olsen c79294f57d - consider ':' and '"' to be special characters in names, just in case
- make sure to update the infostrings if they tried changing a name
  and it was the same after sanitizing
2001-10-31 03:05:59 +00:00
Adam Olsen 388c3a78ee - fix handling of highbit whitespace in names, as well as stripping
all highbits from names
2001-10-31 02:18:09 +00:00
Adam Olsen 2bbb759232 - change the sv_kickfake default to 0, so it replaces \r with #
instead of kicking
2001-10-31 00:30:31 +00:00
Ragnvald Maartmann-Moe IV c174188c0c Remove local len, use mathlib's Length, among other cleanups. 2001-10-30 20:00:05 +00:00
Adam Olsen c0f363e05c it seems that map changes generate from mismatches, so change that
back to a silent warning (but also make it drop the packet)
2001-10-30 09:15:09 +00:00
Adam Olsen 61f819b5c9 - further error checking rearangements, putting the "old packet" check
first, and making it a Con_DPrintf that just invalidates that packet
2001-10-30 02:29:04 +00:00
Adam Olsen 950331a1f4 clean up a few error messages, rearange error checks, and change some
"impossible" warnings into errors.
2001-10-30 00:24:25 +00:00
Bill Currie ddd7989b85 turns out I was wrong about how U_REMOVE gets into an update packet (thanks
Rhamph) but the change from short to int in words does a nice bit to the
speed.
2001-10-29 21:46:00 +00:00
Bill Currie 5819fc200c shrink the packet entities word arrays down to MAX_PACKET_ENTITIES + 1 and
ensure the array is always terminated with a 0. This seems to give -x11 a
0.03 fps (0.06%) boost.
2001-10-29 19:15:29 +00:00
Bill Currie 85c9e0ab1e more externs cleaned up 2001-10-29 17:46:03 +00:00
Bill Currie d04edfaaf2 whitespace 2001-10-29 05:42:10 +00:00
Adam Olsen e3c5da4fdd - remove the now unused net_svc_delta_t struct 2001-10-29 00:52:02 +00:00
Adam Olsen 36b8256b3a - fixed net_packetlog to use Con_Printf when there's no logfile open,
rather than a stdout hack (which had problems with buffering)
- actually parse net_deltapacketentities
- print offset within net_{,delta}packetentities blocks for each
  entity
- fix indenting in Log_Delta
- fix off-by-one for packet offset printing
- fix a miss-parsing of svc_deltapacketentities
  (MAX_PACKET_ENTITIES does NOT include U_REMOVE entities)
- remove "full update" handling for CL_ParseDeltaPacketEntities, since
  that only happens with svc_packetentities
2001-10-29 00:32:16 +00:00
Bill Currie 78a3e398d5 * taniwha gets medieval on extern 2001-10-28 04:23:37 +00:00
Adam Olsen f3fe1cec87 - add a request to send any errors to quake-devel in Host_NetError
- cleanup CL_ParseDeltaPacketEntites a little bit
- change some warnings in CL_{,Delta}PacketEntites to errors, as well
  as full updates with delta*, so that they can either be debugged or
  shown not to be needed
2001-10-28 00:51:14 +00:00
Bill Currie d62c381262 Con_Printf -> SV_Printf for some cases that should be 2001-10-27 22:33:42 +00:00
Bill Currie aa6472da2b cleanup qport usage a little 2001-10-27 08:28:15 +00:00
Brian Koropoff 05f35f9cd4 This adds the ability to access special characters in console commands by proceeding certain characters with $. See libs/util/cmd.c for the conversion table. Preceeding a character by # will shift it up or down by 128, which basically is useful for accessing the brown letters and numbers. All special characters were removed from Team_ParseSay, and variable substitution now takes the form of ${var} to prevent conflicts with special character substitution. Special character access is controlled by cmd_highchars, which defaults to off. 2001-10-27 04:34:53 +00:00
Adam Olsen b8eb324ded - make CL_ParseServerMessage's loop break if we disconnected while it
was running
2001-10-26 16:01:59 +00:00
Bill Currie 7910fe026b nuke FlushEntityPacket and CL_ParseDelta as they are both redundant and
FlushEntityPacket now causes a crash.
2001-10-26 15:04:51 +00:00
Adam Olsen b5856e8be0 - audit of the net_svc.c users' sanity checking 2001-10-25 23:26:33 +00:00
Adam Olsen 3bba5398ba - audit malloc usage. now everything checks the return value :) 2001-10-24 22:50:06 +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
Bill Currie 4ae92c8d42 new cvar: sv_hide_version_info. This hides QuakeForge specific info strings
from progs.
2001-10-24 02:50:11 +00:00
Bill Currie b5341f0d13 we now compile and link with -fno-common. this cleans up the multiple,
uninitialized declarations of variables.
2001-10-23 16:55:23 +00:00
Adam Olsen 818f5de658 - rename CL_ParsePacketEntities to CL_ParseDeltaPacketEntities
- fix various spots in the above that called Host_EndGame but didn't
  return
- switched the order of modellist and soundlist in net_svc*, to
  conform with the rest of the files
- create a new CL_ParsePacketEntities, that only handles
  svc_packetentities (so it's much simpler).  it uses net_svc*
2001-10-21 14:21:30 +00:00