Commit graph

169 commits

Author SHA1 Message Date
Bill Currie
15b381909e move maplist from quakefs.c to console/maplist.c. Unfortunatly, until the
client console plugin is usable, this means the clients link maplist.o
directly.
2001-11-05 22:24:16 +00:00
Bill Currie
460b53e9ee rework the maplist code to use Con_DisplayList. this results in both
prettier code and prettier output.
2001-11-05 21:30:53 +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
9f4a565523 rename some get_key functions so they're all uniqely named (matters only for
profiling purposes thanks to static:)
2001-11-05 03:21:42 +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
9829cf3993 do not include \key\value pairs in the output of Info_MakeString for
backwards compatability with the old info key system.
2001-11-05 01:29:45 +00:00
Bill Currie
96a2ac9a70 put the info string tolower/highchar handling back in 2001-11-04 22:00:32 +00:00
Bill Currie
23a2760194 change formating for Info_Print 2001-11-04 20:48:12 +00:00
Adam Olsen
3417167e7e - compile fix for info.c. We can't call any functions until /after/
all variables are declared.
2001-11-04 15:42:26 +00:00
Ragnvald Maartmann-Moe IV
6d62497934 Typo fix. 2001-11-04 15:31:17 +00:00
Bill Currie
b0e9bd3ddc fix a bogus leak in info strings 2001-11-04 08:18:54 +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
Bill Currie
fa976d4461 cvarlist cfg will now give output suitable for a config file 2001-10-30 23:33:47 +00:00
Ragnvald Maartmann-Moe IV
7ea1051b9a Code cleanups. 2001-10-30 19:55:34 +00:00
Bill Currie
78a3e398d5 * taniwha gets medieval on extern 2001-10-28 04:23:37 +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
Bill Currie
6bbb9a75a3 remove an unneeded check 2001-10-26 03:12:31 +00:00
Adam Olsen
3bba5398ba - audit malloc usage. now everything checks the return value :) 2001-10-24 22:50:06 +00:00
Bill Currie
9c92634cbf remove an extern 2001-10-24 15:02:18 +00:00
Bill Currie
fedea4a5e1 check for malloc failure 2001-10-23 17:35:46 +00:00
Bill Currie
6c0d760102 msg.h:
give mst_t a buffer to hold unterminated message strings
	kill MSG_ReadStaticString and MSG_ReadStringLine
msg.c:
	kill MSG_ReadStaticString and MSG_ReadStringLine
	MSG_ReadString: implement the buffer for unterminated message strings
	and update readcount on badread
cl_main.c:
	go back to MSG_ReadString and fix up the resulting const char * issues
cl_parse.c:
	rewrite the cl_mofake code all because of an uninitialized variable :)
sv_main.c:
	use MSG_ReadString instead of MSG_ReadStringLine because
	Cmd_TokenizeString really doesn't care about a terminating \n
2001-10-18 06:23:26 +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
Bill Currie
1b1955551a make all the multi-byte MSG_Read* functions update msg->readcount when the
end of the buffer is hit so subsequent MSG_Read* calls for smaller values
error as well. Also add a check for badread in MSG_ReadFloat
2001-10-18 04:14:18 +00:00
Bill Currie
2d068c0745 massive windows.h and WIN32 cleanup. 2001-10-16 21:40:45 +00:00
Bill Currie
4a0194b95c correct the default of cmd_warncmd 2001-10-15 22:41:42 +00:00
Bill Currie
742bb9de91 static plugins now actually work 2001-10-10 16:22:41 +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
Bill Currie
a1d2cf3532 duplicate file name cleanup and make dist works 2001-10-03 17:50:36 +00:00
Ragnvald Maartmann-Moe IV
9c6955f406 Fix missing include. 2001-10-02 23:53:07 +00:00
Bill Currie
40d0490b7c add Hash_GetList to get a list of elements in the hash table (unsorted) 2001-10-02 23:17:25 +00:00
Chris Ison
60107fd19c changes to get cygwin to compile server. still debugging result 2001-09-29 09:39:27 +00:00
Bill Currie
30f6d2f85c fix a case and paste error 2001-09-28 15:29:56 +00:00
Jeff Teunissen
d63243380f Aaaaaaand, it's done!
Special note: I hope to never do this again. :)
2001-09-28 10:31:20 +00:00
Bill Currie
b1f4a778f9 the rcsid commit from hell }:> 2001-09-28 06:26:31 +00:00
Bill Currie
a439170dcf libasm cleanups 2001-09-25 22:12:55 +00:00
Bill Currie
06da30ac89 mingw build fixes again (including mostly working in sid: got some link issues) 2001-09-25 06:18:30 +00:00
Bill Currie
36de3c147e move Sys_Quit and Sys_Error totally into libQFutil. They will call a list
of pre-registered (Sys_RegisterShutdown) function before actually exiting
the program. This should take care of the pain when an ncurses server
crashes.
2001-09-24 21:00:23 +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
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
Ragnvald Maartmann-Moe IV
fb7918d4f8 Optimize DEG2RAD a little, plus some whitespace. 2001-09-10 04:20:27 +00:00
Ragnvald Maartmann-Moe IV
7af79b96ec Lots of whitespace, header cleanups, and a few tiny optimizations. 2001-09-09 21:41:35 +00:00
Adam Olsen
9ab9764b7a - Change QA_alloc to use variable-arguments, allowing for a much more
extensible interface.
2001-09-05 18:23:38 +00:00
Adam Olsen
f1a016c8a5 - Refine the Cache_Get callback, to use a void * instead of a char *
- Switch alias models over to Cache_Get/Cache_Release
2001-08-31 12:22:45 +00:00
Adam Olsen
6cab8cf4e0 - change Cache_Get calls to Cache_TryGet (which I just added), so they
can tollerate failure.
- minor error message tweak (an emptry string is not NULL!)
2001-08-31 03:48:26 +00:00
Bill Currie
e469b934ea get alsa0_9 working with latest cvs, we need to dlopen the plugin with
RTDL_GLOBAL. To use RTDL_GLOBAL, we need to make as much static as possible
 and PluginInfo needs a unique name (%s_%s_PluginInfo, type, name).
2001-08-31 00:05:58 +00:00
Adam Olsen
e149094bd2 - rename Qalloc and friends to QA_alloc
- add a QA_strdup
- add Cache_{Add,Remove,Get,Release}, for the locking version of the
  cache
- Convert libs/audio/* over to locking cache functions
2001-08-30 11:37:50 +00:00
Bill Currie
0d55476711 make VectorSubtract and VectorCompare macros and clean up the readability
of R_DrawParticles
2001-08-29 20:19:54 +00:00
Bill Currie
3656d6fd59 compile fixes for win32 and take the pruning shears to *sys*.c in qw and nq
(they're not done yet, though)
2001-08-29 17:45:53 +00:00
Adam Olsen
5aceb0435e - add a cache_print command
- rename flush to cache_flush
- split off freeing of cache into a seperate function, as well as
  making it aware of read locks.
2001-08-29 15:29:17 +00:00