mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 14:01:26 +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
|
||||
{
|
||||
eval_t *val;
|
||||
|
||||
if (SV_ModelIndex(PR_GetString(ent->v.model)) & 0xFF00)
|
||||
bits |= B_LARGEMODEL;
|
||||
if ((int)(ent->v.frame) & 0xFF00)
|
||||
|
@ -1610,14 +1608,18 @@ static void PF_makestatic (void)
|
|||
if (ent->alpha != ENTALPHA_DEFAULT)
|
||||
bits |= B_ALPHA;
|
||||
|
||||
val = GetEdictFieldValue(ent, "scale");
|
||||
if (val)
|
||||
ent->scale = ENTSCALE_ENCODE(val->_float);
|
||||
else
|
||||
ent->scale = ENTSCALE_DEFAULT;
|
||||
if (sv.protocol == PROTOCOL_RMQ)
|
||||
{
|
||||
eval_t* val;
|
||||
val = GetEdictFieldValue(ent, "scale");
|
||||
if (val)
|
||||
ent->scale = ENTSCALE_ENCODE(val->_float);
|
||||
else
|
||||
ent->scale = ENTSCALE_DEFAULT;
|
||||
|
||||
if (ent->scale != ENTSCALE_DEFAULT)
|
||||
bits |= B_SCALE;
|
||||
if (ent->scale != ENTSCALE_DEFAULT)
|
||||
bits |= B_SCALE;
|
||||
}
|
||||
}
|
||||
|
||||
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_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_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_UNUSED22 (1<<22)
|
||||
#define U_EXTEND2 (1<<23) // another byte to follow, future expansion
|
||||
|
|
|
@ -641,7 +641,7 @@ void SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
|
|||
|
||||
// johnfitz -- max size for protocol 15 is 18 bytes, not 16 as originally
|
||||
// assumed here. And, for protocol 85 the max size is actually 24 bytes.
|
||||
// For float coords and angles the limit is 40.
|
||||
// For float coords and angles the limit is 40.
|
||||
// FIXME: Use tighter limit according to protocol flags and send bits.
|
||||
if (msg->cursize + 40 > msg->maxsize)
|
||||
{
|
||||
|
@ -1248,6 +1248,13 @@ void SV_CreateBaseline (void)
|
|||
svent->baseline.modelindex = SV_ModelIndex(PR_GetString(svent->v.model));
|
||||
svent->baseline.alpha = svent->alpha; //johnfitz -- alpha support
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue