fix SV_RunClientCommand on dedicated servers (and other weird ways).
fix a couple of other crashes. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4692 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e7a29a440f
commit
5aba4ddeaa
4 changed files with 7 additions and 15 deletions
|
@ -644,18 +644,6 @@ void CL_DownloadFinished(qdownload_t *dl)
|
|||
|
||||
COM_RefreshFSCache_f();
|
||||
|
||||
// rename the temp file to it's final name
|
||||
if (tempname)
|
||||
{
|
||||
#ifdef TERRAIN
|
||||
if (!strncmp(tempname, "temp/", 5) && Terr_DownloadedSection(tempname))
|
||||
{
|
||||
FS_Remove(tempname, dl->fsroot);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
ext = COM_FileExtension(filename);
|
||||
|
||||
|
||||
|
|
|
@ -366,7 +366,10 @@ void QCBUILTIN PF_getsurfacenumpoints(pubprogfuncs_t *prinst, struct globalvars_
|
|||
else
|
||||
{
|
||||
surfnum += model->firstmodelsurface;
|
||||
G_FLOAT(OFS_RETURN) = model->surfaces[surfnum].mesh->numvertexes;
|
||||
if (!model->surfaces[surfnum].mesh)
|
||||
G_FLOAT(OFS_RETURN) = 0; //not loaded properly.
|
||||
else
|
||||
G_FLOAT(OFS_RETURN) = model->surfaces[surfnum].mesh->numvertexes;
|
||||
}
|
||||
}
|
||||
// #435 vector(entity e, float s, float n) getsurfacepoint (DP_QC_GETSURFACE)
|
||||
|
@ -718,7 +721,7 @@ void QCBUILTIN PF_getsurfacepointattribute(pubprogfuncs_t *prinst, struct global
|
|||
if (model && model->type == mod_brush && surfnum < model->nummodelsurfaces)
|
||||
{
|
||||
surfnum += model->firstmodelsurface;
|
||||
|
||||
if (model->surfaces[surfnum].mesh)
|
||||
if (pointnum < model->surfaces[surfnum].mesh->numvertexes)
|
||||
{
|
||||
switch(attribute)
|
||||
|
|
|
@ -8612,12 +8612,12 @@ static void QCBUILTIN PF_runclientphys(pubprogfuncs_t *prinst, struct globalvars
|
|||
VectorCopy(ent->v->maxs, pmove.player_maxs);
|
||||
VectorCopy(ent->v->mins, pmove.player_mins);
|
||||
|
||||
pmove.skipent = -1;
|
||||
pmove.numphysent = 1;
|
||||
pmove.physents[0].model = sv.world.worldmodel;
|
||||
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
extern vec3_t pmove_mins, pmove_maxs;
|
||||
pmove_mins[i] = pmove.origin[i] - 256;
|
||||
pmove_maxs[i] = pmove.origin[i] + 256;
|
||||
}
|
||||
|
|
|
@ -1398,6 +1398,7 @@ void SV_CheckTimer(void);
|
|||
|
||||
void SV_LogPlayer(client_t *cl, char *msg);
|
||||
|
||||
extern vec3_t pmove_mins, pmove_maxs; //abs min/max extents
|
||||
void AddLinksToPmove ( edict_t *player, areanode_t *node );
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue