Commit Graph

69 Commits

Author SHA1 Message Date
Bill Currie e7ffad8772 more rua cleanups: now just one init function to call (it calls the rest) 2004-01-16 07:03:58 +00:00
Bill Currie 01392c78bb move the bulk of what whas libQFcsqc to libQFruamoko. 2004-01-16 05:46:19 +00:00
Bill Currie cca1558688 should have compile tested. oops 2004-01-06 23:23:38 +00:00
Bill Currie 89e6b8b2e6 ensure ucmd_unkown and sv_cbuf->unkown_command always point somewhere sane 2004-01-06 23:04:14 +00:00
Bill Currie 133879f8fa provide builtin mappings for id (none, really), qf and ktpro/qwe (qw only),
add qwe builtin extensions to qw-server. provide sv_progs_ext to control
the builtin mapping. valid values are "id", "qf" (our old static builtins),
"qwe"/"ktpro" (either works. for ktpro mod support) and "none" (no
mapping). any other value is equivalent to "none".
2004-01-06 07:00:39 +00:00
Bill Currie acd54afff7 move to using a hash table for builtin number -> builtin lookup so sparse
ranges can be used efficiently. move the auto-allocated builtins to
0x10000000-0x7fffffff. should be more than enough :)

use static builtin tables ("nul" terminated) instead of a series of
function calls to add builtins to a vm. should be more memory efficient.
2004-01-06 05:51:09 +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 59d321ded5 link in the hash functions for progs 2003-08-20 22:37:49 +00:00
Bill Currie a99c859034 "main" in progs is never called 2003-02-28 05:53:40 +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 2e0ed3377c basic (very!) implementation of the new filesystem directory struture code.
All the details of game directories will be fully configurable (search
paths and gamecode file name currently supported). Downloading of skins to
qw/skins only currently broken (will download to $gamedir/skins for now).
2003-01-10 22:47:18 +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 9298204208 support tonik's single player/coop qw port 2002-10-24 02:45:16 +00:00
Bill Currie 5009213564 Move the signal handling code from video/targets/* to sys.c (I'm leaving
the SDL target files for Despair since he's working on the currently). Also
make progs segfault handling much more robust (and general: sigill etc too:)
2002-08-20 23:04:57 +00:00
Bill Currie b4f9652535 give the server progs access to the Cmd api 2002-07-05 06:55:38 +00:00
Bill Currie cb814165f8 allow progs to register user commands (but not override any of the standard
ones (yet))
2002-07-05 06:43:47 +00:00
Bill Currie cf9e1de5a6 sv_progs_zone controls the size of the zone for the progs. defaults to
256kb (64k `globals').
2002-05-31 15:27:56 +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 d4cc899d33 even id has that blasted bug :/ 2002-04-16 17:18:28 +00:00
Bill Currie 0d525189f4 fix some problems with error printing, especially when using the curses
console
2002-04-10 21:03:02 +00:00
Bill Currie 3e4c200430 more evil hacks to get nq's and qw's sv_phys.c similar. 2002-02-25 22:57:17 +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 0ea713eda4 redo the progs loader to allocate all the memory needed for progs in one
shot, allowing for caller specified alloc and edicts and zone memory sizes.
(progs + edicts + zone).
2002-01-29 20:53:44 +00:00
Bill Currie 14ac3acc17 add a builtin (gametype) for detecting the, well, game type (ie, netquake
or quakeworld) which just returns the apprproate string. the single player
menu is now acessable in nq but not qw :)
2002-01-20 03:09:03 +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 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 3a366f4f7e break out the backtrace code from PR_RunError into PR_DumpState and use
PR_DumpState instead of PR_RunError in seg_fault_handler so we get both a
progs trace /and/ a core file (ulimit allowing)
2001-10-08 03:46:44 +00:00
Bill Currie cca3e4c203 fix a coupld d'ohs for pr_checkextensions 2001-09-28 21:39:13 +00:00
Bill Currie 89fbacdc78 make sv_progs CVAR_NONE rather thatn CVAR_ROM so it can be set in server.cfg. 2001-09-28 15:29:22 +00:00
Bill Currie b1f4a778f9 the rcsid commit from hell }:> 2001-09-28 06:26:31 +00:00
Bill Currie ea966952be segmentation fault handler from kkqwsv (thanks, Bill;) but with a couple
minor improvements (you get a core file if the seg wasn't triggered by progs).
2001-09-23 00:15:53 +00:00
Ragnvald Maartmann-Moe IV f4fd3178f4 More header and whitespace horror reduction. 2001-08-28 02:43:24 +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 bbef4b0b6f ugh, I hate the need for this, but it's needed. sv_old_entity_free is my
compromise :) set it to 1 to allow progs like MegaTF to work (reload crash).
2001-08-12 04:14:25 +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
Adam Olsen ae133d0a90 Modify progs to add builtins at runtime. It should be trivial to
lookup functions by name, and make all our new QC builtins allocate
numbers automatically.
2001-08-03 06:40:28 +00:00
Bill Currie fb26d8b18a make Info_Set* take flags indicating wether funchars should be stripped or not 2001-07-31 18:27:49 +00:00
Bill Currie 22219fdeb0 fix a slight oopsie in Rhamph's checkin:) 2001-07-26 00:08:42 +00:00
Adam Olsen 619b12375c Start of support for rotated bboxes. shouldn't do anything yet 2001-07-26 00:01:13 +00:00
Bill Currie 743fd9cc19 rename SetUserInfo to UserInfoCallback.
set self to the client entity for UserInfoCallback.
add void (entity ent, string key, string value) setinfokey = #102;
	similar usage to infokey.
2001-07-20 05:05:47 +00:00
Bill Currie d30f1ee0c2 add an /optional/ SetUserInfo qc callback to allout the progs to take over
userinfo setting.

float (string key, string value) SetUserInfo;

key = infostring key
value = new value
returs: 0 for key not changed, non-0 to broadcast the change
2001-07-20 04:30:33 +00:00
Adam Olsen a771b5bd6c Make edicts command support a search string, so it only prints edicts
with matching classnames.  Makes it easy to print out the type you want
for debugging :)
2001-07-19 03:18:11 +00:00
Bill Currie 47a6f2c9b5 pr_debug.c:
capitolise CRC and add a \n to the message
sv_progs.c (both nq and qw):
	don't bother checking the progdefs.h crc: it's just not needed any more
pr_imm.c:
	use r instead of rep when checking the hash tables.
main.c (quaq):
	make developer work and set com_filesize (otherwise, progs crc doesn't
	get set properly (com_filesize, not developer:))
2001-07-18 21:28:41 +00:00
Bill Currie 1c9e1b176f fear the mighty const correct patch 2001-07-15 07:04:17 +00:00
Adam Olsen 155b46b8c8 More diff noise reductions. yay! 2001-07-15 01:48:03 +00:00
Adam Olsen dcaa0b205f Make coop play possible in qw. Create a progs variable called 'current_skill'
and you'll get the nq edict pruning behavior.
2001-07-13 22:47:11 +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
Bill Currie 560b475880 gcc 3.0 compile fixes 2001-06-19 22:05:13 +00:00