From f9277a9e74f4d843711077103a911a318329b17f Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 5 Oct 2007 14:11:17 +0000 Subject: [PATCH] Made minimal builds compile again, hopefully. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2712 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_parse.c | 2 ++ engine/gl/gl_alias.c | 17 +++++++++++++++++ engine/server/pr_cmds.c | 4 +++- engine/server/sv_main.c | 1 + engine/server/sv_user.c | 1 + 5 files changed, 24 insertions(+), 1 deletion(-) diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index c51b1fe55..e3f766fdd 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -3890,11 +3890,13 @@ void CL_ParseStuffCmd(char *msg, int destsplit) //this protects stuffcmds from n { Cmd_ExecuteString(stufftext+2, RESTRICT_SERVER+destsplit); //do this NOW so that it's done before any models or anything are loaded } +#ifdef PLUGINS else if (!strncmp(stufftext, "//tinfo ", 8)) { Cmd_TokenizeString(stufftext+2, false, false); Plug_Command_f(); } +#endif else #ifdef CSQC_DAT if (!CSQC_StuffCmd(stufftext)) diff --git a/engine/gl/gl_alias.c b/engine/gl/gl_alias.c index 19ef35a91..abc8dfa68 100644 --- a/engine/gl/gl_alias.c +++ b/engine/gl/gl_alias.c @@ -1917,6 +1917,23 @@ void R_DrawGAliasModel (entity_t *e) -scale_origin[2]); } + if (!ruleset_allow_overlarge_models.value && clmodel->clampedsize) + { //possibly this should be on a per-frame basis, but that's a real pain to do + float rad=0, axis; + axis = (clmodel->maxs[0] - clmodel->mins[0]); + rad += axis*axis; + axis = (clmodel->maxs[1] - clmodel->mins[1]); + rad += axis*axis; + axis = (clmodel->maxs[2] - clmodel->mins[2]); + rad += axis*axis; + if (rad > clmodel->clampedsize) + { + rad = clmodel->clampedsize / rad; + Con_DPrintf("Rescaling %s by %f\n", clmodel->name, rad); + qglScalef(rad, rad, rad); + } + } + inf = GLMod_Extradata (clmodel); if (qglPNTrianglesfATI && gl_ati_truform.value) qglEnable(GL_PN_TRIANGLES_ATI); diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index b0a461ee1..7110b1f0f 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -195,10 +195,12 @@ pbool ED_CanFree (edict_t *ed) ed->v->nextthink = 0; ed->v->solid = 0; + + ed->v->classname = 0; + if (pr_imitatemvdsv.value) { ed->v->health = 0; - ed->v->classname = 0; ed->v->nextthink = -1; ed->v->impulse = 0; //this is not true imitation, but it seems we need this line to get out of some ktpro infinate loops. } diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 06f23f84d..e2fd311d7 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -442,6 +442,7 @@ void SV_DropClient (client_t *drop) // this will set the body to a dead frame, among other things pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, drop->edict); PR_ExecuteProgram (svprogfuncs, pr_global_struct->ClientDisconnect); + printf("Disconnected...\n"); } else if (SpectatorDisconnect) { diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index 8dc421d1e..118355ac7 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -1449,6 +1449,7 @@ void SV_Begin_f (void) pr_global_struct->time = sv.time; pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, split->edict); PR_ExecuteProgram (svprogfuncs, pr_global_struct->ClientConnect); + printf("ClientConnected...\n"); // actually spawn the player pr_global_struct->time = sv.time;