// sv_phys.c
#include "quakedef.h"
-// used only for VM_GetTempString
-#include "prvm_cmds.h"
/*
if (trace.startsupercontents & SUPERCONTENTS_SOLID)
return true;
else
+ {
+ if (sv.worldmodel->brushq1.hulls && !VectorCompare(ent->fields.server->mins, ent->fields.server->maxs))
+ {
+ // q1bsp/hlbsp use hulls and if the entity does not exactly match
+ // a hull size it is incorrectly tested, so this code tries to
+ // 'fix' it slightly...
+ int i;
+ vec3_t v;
+ for (i = 0;i < 8;i++)
+ {
+ v[0] = (i & 1) ? ent->fields.server->maxs[0] : ent->fields.server->mins[0];
+ v[1] = (i & 2) ? ent->fields.server->maxs[1] : ent->fields.server->mins[1];
+ v[2] = (i & 4) ? ent->fields.server->maxs[2] : ent->fields.server->mins[2];
+ if (SV_PointSuperContents(v) & SUPERCONTENTS_SOLID)
+ return true;
+ }
+ }
return false;
+ }
}
/*
if ((val = PRVM_GETGLOBALFIELDVALUE(gval_trace_dphittexturename)))
{
if (trace->hittexture)
- {
- char *s = VM_GetTempString();
- strlcpy(s, trace->hittexture->name, VM_STRINGTEMP_LENGTH);
- val->string = PRVM_SetEngineString(s);
- }
+ val->string = PRVM_SetTempString(trace->hittexture->name);
else
val->string = 0;
}
}
VectorCopy (org, ent->fields.server->origin);
- Con_DPrintf("Stuck entity %i (classname \"%s\").\n", (int)PRVM_EDICT_TO_PROG(ent), PRVM_GetString(ent->fields.server->classname));
+ if (developer.integer >= 100)
+ Con_Printf("Stuck entity %i (classname \"%s\").\n", (int)PRVM_EDICT_TO_PROG(ent), PRVM_GetString(ent->fields.server->classname));
}