diff --git a/engine/Makefile b/engine/Makefile index 7e3d4b7d3..7cc85f031 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -517,6 +517,7 @@ COMMON_OBJS = $(COMMON_ASM_OBJS) \ net_wins.o \ zone.o \ qvm.o \ + r_d3.o \ gl_q2bsp.o \ glmod_doom.o \ q3common.o \ diff --git a/engine/client/r_d3.c b/engine/client/r_d3.c index 3331180b8..93822c4b1 100644 --- a/engine/client/r_d3.c +++ b/engine/client/r_d3.c @@ -5,6 +5,7 @@ void RMod_SetParent (mnode_t *node, mnode_t *parent); +#ifndef SERVERONLY qboolean Mod_LoadMap_Proc(model_t *model, char *data) { char token[256]; @@ -293,71 +294,6 @@ qboolean Mod_LoadMap_Proc(model_t *model, char *data) return true; } -//edict system as opposed to q2 game dll system. -void D3_FindTouchedLeafs (struct model_s *model, struct pvscache_s *ent, vec3_t cullmins, vec3_t cullmaxs) -{ -} -qbyte *D3_LeafPVS (struct model_s *model, int num, qbyte *buffer, unsigned int buffersize) -{ - return buffer; -} -int D3_LeafnumForPoint (struct model_s *model, vec3_t point) -{ - float p; - int c; - mnode_t *node; - node = model->nodes; - while(1) - { - p = DotProduct(point, node->plane->normal) + node->plane->dist; - c = node->childnum[p<0]; - if (c <= 0) - return -1-c; - node = model->nodes + c; - } - return 0; -} -unsigned int D3_FatPVS (struct model_s *model, vec3_t org, qbyte *pvsbuffer, unsigned int buffersize, qboolean merge) -{ - return 0; -} - -void D3_StainNode (struct mnode_s *node, float *parms) -{ -} - -qboolean D3_Trace (struct model_s *model, int hulloverride, int frame, vec3_t axis[3], vec3_t p1, vec3_t p2, vec3_t mins, vec3_t maxs, struct trace_s *trace) -{ - trace->fraction = 0; - VectorCopy(p1, trace->endpos); - trace->allsolid = true; - trace->startsolid = true; - trace->ent = NULL; - return false; -} - -unsigned int D3_PointContents (struct model_s *model, vec3_t axis[3], vec3_t p) -{ - return FTECONTENTS_SOLID; -} - -void D3_LightPointValues (struct model_s *model, vec3_t point, vec3_t res_diffuse, vec3_t res_ambient, vec3_t res_dir) -{ - VectorClear(res_diffuse); - VectorClear(res_ambient); - VectorClear(res_dir); - res_dir[2] = 1; -} - - -qboolean D3_EdictInFatPVS (struct model_s *model, struct pvscache_s *edict, qbyte *pvsbuffer) -{ - int i; - for (i = 0; i < edict->num_leafs; i++) - if (pvsbuffer[edict->leafnums[i]>>3] & (1u<<(edict->leafnums[i]&7))) - return true; - return false; -} static qboolean D3_PolyBounds(vec_t result[4], int count, vec4_t *vlist) { @@ -516,6 +452,74 @@ void D3_GenerateAreas(model_t *mod) } } +#endif + +//edict system as opposed to q2 game dll system. +void D3_FindTouchedLeafs (struct model_s *model, struct pvscache_s *ent, vec3_t cullmins, vec3_t cullmaxs) +{ +} +qbyte *D3_LeafPVS (struct model_s *model, int num, qbyte *buffer, unsigned int buffersize) +{ + return buffer; +} +int D3_LeafnumForPoint (struct model_s *model, vec3_t point) +{ + float p; + int c; + mnode_t *node; + node = model->nodes; + while(1) + { + p = DotProduct(point, node->plane->normal) + node->plane->dist; + c = node->childnum[p<0]; + if (c <= 0) + return -1-c; + node = model->nodes + c; + } + return 0; +} +unsigned int D3_FatPVS (struct model_s *model, vec3_t org, qbyte *pvsbuffer, unsigned int buffersize, qboolean merge) +{ + return 0; +} + +void D3_StainNode (struct mnode_s *node, float *parms) +{ +} + +qboolean D3_Trace (struct model_s *model, int hulloverride, int frame, vec3_t axis[3], vec3_t p1, vec3_t p2, vec3_t mins, vec3_t maxs, struct trace_s *trace) +{ + trace->fraction = 0; + VectorCopy(p1, trace->endpos); + trace->allsolid = true; + trace->startsolid = true; + trace->ent = NULL; + return false; +} + +unsigned int D3_PointContents (struct model_s *model, vec3_t axis[3], vec3_t p) +{ + return FTECONTENTS_SOLID; +} + +void D3_LightPointValues (struct model_s *model, vec3_t point, vec3_t res_diffuse, vec3_t res_ambient, vec3_t res_dir) +{ + VectorClear(res_diffuse); + VectorClear(res_ambient); + VectorClear(res_dir); + res_dir[2] = 1; +} + + +qboolean D3_EdictInFatPVS (struct model_s *model, struct pvscache_s *edict, qbyte *pvsbuffer) +{ + int i; + for (i = 0; i < edict->num_leafs; i++) + if (pvsbuffer[edict->leafnums[i]>>3] & (1u<<(edict->leafnums[i]&7))) + return true; + return false; +} + qboolean D3_LoadMap_CollisionMap(model_t *mod, char *buf) { char token[256]; @@ -544,12 +548,14 @@ qboolean D3_LoadMap_CollisionMap(model_t *mod, char *buf) /*that's the physics sorted*/ #ifndef SERVERONLY - if (isDedicated) - return true; - COM_StripExtension(mod->name, token, sizeof(token)); - buf = FS_LoadMallocFile(va("%s.proc", token)); - Mod_LoadMap_Proc(mod, buf); - BZ_Free(buf); - return true; + if (!isDedi + cated) + { + COM_StripExtension(mod->name, token, sizeof(token)); + buf = FS_LoadMallocFile(va("%s.proc", token)); + Mod_LoadMap_Proc(mod, buf); + BZ_Free(buf); + } #endif + return true; } \ No newline at end of file diff --git a/engine/dotnet2005/ftequake.vcproj b/engine/dotnet2005/ftequake.vcproj index 47d9d8401..cdc76e44f 100644 --- a/engine/dotnet2005/ftequake.vcproj +++ b/engine/dotnet2005/ftequake.vcproj @@ -14105,13 +14105,6 @@ - - - - - - + + diff --git a/engine/dotnet2005/ftequake_SDL.vcproj b/engine/dotnet2005/ftequake_SDL.vcproj index 5a04cb492..ada45401a 100644 --- a/engine/dotnet2005/ftequake_SDL.vcproj +++ b/engine/dotnet2005/ftequake_SDL.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="8.00" Name="ftequake_SDL" - ProjectGUID="{88BFEE0E-7BC0-43AD-9CCC-6B1A6E4C1364}" + ProjectGUID="{F384725A-62D4-4063-9941-6D8D2D6C2A47}" RootNamespace="ftequake_SDL" > @@ -10972,14 +10972,6 @@ Name="VCCLCompilerTool" /> - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - name); couldntload: if (crash)