Commit Graph

93 Commits

Author SHA1 Message Date
Bill Currie a55f490b47 Add support for map specified fog and skys to qw. 2011-09-04 09:58:12 +09:00
Bill Currie 55cc0f9206 Bring back the unsigned type (PROGS version bump)
This is only low-level support (the unsigned keyword still does not work),
but sufficient to make switch statements using jump tables work.
2011-04-09 10:07:47 +09:00
Bill Currie 75ec6bf244 Clean out some unnecessary types from the progs engine and clean up the mess.
This is a nasty commit, sorry, but 99% of the commit is interdependent.
2011-01-10 12:25:31 +09:00
Jeff Teunissen 9f596df607 QW skybox handling
Since we clip the world properly even with skyboxes active, and the
'skybox' serverinfo doesn't do anything in any other engine I know of,
nuke the 'skybox' serverinfo entirely and use a nice short semi-standard
name ("sky") for the serverinfo containing the map's preferred skybox
(as potentially modified by the .ent file on the server).
2010-12-28 15:02:56 -05:00
Bill Currie dc99bc19c5 Make sure the r_skyname serverinfo key gets cleared on map change.
This ensures that the map's sky is always used unless the client itself has
set its r_skyname cvar.  The server's r_skyname cvar is now the default
name for the skybox for when the map does not specify one. The map's sky
worldspawn field overrides this. The r_skyname cvar is no longer a
serverinfo cvar.
2010-12-27 23:12:46 +09:00
Bill Currie 51009cdc4b Clear the server progs data when loading progs.
The baseline data doesn't matter so much, but the pointer fields relied on
the progs engine clearing them. I forgot about this :/
2010-12-09 21:35:21 +09:00
Bill Currie 3ae2ef8d11 Remove non-progs data from edict_t.
All data that is irrelevant to the progs engine itself has been removed
from edict_t and moved into the sv_progs code.
2010-12-09 17:24:37 +09:00
Bill Currie 8c4fe2f844 Rename Sys_DPrintf to Sys_MaskPrintf.
We now have finer runtime control over what gets printed. Need to do a
SYS_DEV audit, creating new masks as apropriate.
2010-11-26 16:19:26 +09:00
Bill Currie 916aa6fe8b give nq debugging abilities and minimize the differences between nq and qw 2010-01-13 06:29:36 +00:00
Bill Currie 6eae016d3e minor cleanups
fix some comments, cleanup some whitespace, and don't explicitly call
PR_RelocateBuiltins as it is called (indirectly) by PR_LoadProgs.
2010-01-13 06:28:28 +00:00
Bill Currie d66934942d nuke Con_Printf and Con_DPrintf and use Sys_* instead 2007-11-06 10:17:14 +00:00
Bill Currie 3e50aae01f "print" command for dumping values in the progs and add return type info to the debugging information 2007-09-15 07:47:31 +00:00
Bill Currie fe4a4a9e55 "hardware" (haha) watch points (one!) in progs. only catches changes done by progs, and the expression parser is as flaky as anything, but it's better than nothing :) 2007-05-08 02:04:47 +00:00
Bill Currie b203512eb7 don't complain about _fields not being found 2007-04-07 01:02:14 +00:00
Bill Currie 15e17b7c42 cpqw support. set sv_progs_ext to "cpcw" to activate its mapping 2007-04-06 13:59:05 +00:00
Bill Currie 5b761bac83 make progs related code a little more consistent with its int type usage 2007-04-06 00:47:41 +00:00
Bill Currie 78d98ea787 remove the time pointer (not really needed)
This is an imperfect revision of history.
2004-11-09 22:32:00 +00:00
Bill Currie f5bc90a53a clean up some redundant progs functions (may be broken for a while)
This is an imperfect revision of history.
2004-11-05 11:49:00 +00:00
Bill Currie 4882005a49 compile fixes (oops) and start working on quaternion support in qfcc 2004-04-08 02:33:20 +00:00
Bill Currie 768de2df0e work with progs that use @self instead of self 2004-02-17 05:12:50 +00:00
Bill Currie 920b80fd8c fix a goofed hardcoding 2004-02-07 00:19:51 +00:00
Bill Currie 76d7fc2b6d arg, forgot to terminate the arrays again 2004-01-25 05:27:28 +00:00
Bill Currie d9ac6dd99a d'oh, forgot to fix this in qw 2004-01-21 23:09:00 +00:00
Bill Currie 390ca99a92 first step to making qfdefs redundant. "standard" progs now get resolved
staticly rather than looking up the defs. "broken" progs should now work.
2004-01-21 08:09:47 +00:00
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