mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 17:21:09 +00:00
Only send baseline/static scales when using PROTOCOL_RMQ
This commit is contained in:
parent
6bff9566a5
commit
239ec66233
3 changed files with 20 additions and 11 deletions
|
@ -1601,8 +1601,6 @@ 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)
|
||||||
|
@ -1610,14 +1608,18 @@ static void PF_makestatic (void)
|
||||||
if (ent->alpha != ENTALPHA_DEFAULT)
|
if (ent->alpha != ENTALPHA_DEFAULT)
|
||||||
bits |= B_ALPHA;
|
bits |= B_ALPHA;
|
||||||
|
|
||||||
val = GetEdictFieldValue(ent, "scale");
|
if (sv.protocol == PROTOCOL_RMQ)
|
||||||
if (val)
|
{
|
||||||
ent->scale = ENTSCALE_ENCODE(val->_float);
|
eval_t* val;
|
||||||
else
|
val = GetEdictFieldValue(ent, "scale");
|
||||||
ent->scale = ENTSCALE_DEFAULT;
|
if (val)
|
||||||
|
ent->scale = ENTSCALE_ENCODE(val->_float);
|
||||||
|
else
|
||||||
|
ent->scale = ENTSCALE_DEFAULT;
|
||||||
|
|
||||||
if (ent->scale != ENTSCALE_DEFAULT)
|
if (ent->scale != ENTSCALE_DEFAULT)
|
||||||
bits |= B_SCALE;
|
bits |= B_SCALE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bits)
|
if (bits)
|
||||||
|
|
|
@ -63,7 +63,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define U_FRAME2 (1<<17) // 1 byte, this is .frame & 0xFF00 (second byte)
|
#define U_FRAME2 (1<<17) // 1 byte, this is .frame & 0xFF00 (second byte)
|
||||||
#define U_MODEL2 (1<<18) // 1 byte, this is .modelindex & 0xFF00 (second byte)
|
#define U_MODEL2 (1<<18) // 1 byte, this is .modelindex & 0xFF00 (second byte)
|
||||||
#define U_LERPFINISH (1<<19) // 1 byte, 0.0-1.0 maps to 0-255, not sent if exactly 0.1, this is ent->v.nextthink - sv.time, used for lerping
|
#define U_LERPFINISH (1<<19) // 1 byte, 0.0-1.0 maps to 0-255, not sent if exactly 0.1, this is ent->v.nextthink - sv.time, used for lerping
|
||||||
#define U_SCALE (1<<20) // 1 byte, for PROTOCOL_RMQ PRFL_EDICTSCALE, currently read but ignored
|
#define U_SCALE (1<<20) // 1 byte, for PROTOCOL_RMQ PRFL_EDICTSCALE
|
||||||
#define U_UNUSED21 (1<<21)
|
#define U_UNUSED21 (1<<21)
|
||||||
#define U_UNUSED22 (1<<22)
|
#define U_UNUSED22 (1<<22)
|
||||||
#define U_EXTEND2 (1<<23) // another byte to follow, future expansion
|
#define U_EXTEND2 (1<<23) // another byte to follow, future expansion
|
||||||
|
|
|
@ -1248,6 +1248,13 @@ void SV_CreateBaseline (void)
|
||||||
svent->baseline.modelindex = SV_ModelIndex(PR_GetString(svent->v.model));
|
svent->baseline.modelindex = SV_ModelIndex(PR_GetString(svent->v.model));
|
||||||
svent->baseline.alpha = svent->alpha; //johnfitz -- alpha support
|
svent->baseline.alpha = svent->alpha; //johnfitz -- alpha support
|
||||||
svent->baseline.scale = ENTSCALE_DEFAULT;
|
svent->baseline.scale = ENTSCALE_DEFAULT;
|
||||||
|
if (sv.protocol == PROTOCOL_RMQ)
|
||||||
|
{
|
||||||
|
eval_t* val;
|
||||||
|
val = GetEdictFieldValue(svent, "scale");
|
||||||
|
if (val)
|
||||||
|
svent->baseline.scale = ENTSCALE_ENCODE(val->_float);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//johnfitz -- PROTOCOL_FITZQUAKE
|
//johnfitz -- PROTOCOL_FITZQUAKE
|
||||||
|
|
Loading…
Reference in a new issue