Commit Graph

63 Commits

Author SHA1 Message Date
Adam Olsen 7ff069c931 - when the progs cache a model, copy it onto the hunk, so the gc can't
squash it
- ditto for sounds, just in case
2001-09-23 15:14:08 +00:00
Bill Currie 410783025e misc fixes forwarded from 0.3 2001-09-11 06:04:10 +00:00
Adam Olsen 65e5a7a4fc fix userinfo filtering in PF_setinfokey 2001-09-11 04:52:29 +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 f4fd3178f4 More header and whitespace horror reduction. 2001-08-28 02:43:24 +00:00
Adam Olsen 3177d9c7eb Readd the aim builtin, which I must have accidentally removed earlier.
Ooops :)
2001-08-22 21:13:04 +00:00
Adam Olsen ea063a1e0f having duplicate functions is bad. 2001-08-22 05:50:01 +00:00
Adam Olsen 17ba7ef92f - move alot of the builtins to libQFgamecode_builtins
- move the init into qw and nq
2001-08-22 03:24:25 +00:00
Bill Currie 7047f2da36 fix some missing ()s that got lost due to the () forrest that got chainsawed
(ie, the previous code was /a mess/)
2001-08-16 02:08:22 +00:00
Zephaniah E. Hull eab8ff6e25 Just some MASSIVE speed boost for PF_findradius. 2001-08-15 23:03:37 +00:00
Bill Currie a290afd2b5 back out the dynamic allocation so prozac will still work 2001-08-12 19:50:23 +00:00
Adam Olsen 0c63c11b4b diff noise reduction. mostly just "progs_t * pr" to "progs_t *pr".
Only code change is copying qw's variable-size PF_VarString in place
of nq's 256 char "I wanna be a buffer-overflow exploit!" version.
2001-08-09 06:05:43 +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 9f00601b82 change checkfunction and getfunction to checkbuiltin and getbuiltin 2001-08-05 06:02:33 +00:00
Adam Olsen 040345bc60 Change all our new functions to use dynamically allocated builtin
numbers, except checkextension, checkfunction, and getfunction.  Yes,
this may break some stuff. :)
2001-08-04 23:58:03 +00:00
Adam Olsen dc98a63098 Add a getfunction, which gives an error if it's not found 2001-08-04 23:44:50 +00:00
Adam Olsen d241e8dd64 Make sure all the function names passed to PR_AddBuiltin are
lowercase, for sanity reasons.
2001-08-04 22:14:45 +00:00
Adam Olsen c218ede288 Add support for checkfunction, which is a builtin that searches for
another builtin by name, and returns it.

Soon I'll change all our new builtins to by allocated dynamically, as
well as changing the number checkfunction uses, and happily break
everything that uses them :D
2001-08-04 09:11:50 +00:00
Adam Olsen 484edfde55 Some of an aforementioned function to search for functions by name.
Guess it's not as trivial as I thought.
2001-08-03 07:37:21 +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
Adam Olsen 19387f0801 diff noise reduction, cleaned up the comments somewhat 2001-08-02 23:27:45 +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 2b19252d73 fix PF_hullpointcontents and the clip_mins/maxs setting in PF_rotate_bbox
NOTE: the api to PF_hullpointcontents has changed!!!
2001-07-31 17:09:42 +00:00
Bill Currie c3e3f8182d the hull growing seems to work now. 2001-07-30 22:53:01 +00:00
Bill Currie 6cb2cb5bdc start making the rotated bounding box (really dynamic clipping huls) more
generice, and also more in line with the rest of quake's clipping system
(ie, support the entity size selected hulls). I'm not /entirly happy with
what's here, but it's a start, and the force fields in customtf work /much/
better :)
2001-07-30 04:33:59 +00:00
Bill Currie dbb339651d make the hull plane setup a loop 2001-07-29 00:12:14 +00:00
Bill Currie 097f38d594 return a null edict properly 2001-07-27 23:22:21 +00:00
Bill Currie e69c1e8918 correct a typo in a comment 2001-07-27 23:07:38 +00:00
Bill Currie 219c58bd98 wrappers for SV_TestEntityPosition and SV_HullPointContents 2001-07-27 23:05:58 +00:00
Bill Currie 0b576e42a1 fix a small bug 2001-07-27 19:48:46 +00:00
Bill Currie 27dde8cefe sv_pr_cmds.c:
find the full bounding box for the rotated bounding box and put this
	into hull's clip_mins and clip_maxs. Also, provide:
		vector (integer hull, integer max) getboxbounds = #94
	to retrieve these values (max != 0 for clip_maxs, max == 0 for clip_mins)
world.c:
	SV_TestPlayerPosition now checks for a rotated_bbox hull
2001-07-27 06:39:06 +00:00
Bill Currie df2f517146 put in a couple of comments 2001-07-26 17:36:57 +00:00
Bill Currie 517be0adbb change rotate_bbox's `prototype'
void (integer hull, vector right, vector forward, vector up,
      vector mins, vector maxs) rotate_bbox = #97
2001-07-26 16:32:01 +00:00
Bill Currie a44da38e04 rotate the bounding box points, not just the planes
fix a really nasty bug with allocating a hull
2001-07-26 16:24:47 +00:00
Bill Currie 88eb9e118a forgot to subtract 1 from the incoming hull `handle' 2001-07-26 15:33:55 +00:00
Bill Currie 5ebee4a28b rotated bounding box support. this is so totally untested it's not funny
(though it does compile). Keeps things simple and only checks touched.

.integer rotated_bbox;

ent.rotated_bbox = getboxhull ();// be sure to check for failure (0)
rotate_bbox (ent.rotated_bbox, ent.angles, ent.mins, ent.maxs);
...
freeboxhull (ent.rotated_bbox); // when freeing entity. box hulls are limited

integer () getboxhull = #95
void (integer hull) freeboxhull = #96
void (integer hull, vector angles, vector mins, vector maxs) rotate_bbox = #97
2001-07-26 04:26:54 +00:00
Bill Currie 64a2f8d277 rearrange the comments for the builtins table, and put a comment with the
builtin number (and prototype where appropriate) on every element
2001-07-25 23:33:06 +00:00
Zephaniah E. Hull 08bc0e987b New PF_checkmove! A direct interface to SV_Move, but named better.
(This is #98.)
2001-07-25 22:14:42 +00:00
Bill Currie d12a0a930d return of UserInfoCallback is now ignored and SV_Userinfo_f just returns as
PR_setuserinfo now does the extract from userinfo.
2001-07-24 22:11:44 +00:00
Bill Currie 22c9716b56 rename int_var to integer_var 2001-07-22 20:20:46 +00:00
Adam Olsen 2f223924f4 Add a set of "crudefile" file io functions. Reads or writes an
entire C string (including terminating nul).  Read the source for
more details :)
2001-07-22 19:03:26 +00:00
Bill Currie abf34ac2d3 send the right one 2001-07-20 05:30:51 +00:00
Bill Currie a09705953f forgot to send the updates to the clients 2001-07-20 05:29:45 +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
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 1c9e1b176f fear the mighty const correct patch 2001-07-15 07:04:17 +00:00
Adam Olsen 484f5494b8 Add my strlen and charcount functions as quakec builtins. strlen
returns the total string length, and charcount returns the number of
times the given character appears.
2001-07-13 22:58:31 +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
Adam Olsen 29188c9f33 typo 2001-06-14 17:31:53 +00:00
Bill Currie 4c8f84adc5 fix for CustomTF menu truncation 2001-06-03 01:28:11 +00:00