Commit Graph

39 Commits

Author SHA1 Message Date
Bill Currie ff08ef3fa3 [nq,qw] Fix segfault when calling think
Think has no "other", and E_POINTER doesn't check for null (by design:
it's meant to be as fast as possible).
2022-02-06 21:20:00 +09:00
Bill Currie 01345ba675 [gamecode] Wrap most uses of PR_RESET_PARAMS with push/pop frame
rua_obj was skipped because that looks to be a bit more work and should
be a separate commit.

This is to avoid the stack getting mangled when calling progs functions
with parameters.
2022-02-05 10:26:47 +09:00
Bill Currie e9e54d08c0 [gamecode] Rename func_t to pr_func_t
Even more consistency.
2022-01-18 15:36:58 +09:00
Bill Currie cfe7c44df0 [gamecode] Rename ev_integer to ev_int
And other related fields so integer is now int (and uinteger is uint). I
really don't know why I went with integer in the first place, but this
will make using macros easier for dealing with types.
2022-01-18 13:27:19 +09:00
Bill Currie 2df64384c1 [gamecode] Clean up string_t and pointer_t
They are both gone, and pr_pointer_t is now pr_ptr_t (pointer may be a
little clearer than ptr, but ptr is consistent with things like intptr,
and keeps the type name short).
2022-01-18 12:11:14 +09:00
Bill Currie 0bd05c71ac [gamecode] Use unsigned for entity values
I don't know why they were ever signed (oversight at id and just
propagated?). Anyway, this resulted in "unsigned" spreading a bit, but
all to reasonable places.
2022-01-16 22:15:18 +09:00
Bill Currie 4f8a06ddd3 [build] Fix a pile of gcc 10 issues
gcc got stricter about array accesses, complicating progs macros, and
much better at detecting buffer overflows.
2020-12-28 18:58:51 +09:00
Bill Currie df7c08a010 Add support for doubles to Ruamoko
Only as scalars, I still need to think about what to do for vectors and
quaternions due to param size issues. Also, doubles are not yet
guaranteed to be correctly aligned.
2020-02-15 23:49:12 +09:00
Bill Currie f9a384ffd4 Make simple gravity acceleration framerate independent.
Now it doesn't matter if you get 22 fps or 72, you jump the same height,
which actually happens to be slightly higher than the previous 72fps jump.
Effectively, you jump the height you would if you got infinite fps ;)
2012-04-28 14:54:58 +09:00
Bill Currie bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie 37b0648ec7 Undo the func field as selector patch.
The support code for the patch is left intact (it will be needed later),
but idea is too cumbersome for working with existing progs.
2011-04-08 15:01:56 +09:00
Bill Currie 2bacfdabf2 Interpret func fields as selectors for entities with objects. 2011-03-30 20:19:31 +09:00
Bill Currie 87acf89404 lots of whitespace 2010-12-09 18:32:21 +09:00
Bill Currie bc91faf51e Change back to storing the leafnum.
Still unlimited, of course :)
2010-12-09 17:24:38 +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 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 c2b9d8d549 fix some bugs found by figuring out why PR_RESET_PARAMS exists 2006-12-05 09:55:37 +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 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 84ea81a770 fix E_POINTER and E_FUNCTION 2003-09-12 23:12:21 +00:00
Bill Currie 9298204208 support tonik's single player/coop qw port 2002-10-24 02:45:16 +00:00
Bill Currie e8026d9c76 touch, think and blocked now support methods
also a little whitespace cleanup
2002-05-31 21:05:58 +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 5a1c0af8ca more cloning :) 2002-02-20 20:53:41 +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 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 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 05cf89dd5d make progs type checking optional at configure time. still defaults to on. 2001-06-08 00:11:54 +00:00
Bill Currie f78b973978 move the api headers into include/QF and clean up (most of) the resulting mess.
target specific files that I don't build won't compile yet. just put QF/
infront of the offending headers.

Also move ver_check into libqfutils
2001-03-27 20:33:07 +00:00
Bill Currie f6073d756f better progs access error checking and cleanups resulting from it. Fixes
mega2k and nq.
2001-03-27 03:57:17 +00:00
Bill Currie baa5ce01a1 more independence cleanups and nq is closer to running 2001-03-03 08:59:55 +00:00
Bill Currie 6c9de8061b fix the silly OP_STATE bug. also erradicate pr_offs.c and its contents (the
source of the bug)
2001-03-02 19:18:04 +00:00
Bill Currie 10e6b7af84 edict field access type checking :) Currently forced on, but it will become a
configure option in the future
2001-03-01 21:11:35 +00:00
Bill Currie 4fcf7704d3 clean out unused fields 2001-03-01 19:05:40 +00:00
Bill Currie ef38fd2e79 progsdef.h is now used only for the PROGHEADER_CRC def. Much of the protocol
still seems to be broken :(
2001-03-01 18:44:19 +00:00
Bill Currie ad18afaa3c really clean up global and function access. Unfortunatly, frames are still
borked, at least for the view entity.
2001-03-01 08:34:30 +00:00