diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index ff7ce2d21..b7231fc1d 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -873,10 +873,8 @@ void DP5_ParseDelta(entity_state_t *s) } if (bits & E5_GLOW) { - MSG_ReadByte(); - MSG_ReadByte(); -// s->glowsize = MSG_ReadByte(); -// s->glowcolor = MSG_ReadByte(); + s->glowsize = MSG_ReadByte(); + s->glowcolour = MSG_ReadByte(); } } @@ -925,17 +923,16 @@ void CLNQ_ParseDarkPlaces5Entities(void) //the things I do.. :o( if (read == oldpack->entities[oldi].number) { from = &oldpack->entities[oldi]; + from->flags |= 0x80000000; //so we don't copy it. break; } } - from->flags |= 0x80000000; if (remove) { continue; } - if (pack->num_entities==pack->max_entities) { pack->max_entities = pack->num_entities+16; @@ -947,6 +944,7 @@ void CLNQ_ParseDarkPlaces5Entities(void) //the things I do.. :o( memcpy(to, from, sizeof(*to)); to->number = read; DP5_ParseDelta(to); + to->flags &= ~0x80000000; if (!from || to->modelindex != from->modelindex || to->number != from->number) //model changed... or entity changed... cl.lerpents[to->number].lerptime = -10; @@ -967,8 +965,8 @@ void CLNQ_ParseDarkPlaces5Entities(void) //the things I do.. :o( cl.lerpents[to->number].frame = from->frame; cl.lerpents[to->number].lerptime = cl.time; - if (cl.lerpents[to->number].lerprate>0.5) - cl.lerpents[to->number].lerprate=0.1; + if (cl.lerpents[to->number].lerprate>0.2) + cl.lerpents[to->number].lerprate=0.2; //store this off for new ents to use. // if (new) @@ -977,8 +975,6 @@ void CLNQ_ParseDarkPlaces5Entities(void) //the things I do.. :o( if (to->frame == from->frame) newlerprate = cl.time-cl.lerpents[to->number].lerptime; } - - to->flags &= ~0x80000000; } //the pack has all the new ones in it, now copy the old ones in that wern't removed (or changed). @@ -1967,7 +1963,7 @@ void CL_ParsePlayerinfo (void) else state->weaponframe = 0; - if (cl.worldmodel && cl.worldmodel->fromgame == fg_quake && cl.worldmodel->fromgame == fg_halflife) + if (cl.worldmodel && (cl.worldmodel->fromgame == fg_quake || cl.worldmodel->fromgame == fg_halflife)) state->hullnum = 1; else state->hullnum = 56; diff --git a/engine/client/cl_input.c b/engine/client/cl_input.c index f2eb2052d..15efed228 100644 --- a/engine/client/cl_input.c +++ b/engine/client/cl_input.c @@ -1590,6 +1590,7 @@ CL_InitInput void CL_InitInput (void) { #define inputnetworkcvargroup "client networking options" + cl.splitclients = 1; CL_RegisterSplitCommands(); Cmd_AddCommand("rotate", IN_Rotate_f); diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index fe88988ff..53407eba3 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -1296,7 +1296,7 @@ void CL_FullServerinfo_f (void) #ifdef CSQC_DAT p = Info_ValueForKey(cl.serverinfo, "*csprogs"); - if (*p) //only allow csqc if the server says so, and the 'checksum' matches. + if (*p || cls.demoplayback) //only allow csqc if the server says so, and the 'checksum' matches. { unsigned int chksum = strtoul(p, NULL, 0); if (CSQC_Init(chksum)) diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 3537a1bce..59461ba50 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -1557,6 +1557,9 @@ void CLNQ_ParseServerData(void) //Doesn't change gamedir - use with caution. R_NewMap (); + if (cls.demoplayback) + CSQC_Init(0); + SCR_EndLoadingPlaque(); Hunk_Check (); // make sure nothing is hurt diff --git a/engine/client/pr_csqc.c b/engine/client/pr_csqc.c index 77d04d9dc..6f214da8b 100644 --- a/engine/client/pr_csqc.c +++ b/engine/client/pr_csqc.c @@ -1167,6 +1167,11 @@ static void PF_cs_getmousepos (progfuncs_t *prinst, struct globalvars_s *pr_glob G_FLOAT(OFS_RETURN+2) = 0; } +static void PF_checkextension (progfuncs_t *prinst, struct globalvars_s *pr_globals) +{ + G_FLOAT(OFS_RETURN) = 0; +} + #define PF_FixTen PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme,PF_Fixme @@ -1291,7 +1296,7 @@ PF_Fixme, PF_Fixme, PF_Fixme, //100 -PF_Fixme, +PF_checkextension, PF_Fixme, PF_Fixme, PF_Fixme, @@ -1515,10 +1520,11 @@ void VARGS CSQC_Abort (char *format, ...) //an error occured. { - static char buffer[1024*1024*8]; - int size = sizeof buffer; + int size = 1024*1024*8; + char *buffer = BZ_Malloc(size); csqcprogs->save_ents(csqcprogs, buffer, &size, 3); COM_WriteFile("csqccore.txt", buffer, size); + BZ_Free(buffer); } Host_EndGame("csqc error"); @@ -1543,9 +1549,10 @@ qbyte *CSQC_PRLoadFile (char *path, void *buffer, int bufsize) //pretend it doesn't file = COM_LoadStackFile(path, buffer, bufsize); - if (!strcmp(path, "csprogs.dat")) //Fail to load any csprogs who's checksum doesn't match. - if (Com_BlockChecksum(buffer, com_filesize) != csqcchecksum) - return NULL; + if (!cls.demoplayback) //allow any csqc when playing a demo + if (!strcmp(path, "csprogs.dat")) //Fail to load any csprogs who's checksum doesn't match. + if (Com_BlockChecksum(buffer, com_filesize) != csqcchecksum) + return NULL; return file; } diff --git a/engine/client/pr_menu.c b/engine/client/pr_menu.c index d98744719..3fd5bd380 100644 --- a/engine/client/pr_menu.c +++ b/engine/client/pr_menu.c @@ -393,13 +393,28 @@ void PF_CL_drawpic (progfuncs_t *prinst, struct globalvars_s *pr_globals) float *size = G_VECTOR(OFS_PARM2); float *rgb = G_VECTOR(OFS_PARM3); float alpha = G_FLOAT(OFS_PARM4); -// float flag = G_FLOAT(OFS_PARM5); + float flag = G_FLOAT(OFS_PARM5); + + if (qrenderer == QR_OPENGL) + { + if (flag == 1) + qglBlendFunc(GL_SRC_ALPHA, GL_ONE); + else if(flag == 2) + qglBlendFunc(GL_DST_COLOR, GL_ZERO); + else if(flag == 3) + qglBlendFunc(GL_DST_COLOR,GL_SRC_COLOR); + else + qglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } if (Draw_ImageColours) Draw_ImageColours(rgb[0], rgb[1], rgb[2], alpha); if (Draw_Image) Draw_Image(pos[0], pos[1], size[0], size[1], 0, 0, 1, 1, p); + if (qrenderer == QR_OPENGL) + qglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + G_FLOAT(OFS_RETURN) = 1; } //float drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #457; diff --git a/engine/common/common.c b/engine/common/common.c index c18b7bd04..37d870b2b 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -707,7 +707,7 @@ coorddata MSG_ToCoord(float f, int bytes) //return value should be treated as (c switch(bytes) { case 2: - r.b2 = LittleShort(f*8); + r.b2 = LittleShort((short)(f*8)); break; case 4: r.f = LittleFloat(f); diff --git a/engine/common/gl_q2bsp.c b/engine/common/gl_q2bsp.c index 203e508d9..6d4f2e1dd 100644 --- a/engine/common/gl_q2bsp.c +++ b/engine/common/gl_q2bsp.c @@ -715,10 +715,10 @@ void CM_CreateBrush ( q2cbrush_t *brush, vec3_t *verts, q2mapsurface_t *surface side = &map_brushsides[numbrushsides++]; side->plane = plane; - if (DotProduct(plane->normal, mainplane.normal) >= 0) +// if (DotProduct(plane->normal, mainplane.normal) >= 0) side->surface = surface; - else - side->surface = NULL; // don't clip against this side +// else +// side->surface = NULL; // don't clip against this side brush->numsides++; } @@ -4142,6 +4142,8 @@ vec3_t trace_start, trace_end; vec3_t trace_mins, trace_maxs; vec3_t trace_extents; vec3_t trace_absmins, trace_absmaxs; +float trace_truefraction; +float trace_nearfraction; trace_t trace_trace; int trace_contents; @@ -4165,8 +4167,9 @@ void CM_ClipBoxToBrush (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2, float f; q2cbrushside_t *side, *leadside; + float nearfrac=0; enterfrac = -1; - leavefrac = 1; + leavefrac = 2; clipplane = NULL; if (!brush->numsides) @@ -4224,17 +4227,18 @@ void CM_ClipBoxToBrush (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2, // crosses face if (d1 > d2) { // enter - f = (d1-DIST_EPSILON) / (d1-d2); + f = (d1) / (d1-d2); if (f > enterfrac) { enterfrac = f; + nearfrac = (d1-DIST_EPSILON) / (d1-d2); clipplane = plane; leadside = side; } } else { // leave - f = (d1/*+DIST_EPSILON*/) / (d1-d2); + f = (d1) / (d1-d2); if (f < leavefrac) leavefrac = f; } @@ -4247,13 +4251,16 @@ void CM_ClipBoxToBrush (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2, trace->allsolid = true; return; } - if (enterfrac - (1.0f / 1024.0f) < leavefrac) + if (enterfrac <= leavefrac) { - if (enterfrac > -1 && enterfrac < trace->fraction) + if (enterfrac > -1 && enterfrac <= trace_truefraction) { if (enterfrac < 0) enterfrac = 0; - trace->fraction = enterfrac; + + trace_nearfraction = nearfrac; + trace_truefraction = enterfrac; + trace->plane.dist = clipplane->dist; VectorCopy(clipplane->normal, trace->plane.normal); trace->surface = &(leadside->surface->c); @@ -4267,7 +4274,7 @@ void CM_ClipBoxToPatch (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2, { int i, j; mplane_t *plane, *clipplane; - float enterfrac, leavefrac; + float enterfrac, leavefrac, nearfrac = 0; vec3_t ofs; float d1, d2; float dist; @@ -4281,7 +4288,7 @@ void CM_ClipBoxToPatch (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2, c_brush_traces++; enterfrac = -1; - leavefrac = 1; + leavefrac = 2; clipplane = NULL; startout = false; leadside = NULL; @@ -4328,38 +4335,45 @@ void CM_ClipBoxToPatch (vec3_t mins, vec3_t maxs, vec3_t p1, vec3_t p2, // crosses face if (d1 > d2) { // enter - f = (d1-DIST_EPSILON) / (d1-d2); + f = (d1) / (d1-d2); if (f > enterfrac) { enterfrac = f; + nearfrac = (d1-DIST_EPSILON) / (d1-d2); clipplane = plane; leadside = side; } } else { // leave - f = (d1 /*+ DIST_EPSILON*/) / (d1-d2); + f = (d1) / (d1-d2); if (f < leavefrac) leavefrac = f; } } if (!startout) + { + trace->startsolid = true; return; // original point is inside the patch + } - if (enterfrac - (1.0f / 1024.0f) <= leavefrac) + if (nearfrac <= leavefrac) { if (leadside && leadside->surface - && enterfrac < trace->fraction) + && enterfrac <= trace_truefraction) { if (enterfrac < 0) enterfrac = 0; - trace->fraction = enterfrac; + trace_truefraction = enterfrac; + trace_nearfraction = nearfrac; trace->plane.dist = clipplane->dist; VectorCopy(clipplane->normal, trace->plane.normal); trace->surface = &leadside->surface->c; trace->contents = brush->contents; } + else if (enterfrac < trace_truefraction) + leavefrac=0; } } @@ -4505,7 +4519,7 @@ void CM_TraceToLeaf (int leafnum) if ( !(b->contents & trace_contents)) continue; CM_ClipBoxToBrush (trace_mins, trace_maxs, trace_start, trace_end, &trace_trace, b); - if (!trace_trace.fraction) + if (trace_nearfraction <= 0) return; } @@ -4528,7 +4542,7 @@ void CM_TraceToLeaf (int leafnum) for (j = 0; j < patch->numbrushes; j++) { CM_ClipBoxToPatch (trace_mins, trace_maxs, trace_start, trace_end, &trace_trace, &patch->brushes[j]); - if (trace_trace.fraction<=0) + if (trace_nearfraction<=0) return; } } @@ -4614,7 +4628,7 @@ void CM_RecursiveHullCheck (int num, float p1f, float p2f, vec3_t p1, vec3_t p2) int side; float midf; - if (trace_trace.fraction <= p1f) + if (trace_truefraction <= p1f) return; // already hit something nearer // if < 0, we are in a leaf node @@ -4741,6 +4755,8 @@ trace_t CM_BoxTrace (vec3_t start, vec3_t end, // fill in a default trace memset (&trace_trace, 0, sizeof(trace_trace)); + trace_truefraction = 1; + trace_nearfraction = 1; trace_trace.fraction = 1; trace_trace.surface = &(nullsurface.c); @@ -4825,9 +4841,9 @@ trace_t CM_BoxTrace (vec3_t start, vec3_t end, else { trace_ispoint = false; - trace_extents[0] = (-trace_mins[0] > trace_maxs[0] ? -trace_mins[0] : trace_maxs[0])+0.1; - trace_extents[1] = (-trace_mins[1] > trace_maxs[1] ? -trace_mins[1] : trace_maxs[1])+0.1; - trace_extents[2] = (-trace_mins[2] > trace_maxs[2] ? -trace_mins[2] : trace_maxs[2])+0.1; + trace_extents[0] = -trace_mins[0] > trace_maxs[0] ? -trace_mins[0] : trace_maxs[0]+1; + trace_extents[1] = -trace_mins[1] > trace_maxs[1] ? -trace_mins[1] : trace_maxs[1]+1; + trace_extents[2] = -trace_mins[2] > trace_maxs[2] ? -trace_mins[2] : trace_maxs[2]+1; #if ADJ if (-mins[2] != maxs[2]) //be prepared to move the thing up to counter the different min/max { @@ -4848,12 +4864,16 @@ trace_t CM_BoxTrace (vec3_t start, vec3_t end, // CM_RecursiveHullCheck (headnode, 0, 1, trace_start, trace_end); - if (trace_trace.fraction == 1) + if (trace_nearfraction == 1) { + trace_trace.fraction = 1; VectorCopy (trace_end, trace_trace.endpos); } else { + if (trace_nearfraction<0) + trace_nearfraction=0; + trace_trace.fraction = trace_nearfraction; for (i=0 ; i<3 ; i++) trace_trace.endpos[i] = trace_start[i] + trace_trace.fraction * (trace_end[i] - trace_start[i]); } @@ -4928,17 +4948,17 @@ trace_t CM_TransformedBoxTrace (vec3_t start, vec3_t end, trace.plane.normal[0] = DotProduct (temp, forward); trace.plane.normal[1] = -DotProduct (temp, right); trace.plane.normal[2] = DotProduct (temp, up); - } - if (trace.fraction == 1) - { - VectorCopy(end, trace.endpos); - } - else - { - trace.endpos[0] = start[0] + trace.fraction * (end[0] - start[0]); - trace.endpos[1] = start[1] + trace.fraction * (end[1] - start[1]); - trace.endpos[2] = start[2] + trace.fraction * (end[2] - start[2]); + if (trace.fraction == 1) + { + VectorCopy(end, trace.endpos); + } + else + { + trace.endpos[0] = start[0] + trace.fraction * (end[0] - start[0]); + trace.endpos[1] = start[1] + trace.fraction * (end[1] - start[1]); + trace.endpos[2] = start[2] + trace.fraction * (end[2] - start[2]); + } } return trace; diff --git a/engine/qclib/pr_edict.c b/engine/qclib/pr_edict.c index f6ecc75c1..1321acd7b 100644 --- a/engine/qclib/pr_edict.c +++ b/engine/qclib/pr_edict.c @@ -2204,7 +2204,7 @@ void PR_TestForWierdness(progfuncs_t *progfuncs) { for (e = 0; e < sv_num_edicts; e++) { - ed = EDICT_NUM(progfuncs, e); + ed = (edictrun_t*)EDICT_NUM(progfuncs, e); if (ed->isfree) continue; if (((int *)ed->fields)[field[i].ofs] < 0 || ((int *)ed->fields)[field[i].ofs] >= addressableused) diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index 93e905ec1..f95f7bdd8 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -3508,7 +3508,11 @@ void PF_WeapIndex (progfuncs_t *prinst, struct globalvars_s *pr_globals) void PF_coredump (progfuncs_t *prinst, struct globalvars_s *pr_globals) { -// ED_PrintEdicts (); + int size = 1024*1024*8; + char *buffer = BZ_Malloc(size); + prinst->save_ents(prinst, buffer, &size, 3); + COM_WriteFile("ssqccore.txt", buffer, size); + BZ_Free(buffer); } void PF_traceon (progfuncs_t *prinst, struct globalvars_s *pr_globals) @@ -4648,6 +4652,7 @@ void SV_point_tempentity (vec3_t o, int type, int count) //count (usually 1) is SV_Error("SV_point_tempentity - type is a beam\n"); default: MSG_WriteByte (&sv.multicast, type); + MSG_WriteByte (&sv.nqmulticast, type); } MSG_WriteCoord (&sv.multicast, o[0]); MSG_WriteCoord (&sv.multicast, o[1]); @@ -8934,8 +8939,9 @@ void PR_RegisterFields(void) //it's just easier to do it this way. fieldentity(viewmodelforclient); fieldentity(exteriormodeltoclient); - fieldfloat(glowsize); - fieldfloat(glowcolor); + fieldfloat(glow_size); + fieldfloat(glow_color); + fieldfloat(glow_trail); //UDC_EXTEFFECT... yuckie PR_RegisterFieldVar(svprogfuncs, ev_float, "fieldcolor", (int)&((entvars_t*)0)->seefcolour, -1); diff --git a/engine/server/progdefs.h b/engine/server/progdefs.h index 067ef7e67..ef5e0f607 100644 --- a/engine/server/progdefs.h +++ b/engine/server/progdefs.h @@ -201,8 +201,9 @@ typedef struct entvars_s int viewmodelforclient; int exteriormodeltoclient; - float glowsize; - float glowcolor; + float glow_size; + float glow_color; + float glow_trail; //EXT_DIMENSION_VISIBLE float dimension_see; diff --git a/engine/server/sv_ents.c b/engine/server/sv_ents.c index f92a97b01..9325a3579 100644 --- a/engine/server/sv_ents.c +++ b/engine/server/sv_ents.c @@ -1655,7 +1655,6 @@ void SVNQ_EmitEntity(sizebuf_t *msg, edict_t *ent, int entnum) int i, eff; float miss; unsigned int bits=0; -eval_t *val; int glowsize, glowcolor; @@ -1720,17 +1719,9 @@ int glowsize, glowcolor; bits |= DPU_EFFECTS2; - val = svprogfuncs->GetEdictFieldValue(svprogfuncs, ent, "glow_size", NULL); //ouch.. null... - if (val) - glowsize = val->_float*0.25f; - else - glowsize = 0; - val = svprogfuncs->GetEdictFieldValue(svprogfuncs, ent, "glow_color", NULL); //ouch.. null... - if (val) - glowcolor = val->_float; - else - glowcolor = 0; - + glowsize = ent->v->glow_size*0.25f; + glowcolor = ent->v->glow_color; + if (0 != glowsize) bits |= DPU_GLOWSIZE; if (0 != glowcolor) @@ -2370,8 +2361,8 @@ void SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean ignore if (!ent->v->alpha) state->trans = 1; - state->glowsize = ent->v->glowsize*0.25; - state->glowcolour = ent->v->glowcolor; + state->glowsize = ent->v->glow_size*0.25; + state->glowcolour = ent->v->glow_color; //QSG_DIMENSION_PLANES - if the only shared dimensions are ghost dimensions, Set half alpha. if (client->edict) diff --git a/engine/server/sv_init.c b/engine/server/sv_init.c index 1996bd98e..0d64fa267 100644 --- a/engine/server/sv_init.c +++ b/engine/server/sv_init.c @@ -456,7 +456,8 @@ void SV_UnspawnServer (void) //terminate the running server. for (i = 0; i < MAX_CLIENTS; i++) { svs.clients[i].state = 0; - *svs.clients[i].name = '\0'; + *svs.clients[i].namebuf = '\0'; + svs.clients[i].name = NULL; } NET_CloseServer (); } @@ -561,11 +562,14 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us Mod_ClearAll (); Hunk_FreeToLowMark (host_hunklevel); - for (i = 0; i < MAX_LIGHTSTYLES; i++) + if (svs.gametype == GT_PROGS) { - if (sv.lightstyles[i]) - Z_Free(sv.lightstyles[i]); - sv.lightstyles[i] = NULL; + for (i = 0; i < MAX_LIGHTSTYLES; i++) + { + if (sv.lightstyles[i]) + Z_Free(sv.lightstyles[i]); + sv.lightstyles[i] = NULL; + } } // wipe the entire per-level structure @@ -748,7 +752,7 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us if (svs.clients[i].state) SV_DropClient(&svs.clients[i]); - svs.clients[i].name[0] = '\0'; //kill all bots + svs.clients[i].namebuf[0] = '\0'; //kill all bots } } svs.gametype = newgametype; @@ -1028,10 +1032,10 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us sprintf(sv.mapname, "%s", PR_GetString(svprogfuncs, val->string)); } ent->readonly = true; //lock it down! - } - // look up some model indexes for specialized message compression - SV_FindModelNumbers (); + // look up some model indexes for specialized message compression + SV_FindModelNumbers (); + } #ifndef SERVERONLY current_loading_size+=10; @@ -1058,7 +1062,8 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us // create a baseline for more efficient communications // SV_CreateBaseline (); - SVNQ_CreateBaseline(); + if (svprogfuncs) + SVNQ_CreateBaseline(); sv.signon_buffer_size[sv.num_signon_buffers-1] = sv.signon.cursize; // all spawning is completed, any further precache statements diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index cde2cd9b3..27b0a805e 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -1746,7 +1746,12 @@ void SVC_DirectConnect void SV_ClearClient(client_t *cl) { client_frame_t *frames = cl->frames; + char *on, *ot; + on = cl->name; + ot = cl->team; memset(cl, 0, sizeof(client_t)); + cl->name = on; + cl->team = ot; cl->frames = frames; if (frames) memset(frames, 0, sizeof(client_frame_t)*UPDATE_BACKUP); diff --git a/engine/server/sv_phys.c b/engine/server/sv_phys.c index ca37ddf79..559898703 100644 --- a/engine/server/sv_phys.c +++ b/engine/server/sv_phys.c @@ -274,9 +274,6 @@ int SV_FlyMove (edict_t *ent, float time, trace_t *steptrace) for (i=0 ; i<3 ; i++) end[i] = ent->v->origin[i] + time_left * ent->v->velocity[i]; - if (SV_TestEntityPosition(ent)) - Con_Printf("stuck point 1a\n"); - trace = SV_Move (ent->v->origin, ent->v->mins, ent->v->maxs, end, false, ent); if (trace.startsolid) @@ -1541,17 +1538,11 @@ void SV_WalkMove (edict_t *ent) VectorCopy (ent->v->origin, start_origin); VectorCopy (ent->v->velocity, start_velocity); - if (SV_TestEntityPosition(ent)) - Con_Printf("stuck point 0\n"); - clip = SV_FlyMove (ent, host_frametime, NULL); SV_SetOnGround (ent); SV_CheckVelocity(ent); - if (SV_TestEntityPosition(ent)) - Con_Printf("stuck point 1\n"); - VectorCopy(ent->v->origin, originalmove_origin); VectorCopy(ent->v->velocity, originalmove_velocity); originalmove_clip = clip; @@ -1594,16 +1585,10 @@ void SV_WalkMove (edict_t *ent) // FIXME: don't link? SV_PushEntity(ent, upmove); - if (SV_TestEntityPosition(ent)) - Con_Printf("stuck point 2\n"); - // move forward ent->v->velocity[2] = 0; clip = SV_FlyMove (ent, host_frametime, &steptrace); ent->v->velocity[2] += start_velocity[2]; - - if (SV_TestEntityPosition(ent)) - Con_Printf("stuck point 3\n"); SV_CheckVelocity(ent); @@ -1633,9 +1618,6 @@ void SV_WalkMove (edict_t *ent) // Con_Printf("wall\n"); SV_WallFriction (ent, &steptrace); } - - if (SV_TestEntityPosition(ent)) - Con_Printf("stuck point 4\n"); } else if (/*!sv_gameplayfix_stepdown.integer || */!oldonground || start_velocity[2] > 0 || ((int)ent->v->flags & FL_ONGROUND) || ent->v->waterlevel >= 2) return; @@ -1646,9 +1628,6 @@ void SV_WalkMove (edict_t *ent) // FIXME: don't link? downtrace = SV_PushEntity (ent, downmove); - if (SV_TestEntityPosition(ent)) - Con_Printf("stuck point 5\n"); - if (downtrace.fraction < 1 && downtrace.plane.normal[2] > 0.7) { // LordHavoc: disabled this check so you can walk on monsters/players @@ -1674,9 +1653,6 @@ void SV_WalkMove (edict_t *ent) SV_SetOnGround (ent); SV_CheckVelocity(ent); - - if (SV_TestEntityPosition(ent)) - Con_Printf("stuck point 6\n"); } @@ -1739,25 +1715,8 @@ void SV_Physics_Client (edict_t *ent, int num) if (!SV_CheckWater (ent) && ! ((int)ent->v->flags & FL_WATERJUMP) ) SV_AddGravity (ent, ent->v->gravity); -// if (fabs(oldvel - ent->v->velocity[0])> 100) -// Con_Printf("grav: %f -> %f\n", oldvel, ent->v->velocity[0]); - -// if (SV_TestEntityPosition(ent)) -// Con_Printf("Player starts stuck\n"); - SV_CheckStuck (ent); - -// if (SV_TestEntityPosition(ent)) -// Con_Printf("becomes stuck\n"); - SV_WalkMove (ent); - -// if (SV_TestEntityPosition(ent)) -// Con_Printf("Player ends stuck\n"); - -// if (fabs(oldvel - ent->v->velocity[0])> 100) -// Con_Printf("walk: %f -> %f\n", oldvel, ent->v->velocity[0]); - break; case MOVETYPE_FOLLOW: diff --git a/engine/server/sv_send.c b/engine/server/sv_send.c index ecff1406a..9f500731e 100644 --- a/engine/server/sv_send.c +++ b/engine/server/sv_send.c @@ -829,7 +829,7 @@ void SV_FindModelNumbers (void) for (i=0 ; inetchan.message,message); - for (i = 1; *sv.model_precache[i] ; i++) + for (i = 1; sv.model_precache[i] ; i++) MSG_WriteString (&host_client->netchan.message, sv.model_precache[i]); MSG_WriteByte (&host_client->netchan.message, 0); @@ -3349,6 +3349,10 @@ ucmd_t nqucmds[] = {"ban", NULL}, {"vote", SV_Vote_f}, + {"playermodel", NULL}, + {"playerskin", NULL}, + {"rate", NULL}, + #ifdef SVRANKING {"topten", Rank_ListTop10_f}, #endif