Commit Graph

186 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
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
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 9209138fac nuke the max message lengths from qdefs.h 2001-11-03 00:27:01 +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 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
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
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
Bill Currie aa6472da2b cleanup qport usage a little 2001-10-27 08:28:15 +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
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
Adam Olsen d69c8013aa - convert svc_spawnbaseline and svc_spawnstatic
Only notable ones left now are packetentities and deltapackentities :)
2001-10-20 11:59:42 +00:00
Adam Olsen 32fbdba399 - move the MAX_PROJECTILES def from cl_ents.c to bothdefs.h
- convert svc_nails
2001-10-20 08:10:25 +00:00
Adam Olsen a4d9507895 - roast the unnecesary MAX_STYLESTRING def from bothdefs.h
- rename the message argument of NET_SVC_*_Parse to msg
- rename the other argument to block, for brevity
- convert svc_spawnstaticsound
- convert svc_serverinfo
- convert svc_playerinfo
- fix a exploitable buffer overflow with svc_lightstyle
2001-10-19 21:20:49 +00:00
Adam Olsen c2807a6da1 - and svc_temp_entity too. Probably the last I'll do today. 2001-10-18 18:48:49 +00:00
Adam Olsen 9cef5a1edc - svs_sound too of course 2001-10-18 13:33:12 +00:00
Adam Olsen eb9c515c2a - yada svc_damage, svc_serverdata
- remove a no longer valid commit from NET_SVC_UpdateUserInfo_Parse,
  and make it always set name/data to 0 if they're unused
2001-10-18 08:57:03 +00:00
Adam Olsen cf8380b528 - change NET_SVC_*_Parse to return qboolean, indicating if they had a
bad read
2001-10-18 07:34:38 +00:00
Adam Olsen d2fe052d59 - convert svc_setinfo, bla bla, you know hte drill 2001-10-18 07:23:33 +00:00
Adam Olsen 634c2c6acf - rename CL_UpdateUserinfo to CL_ParseUpdateUserInfo for uniformness
- rework svc_updateuserinfo/CL_ParseUpdateUserInfo like everything
  else
2001-10-18 07:01:40 +00:00
Adam Olsen 7d26e6e2b9 - move the svc_print handling into a seperate function (CL_ParsePrint)
- add NET_SVC_{Print,Download}_Parse functions and assosiated
  net_svc_{print,download}_t structs.
- make CL_Parse{Print,Download} use the above stuff
2001-10-18 06:35:28 +00:00
Adam Olsen 18036b63d9 - change MSG_ReadString to return const char * and return a pointer
directly into the packet data.
- change a bunch of char *'s to const char *'s for the above.  Only
  thing that had trouble was the cl_nofake handler, which I changed to
  use a local buffer.
- add MSG_ReadStaticString which acts like the old MSG_ReadString,
  specifically that it uses a static buffer and tollerates
  unterminated strings.
- add a Q_strnlen function, and make strnlen use it if strnlen is
  undefined.
- Add a net_svc.h and net_svc.c which will preparse svc messages into
  structs, for easier handling.  Currently only soundlist and
  modellist are done.
2001-10-18 04:44:58 +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 1929797cc9 get nq-server so it runs. part of this involved renaming cl_warncmd to
cmd_warncmd
2001-10-03 21:25:43 +00:00
Adam Olsen 1f87234aac - change MAX_MASTERS from 8 to 32, since prozac has 9 of them 2001-10-03 03:42:28 +00:00
Bill Currie 7fcdffb42e mirror the chase and watervis serverinfo keys in the cl struct so
Info_ValueForKey doesn't get hit so often.
2001-10-01 01:51:36 +00:00
Bill Currie e9c420c749 nuke SV_RecursiveHullCheck from cl_cam.c and use PM_RecursiveHullCheck
instead. Also add prototype for PM_RecursiveHullCheck to pmove.h
2001-10-01 00:20:57 +00:00
Bill Currie c78edb3a36 Apply Seth Galbraith's <sgalbrai@linknet.kitsap.lib.wa.us> chasecam patch 2001-09-28 07:51:15 +00:00
Ragnvald Maartmann-Moe IV e2f14519fb Merge world.h. Also reduced smoke particle textures from 8 to 1, a considerable speedup through reduced texture thrash... 2001-09-24 17:52:13 +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
Bill Currie e27878e156 bring forward the sv_extentions and stdver changes from 0.3 2001-09-11 03:50:24 +00:00
Bill Currie 74e9f89e8c forward port the client info string filtering from 0.3 and remove info.h from
a couple of c files that no longer need it.
2001-09-11 03:10:29 +00:00
Bill Currie 882adf295a implement KK's ban, mute and cuff 2001-09-09 04:51:08 +00:00
Bill Currie a9d6bc9a30 total nukage of #ifdef QUAKE2 (R_DarkFieldParticles is present, just unused) 2001-08-27 23:21:09 +00:00
Bill Currie 74dfef5cd1 sort-of merge world.h and (mostly: Sys/Con vs SV) world.c this winds up
bringing rotated bboxes into nq :)
2001-08-27 22:16:11 +00:00
Bill Currie 3edd4550d2 heh, nor do we need PROGHEADER_CRC 2001-08-27 21:13:00 +00:00
Bill Currie 9d27a12df7 progdefs? where we're going we dont need... progdefs 2001-08-27 21:09:13 +00:00
Bill Currie 2a027969d5 various init order fixes and a */[] snafu sorted
also make translations big enough for the 32 bit colors
2001-08-25 05:54:21 +00:00