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) void R_AddEfrags (entity_t *ent)
{ {
qmodel_t *entmodel; qmodel_t *entmodel;
int i;
vec3_t boundVec, scaledVec;
vec_t scalefactor; vec_t scalefactor;
if (!ent->model) if (!ent->model)
@ -184,6 +182,7 @@ void R_AddEfrags (entity_t *ent)
scalefactor = ENTSCALE_DECODE(ent->scale); scalefactor = ENTSCALE_DECODE(ent->scale);
if (scalefactor != 1.0f) if (scalefactor != 1.0f)
{ {
vec3_t boundVec, scaledVec;
VectorCopy (entmodel->mins, boundVec); VectorCopy (entmodel->mins, boundVec);
VectorScale (boundVec, scalefactor, scaledVec); VectorScale (boundVec, scalefactor, scaledVec);
VectorAdd (ent->origin, scaledVec, r_emins); 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) qboolean R_CullModelForEntity (entity_t *e)
{ {
vec3_t mins, maxs, minbounds, maxbounds; vec3_t mins, maxs, minbounds, maxbounds;
vec3_t scaledVec;
vec_t scalefactor; vec_t scalefactor;
if (e->angles[0] || e->angles[2]) //pitch or roll 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); scalefactor = ENTSCALE_DECODE(e->scale);
if (scalefactor != 1.0f) if (scalefactor != 1.0f)
{ {
vec3_t scaledVec;
VectorScale (minbounds, scalefactor, scaledVec); VectorScale (minbounds, scalefactor, scaledVec);
VectorAdd (e->origin, scaledVec, mins); VectorAdd (e->origin, scaledVec, mins);
VectorScale (maxbounds, scalefactor, scaledVec); VectorScale (maxbounds, scalefactor, scaledVec);

View file

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