From ce9580f2374e3f8d2953a3c736c04ce0ae04d1dc Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 11 Feb 2000 04:21:10 +0000 Subject: [PATCH] sufflin' shufflin' shuflin'.. raaw-source qw-client now links, but qw-server won't compile (yet) --- common/world.c | 32 ++++++++++++++++++++++---------- {uquake => common}/worlda.s | 0 qw_client/Makefile.in | 2 +- qw_server/sv_main.c | 11 +++++++++-- 4 files changed, 32 insertions(+), 13 deletions(-) rename {uquake => common}/worlda.s (100%) diff --git a/common/world.c b/common/world.c index d48e8ed..0784c00 100644 --- a/common/world.c +++ b/common/world.c @@ -65,7 +65,6 @@ HULL BOXES =============================================================================== */ - static hull_t box_hull; static dclipnode_t box_clipnodes[6]; static mplane_t box_planes[6]; @@ -129,6 +128,7 @@ hull_t *SV_HullForBox (vec3_t mins, vec3_t maxs) +#ifdef SERVERONLY /* ================ SV_HullForEntity @@ -182,6 +182,7 @@ hull_t *SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset) return hull; } +#endif /* =============================================================================== @@ -240,6 +241,7 @@ areanode_t *SV_CreateAreaNode (int depth, vec3_t mins, vec3_t maxs) return anode; } +#ifdef SERVERONLY /* =============== SV_ClearWorld @@ -254,7 +256,7 @@ void SV_ClearWorld (void) sv_numareanodes = 0; SV_CreateAreaNode (0, sv.worldmodel->mins, sv.worldmodel->maxs); } - +#endif /* =============== @@ -270,7 +272,7 @@ void SV_UnlinkEdict (edict_t *ent) ent->area.prev = ent->area.next = NULL; } - +#ifdef SERVERONLY /* ==================== SV_TouchLinks @@ -321,7 +323,6 @@ void SV_TouchLinks ( edict_t *ent, areanode_t *node ) SV_TouchLinks ( ent, node->children[1] ); } - /* =============== SV_FindTouchedLeafs @@ -478,7 +479,7 @@ void SV_LinkEdict (edict_t *ent, qboolean touch_triggers) SV_TouchLinks ( ent, sv_areanodes ); } - +#endif /* =============================================================================== @@ -525,7 +526,7 @@ int SV_HullPointContents (hull_t *hull, int num, vec3_t p) #endif // !id386 - +#ifdef SERVERONLY /* ================== SV_PointContents @@ -546,9 +547,11 @@ int SV_TruePointContents (vec3_t p) { return SV_HullPointContents (&sv.worldmodel->hulls[0], 0, p); } +#endif //=========================================================================== +#ifdef SERVERONLY /* ============ SV_TestEntityPosition @@ -570,6 +573,7 @@ edict_t *SV_TestEntityPosition (edict_t *ent) return NULL; } +#endif /* =============================================================================== @@ -615,8 +619,13 @@ qboolean SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec return true; // empty } - if (num < hull->firstclipnode || num > hull->lastclipnode) + if (num < hull->firstclipnode || num > hull->lastclipnode) { +#ifdef SERVERONLY SV_Error ("SV_RecursiveHullCheck: bad node number"); +#else + Sys_Error ("SV_RecursiveHullCheck: bad node number"); +#endif + } // // find the point distances @@ -721,6 +730,7 @@ qboolean SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec } +#ifdef SERVERONLY /* ================== SV_ClipMoveToEntity @@ -811,9 +821,11 @@ trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t max return trace; } +#endif //=========================================================================== +#ifdef SERVERONLY /* ==================== SV_ClipToLinks @@ -893,7 +905,7 @@ void SV_ClipToLinks ( areanode_t *node, moveclip_t *clip ) if ( clip->boxmins[node->axis] < node->dist ) SV_ClipToLinks ( node->children[1], clip ); } - +#endif /* ================== @@ -925,6 +937,7 @@ boxmaxs[0] = boxmaxs[1] = boxmaxs[2] = 9999; #endif } +#ifdef SERVERONLY /* ================== SV_Move @@ -1028,5 +1041,4 @@ edict_t *SV_TestPlayerPosition (edict_t *ent, vec3_t origin) return NULL; } - - +#endif diff --git a/uquake/worlda.s b/common/worlda.s similarity index 100% rename from uquake/worlda.s rename to common/worlda.s diff --git a/qw_client/Makefile.in b/qw_client/Makefile.in index 8cbc89d..a8c3729 100644 --- a/qw_client/Makefile.in +++ b/qw_client/Makefile.in @@ -163,7 +163,7 @@ SW_REND_SRC = screen.c $(SWREND_SRC_PLAT) draw.c \ # Client source files CL_SRC = cl_demo.c cl_input.c cl_main.c cl_parse.c cl_tent.c -QW_CL_SRC = cl_cam.c cl_ents.c cl_pred.c host.c world.c +QW_CL_SRC = cl_cam.c cl_ents.c cl_pred.c host.c world.c worlda.s CL_GUI_SRC= console.c sbar.c view.c keys.c menu.c # Server source files diff --git a/qw_server/sv_main.c b/qw_server/sv_main.c index 7f7dcfd..a76ddf1 100644 --- a/qw_server/sv_main.c +++ b/qw_server/sv_main.c @@ -22,12 +22,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include - #ifdef HAVE_STRINGS_H #include #endif +#include +#include +#include +#include +#include +#include +#include +#include + quakeparms_t host_parms; qboolean host_initialized; // true if into command execution (compatability)