From d564ccf92af9fb80c38191498c34855ad65790a3 Mon Sep 17 00:00:00 2001 From: Steam Deck User Date: Thu, 22 Dec 2022 18:13:32 -0500 Subject: [PATCH] Make sure we explicitly express scale as a float --- source/cl_parse.c | 2 +- source/sv_main.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/source/cl_parse.c b/source/cl_parse.c index 208f1f8..ecad23f 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -621,7 +621,7 @@ void CL_ParseUpdate (int bits) if (bits & U_SCALE) ent->scale = MSG_ReadFloat(); else - ent->scale = 1; + ent->scale = 1.0f; // Tomaz - QC Alpha Scale Glow Begin if (bits & U_RENDERAMT) diff --git a/source/sv_main.c b/source/sv_main.c index ff9fe3a..7dc20ef 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -516,11 +516,11 @@ void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg, qboolean nomap) bits |= U_MODEL; if (ent->baseline.scale != ent->v.scale) { - if (ent->v.scale == 0) - ent->v.scale = 1; + if (ent->v.scale == 0f) + ent->v.scale = 1.0f; - if (ent->v.scale > 16) - ent->v.scale = 16; + if (ent->v.scale > 16.0f) + ent->v.scale = 16.0f; bits |= U_SCALE; } @@ -1044,16 +1044,15 @@ void SV_CreateBaseline (void) VectorCopy (svent->v.angles, svent->baseline.angles); svent->baseline.frame = svent->v.frame; svent->baseline.skin = svent->v.skin; + svent->baseline.scale = 1.0f; if (entnum > 0 && entnum <= svs.maxclients) { svent->baseline.colormap = entnum; - svent->baseline.scale = 1; svent->baseline.modelindex = SV_ModelIndex("models/player.mdl"); } else { svent->baseline.colormap = 0; - svent->baseline.scale = 1; svent->baseline.modelindex = SV_ModelIndex(pr_strings + svent->v.model); }