minor clean-up after the model scaling patch.

This commit is contained in:
Ozkan Sezer 2022-08-08 14:28:28 +03:00
parent 403aceb066
commit 5aa79332f0
3 changed files with 4 additions and 4 deletions

View file

@ -169,8 +169,6 @@ R_AddEfrags
void R_AddEfrags (entity_t *ent)
{
qmodel_t *entmodel;
int i;
vec3_t boundVec, scaledVec;
vec_t scalefactor;
if (!ent->model)
@ -184,6 +182,7 @@ void R_AddEfrags (entity_t *ent)
scalefactor = ENTSCALE_DECODE(ent->scale);
if (scalefactor != 1.0f)
{
vec3_t boundVec, scaledVec;
VectorCopy (entmodel->mins, boundVec);
VectorScale (boundVec, scalefactor, scaledVec);
VectorAdd (ent->origin, scaledVec, r_emins);

View file

@ -294,7 +294,6 @@ R_CullModelForEntity -- johnfitz -- uses correct bounds based on rotation
qboolean R_CullModelForEntity (entity_t *e)
{
vec3_t mins, maxs, minbounds, maxbounds;
vec3_t scaledVec;
vec_t scalefactor;
if (e->angles[0] || e->angles[2]) //pitch or roll
@ -317,6 +316,7 @@ qboolean R_CullModelForEntity (entity_t *e)
scalefactor = ENTSCALE_DECODE(e->scale);
if (scalefactor != 1.0f)
{
vec3_t scaledVec;
VectorScale (minbounds, scalefactor, scaledVec);
VectorAdd (e->origin, scaledVec, mins);
VectorScale (maxbounds, scalefactor, scaledVec);

View file

@ -1580,7 +1580,6 @@ static void PF_makestatic (void)
edict_t *ent;
int i;
int bits = 0; //johnfitz -- PROTOCOL_FITZQUAKE
eval_t *val;
ent = G_EDICT(OFS_PARM0);
@ -1602,6 +1601,8 @@ static void PF_makestatic (void)
}
else
{
eval_t *val;
if (SV_ModelIndex(PR_GetString(ent->v.model)) & 0xFF00)
bits |= B_LARGEMODEL;
if ((int)(ent->v.frame) & 0xFF00)