Index: Makefile
===================================================================
RCS file: /var/qfcvs/game-source/quakeworld/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	20 Sep 2003 04:21:13 -0000	1.4
+++ Makefile	17 Dec 2006 10:52:50 -0000
@@ -1,5 +1,7 @@
 all: qwprogs.dat
-qwprogs.dat: progs.src *.qc
-	qfcc -Werror -Wall -g --advanced
+qwprogs.dat: qwprogs.o
+	qfcc -g -o qwprogs.dat qwprogs.o -lfrikbot -lr -lqw
+qwprogs.o: progs.src *.qc
+	qfcc --advanced -Dself=@self -g -c -o qwprogs.o
 clean:
-	rm -f core *.dat *.sym progdefs.h
+	rm -f core *.dat *.sym progdefs.h *.o
Index: client.qc
===================================================================
RCS file: /var/qfcvs/game-source/quakeworld/client.qc,v
retrieving revision 1.8
diff -u -r1.8 client.qc
--- client.qc	8 Feb 2004 04:52:32 -0000	1.8
+++ client.qc	17 Dec 2006 10:52:50 -0000
@@ -772,6 +772,7 @@
 void ()
 PlayerPreThink =
 {
+	BotPreFrame ();
 	if (intermission_running) {
 		IntermissionThink ();   // otherwise a button could be missed between
 		return;                                 // the think tics
@@ -969,6 +970,8 @@
 void ()
 PlayerPostThink =
 {
+	BotImpulses ();
+
 //	dprint ("post think\n");
 	if (self.view_ofs == '0 0 0')
 		return;         // intermission or finale
@@ -1004,6 +1007,8 @@
 void ()
 ClientConnect =
 {
+	ClientInRankings ();
+
 	bprint (PRINT_HIGH, self.netname);
 	bprint (PRINT_HIGH, " entered the game\n");
 
@@ -1022,6 +1027,8 @@
 void ()
 ClientDisconnect =
 {
+	ClientDisconnected ();
+
 	// let everyone else know
 	bprint (PRINT_HIGH, self.netname);
 	bprint (PRINT_HIGH, " left the game with ");
Index: defs.qc
===================================================================
RCS file: /var/qfcvs/game-source/quakeworld/defs.qc,v
retrieving revision 1.4
diff -u -r1.4 defs.qc
--- defs.qc	2 Mar 2003 04:06:47 -0000	1.4
+++ defs.qc	17 Dec 2006 10:52:50 -0000
@@ -1,7 +1,8 @@
+#include "frikbot.h"
 // SOURCE FOR GLOBALVARS_T C STRUCTURE ========================================
 
 // system globals
-entity          self;
+//entity          self;
 entity          other;
 entity          world;
 float           time;
@@ -518,7 +519,7 @@
 void(entity e, vector min, vector max) setsize = #4;
 //void() break                                            = #6;
 float() random                                          = #7;           // returns 0 - 1
-void(entity e, float chan, string samp, float vol, float atten) sound = #8;
+//void(entity e, float chan, string samp, float vol, float atten) sound = #8;
 vector(vector v) normalize                      = #9;
 void(string e) error                            = #10;
 void(string e) objerror                         = #11;
@@ -534,7 +535,7 @@
 // a forent of world is ignored
 void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
 entity() checkclient                            = #17;  // returns a client to look for
-entity(entity start, .string fld, string match) find = #18;
+entity(entity start, ...) find = #18;
 string(string s) precache_sound         = #19;
 string(string s) precache_model         = #20;
 void(entity client, string s)stuffcmd = #21;
@@ -542,8 +543,8 @@
 void(float level, string s) bprint                              = #23;
 void(entity client, float level, string s) sprint = #24;
 void(string s) dprint                           = #25;
-string(float f) ftos                            = #26;
-string(vector v) vtos                           = #27;
+@extern string (float f) ftos;
+@extern string(vector v) vtos;
 void() coredump                                         = #28;          // prints all edicts
 void() traceon                                          = #29;          // turns statment trace on
 void() traceoff                                         = #30;
@@ -557,7 +558,7 @@
 float(entity e) checkbottom                     = #40;          // true if self is on ground
 float(vector v) pointcontents           = #41;          // returns a CONTENT_*
 float(float f) fabs = #43;
-vector(entity e, float speed) aim = #44;                // returns the shooting vector
+//vector(entity e, float speed) aim = #44;                // returns the shooting vector
 float(string s) cvar = #45;                                             // return cvar.value
 void(string s) localcmd = #46;                                  // put string into local que
 entity(entity e) nextent = #47;                                 // for looping through all ents
@@ -593,13 +594,13 @@
 string(string s) precache_sound2        = #76;          // registered version only
 string(string s) precache_file2         = #77;          // registered version only
 
-void(entity e) setspawnparms            = #78;          // set parm1... to the
+//void(entity e) setspawnparms            = #78;          // set parm1... to the
 												// values at level start
 												// for coop respawn
 void(entity killer, entity killee) logfrag = #79;       // add to stats
 
 string(entity e, string key) infokey    = #80;  // get a key value (world = serverinfo)
-float(string s) stof                            = #81;          // convert string to float
+@extern float(string s) stof;
 void(vector where, float set) multicast = #82;  // sends the temp message to a set
 												// of clients, possibly in PVS or PHS
 
Index: world.qc
===================================================================
RCS file: /var/qfcvs/game-source/quakeworld/world.qc,v
retrieving revision 1.5
diff -u -r1.5 world.qc
--- world.qc	4 Mar 2003 23:15:54 -0000	1.5
+++ world.qc	17 Dec 2006 10:52:50 -0000
@@ -17,6 +17,8 @@
 void ()
 worldspawn =
 {
+	BotInit ();
+
 	lastspawn = world;
 	InitBodyQueue ();
 
@@ -189,6 +191,8 @@
 void ()
 StartFrame =
 {
+	BotFrame ();
+
 	timelimit = cvar ("timelimit") * 60;
 	fraglimit = cvar ("fraglimit");
 	teamplay = cvar ("teamplay");
