mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
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();
|
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);
|
ext = COM_FileExtension(filename);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -366,7 +366,10 @@ void QCBUILTIN PF_getsurfacenumpoints(pubprogfuncs_t *prinst, struct globalvars_
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
surfnum += model->firstmodelsurface;
|
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)
|
// #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)
|
if (model && model->type == mod_brush && surfnum < model->nummodelsurfaces)
|
||||||
{
|
{
|
||||||
surfnum += model->firstmodelsurface;
|
surfnum += model->firstmodelsurface;
|
||||||
|
if (model->surfaces[surfnum].mesh)
|
||||||
if (pointnum < model->surfaces[surfnum].mesh->numvertexes)
|
if (pointnum < model->surfaces[surfnum].mesh->numvertexes)
|
||||||
{
|
{
|
||||||
switch(attribute)
|
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->maxs, pmove.player_maxs);
|
||||||
VectorCopy(ent->v->mins, pmove.player_mins);
|
VectorCopy(ent->v->mins, pmove.player_mins);
|
||||||
|
|
||||||
|
pmove.skipent = -1;
|
||||||
pmove.numphysent = 1;
|
pmove.numphysent = 1;
|
||||||
pmove.physents[0].model = sv.world.worldmodel;
|
pmove.physents[0].model = sv.world.worldmodel;
|
||||||
|
|
||||||
for (i=0 ; i<3 ; i++)
|
for (i=0 ; i<3 ; i++)
|
||||||
{
|
{
|
||||||
extern vec3_t pmove_mins, pmove_maxs;
|
|
||||||
pmove_mins[i] = pmove.origin[i] - 256;
|
pmove_mins[i] = pmove.origin[i] - 256;
|
||||||
pmove_maxs[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);
|
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 );
|
void AddLinksToPmove ( edict_t *player, areanode_t *node );
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue