mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +00:00
------------------------------------------------------------------------
r4176 | acceptthis | 2013-01-27 01:55:26 +0000 (Sun, 27 Jan 2013) | 3 lines replacementdeltas+vw_index now works. not quite how I'd originally intended it though. need to test for nq. Fix fitz666 svc_clientdata clientside issue. The judderyness is not my imagination! Thanks sock! :) ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4174 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
a339c727d0
commit
fec7776745
6 changed files with 134 additions and 114 deletions
|
@ -2746,7 +2746,6 @@ static void CL_TransitionPacketEntities(int newsequence, packet_entities_t *newp
|
||||||
sold = &oldpack->entities[oldpnum];
|
sold = &oldpack->entities[oldpnum];
|
||||||
if (sold->number >= snew->number)
|
if (sold->number >= snew->number)
|
||||||
{
|
{
|
||||||
oldpnum++;
|
|
||||||
if (sold->number > snew->number)
|
if (sold->number > snew->number)
|
||||||
sold = NULL; //woo, it's a new entity.
|
sold = NULL; //woo, it's a new entity.
|
||||||
break;
|
break;
|
||||||
|
@ -3043,7 +3042,7 @@ void CL_LinkPacketEntities (void)
|
||||||
packet_entities_t *pack;
|
packet_entities_t *pack;
|
||||||
entity_state_t *state;
|
entity_state_t *state;
|
||||||
lerpents_t *le;
|
lerpents_t *le;
|
||||||
model_t *model;
|
model_t *model, *model2;
|
||||||
vec3_t old_origin;
|
vec3_t old_origin;
|
||||||
float autorotate;
|
float autorotate;
|
||||||
int i;
|
int i;
|
||||||
|
@ -3191,6 +3190,21 @@ void CL_LinkPacketEntities (void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cl.model_precache_vwep[0])
|
||||||
|
{
|
||||||
|
if (state->modelindex == cl_playerindex)
|
||||||
|
{
|
||||||
|
model = cl.model_precache_vwep[0];
|
||||||
|
model2 = cl.model_precache_vwep[state->modelindex2];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
model2 = NULL;
|
||||||
|
}
|
||||||
|
else if (state->modelindex2)
|
||||||
|
model2 = cl.model_precache[state->modelindex2];
|
||||||
|
else
|
||||||
|
model2 = NULL;
|
||||||
|
|
||||||
cl_numvisedicts++;
|
cl_numvisedicts++;
|
||||||
|
|
||||||
ent->externalmodelview = 0;
|
ent->externalmodelview = 0;
|
||||||
|
@ -3319,6 +3333,9 @@ void CL_LinkPacketEntities (void)
|
||||||
rag_updatedeltaent(ent, le);
|
rag_updatedeltaent(ent, le);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (model2)
|
||||||
|
CL_AddVWeapModel (ent, model2);
|
||||||
|
|
||||||
// add automatic particle trails
|
// add automatic particle trails
|
||||||
if (!model || (!(model->flags&~MF_ROTATE) && model->particletrail<0 && model->particleeffect<0 && state->u.q1.traileffectnum==0))
|
if (!model || (!(model->flags&~MF_ROTATE) && model->particletrail<0 && model->particleeffect<0 && state->u.q1.traileffectnum==0))
|
||||||
continue;
|
continue;
|
||||||
|
@ -4099,6 +4116,7 @@ void CL_LinkPlayers (void)
|
||||||
static int flickertime;
|
static int flickertime;
|
||||||
static int flicker;
|
static int flicker;
|
||||||
float predictmsmult = 1000*cl_predict_players_frac.value;
|
float predictmsmult = 1000*cl_predict_players_frac.value;
|
||||||
|
int modelindex2;
|
||||||
|
|
||||||
if (!cl.worldmodel || cl.worldmodel->needload)
|
if (!cl.worldmodel || cl.worldmodel->needload)
|
||||||
return;
|
return;
|
||||||
|
@ -4138,10 +4156,16 @@ void CL_LinkPlayers (void)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
//the extra modelindex check is to stop lame mods from using vweps with rings
|
//the extra modelindex check is to stop lame mods from using vweps with rings
|
||||||
if (state->command.impulse && cl.model_precache_vwep[0] && state->modelindex == cl_playerindex)
|
if (state->command.impulse && cl.model_precache_vwep[0] && cl.model_precache_vwep[0]->type != mod_dummy && state->modelindex == cl_playerindex)
|
||||||
|
{
|
||||||
model = cl.model_precache_vwep[0];
|
model = cl.model_precache_vwep[0];
|
||||||
|
modelindex2 = state->command.impulse;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
model = cl.model_precache[state->modelindex];
|
model = cl.model_precache[state->modelindex];
|
||||||
|
modelindex2 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// spawn light flashes, even ones coming from invisible objects
|
// spawn light flashes, even ones coming from invisible objects
|
||||||
if (r_powerupglow.value && !(r_powerupglow.value == 2 && j == cl.playernum[0])
|
if (r_powerupglow.value && !(r_powerupglow.value == 2 && j == cl.playernum[0])
|
||||||
|
@ -4333,8 +4357,8 @@ void CL_LinkPlayers (void)
|
||||||
CL_AddFlagModels (ent, 0);
|
CL_AddFlagModels (ent, 0);
|
||||||
else if (state->effects & QWEF_FLAG2)
|
else if (state->effects & QWEF_FLAG2)
|
||||||
CL_AddFlagModels (ent, 1);
|
CL_AddFlagModels (ent, 1);
|
||||||
if (state->command.impulse)
|
if (modelindex2)
|
||||||
CL_AddVWeapModel (ent, cl.model_precache_vwep[state->command.impulse]);
|
CL_AddVWeapModel (ent, cl.model_precache_vwep[modelindex2]);
|
||||||
|
|
||||||
CLQ1_AddShadow(ent);
|
CLQ1_AddShadow(ent);
|
||||||
CLQ1_AddPowerupShell(ent, false, state->effects);
|
CLQ1_AddPowerupShell(ent, false, state->effects);
|
||||||
|
|
|
@ -3004,43 +3004,6 @@ Con_DPrintf ("CL_SignonReply: %i\n", cls.signon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SU_VIEWHEIGHT (1<<0)
|
|
||||||
#define SU_IDEALPITCH (1<<1)
|
|
||||||
#define SU_PUNCH1 (1<<2)
|
|
||||||
#define SU_PUNCH2 (1<<3)
|
|
||||||
#define SU_PUNCH3 (1<<4)
|
|
||||||
#define SU_VELOCITY1 (1<<5)
|
|
||||||
#define SU_VELOCITY2 (1<<6)
|
|
||||||
#define SU_VELOCITY3 (1<<7)
|
|
||||||
//define SU_AIMENT (1<<8) AVAILABLE BIT
|
|
||||||
#define SU_ITEMS (1<<9)
|
|
||||||
#define SU_ONGROUND (1<<10) // no data follows, the bit is it
|
|
||||||
#define SU_INWATER (1<<11) // no data follows, the bit is it
|
|
||||||
#define SU_WEAPONFRAME (1<<12)
|
|
||||||
#define SU_ARMOR (1<<13)
|
|
||||||
#define SU_WEAPON (1<<14)
|
|
||||||
|
|
||||||
#define DPSU_EXTEND1 (1<<15)
|
|
||||||
// first extend byte
|
|
||||||
#define DPSU_PUNCHVEC1 (1<<16)
|
|
||||||
#define DPSU_PUNCHVEC2 (1<<17)
|
|
||||||
#define DPSU_PUNCHVEC3 (1<<18)
|
|
||||||
#define DPSU_VIEWZOOM (1<<19) // byte factor (0 = 0.0 (not valid), 255 = 1.0)
|
|
||||||
#define DPSU_UNUSED20 (1<<20)
|
|
||||||
#define DPSU_UNUSED21 (1<<21)
|
|
||||||
#define DPSU_UNUSED22 (1<<22)
|
|
||||||
#define DPSU_EXTEND2 (1<<23) // another byte to follow, future expansion
|
|
||||||
// second extend byte
|
|
||||||
#define DPSU_UNUSED24 (1<<24)
|
|
||||||
#define DPSU_UNUSED25 (1<<25)
|
|
||||||
#define DPSU_UNUSED26 (1<<26)
|
|
||||||
#define DPSU_UNUSED27 (1<<27)
|
|
||||||
#define DPSU_UNUSED28 (1<<28)
|
|
||||||
#define DPSU_UNUSED29 (1<<29)
|
|
||||||
#define DPSU_UNUSED30 (1<<30)
|
|
||||||
#define DPSU_EXTEND3 (1<<31) // another byte to follow, future expansion
|
|
||||||
|
|
||||||
|
|
||||||
#define DEFAULT_VIEWHEIGHT 22
|
#define DEFAULT_VIEWHEIGHT 22
|
||||||
void CLNQ_ParseClientdata (void)
|
void CLNQ_ParseClientdata (void)
|
||||||
{
|
{
|
||||||
|
@ -3050,9 +3013,9 @@ void CLNQ_ParseClientdata (void)
|
||||||
|
|
||||||
bits = (unsigned short)MSG_ReadShort();
|
bits = (unsigned short)MSG_ReadShort();
|
||||||
|
|
||||||
if (bits & DPSU_EXTEND1)
|
if (bits & SU_EXTEND1)
|
||||||
bits |= (MSG_ReadByte() << 16);
|
bits |= (MSG_ReadByte() << 16);
|
||||||
if (bits & DPSU_EXTEND2)
|
if (bits & SU_EXTEND2)
|
||||||
bits |= (MSG_ReadByte() << 24);
|
bits |= (MSG_ReadByte() << 24);
|
||||||
|
|
||||||
if (bits & SU_VIEWHEIGHT)
|
if (bits & SU_VIEWHEIGHT)
|
||||||
|
@ -3073,7 +3036,7 @@ void CLNQ_ParseClientdata (void)
|
||||||
// else
|
// else
|
||||||
// cl.punchangle[i] = 0;
|
// cl.punchangle[i] = 0;
|
||||||
|
|
||||||
if (bits & (DPSU_PUNCHVEC1<<i))
|
if (CPNQ_IS_DP && bits & (DPSU_PUNCHVEC1<<i))
|
||||||
{
|
{
|
||||||
/*cl.punchvector[i] =*/ MSG_ReadCoord();
|
/*cl.punchvector[i] =*/ MSG_ReadCoord();
|
||||||
}
|
}
|
||||||
|
@ -3101,7 +3064,7 @@ void CLNQ_ParseClientdata (void)
|
||||||
{
|
{
|
||||||
CL_SetStatInt(0, STAT_WEAPONFRAME, (bits & SU_WEAPONFRAME)?(unsigned short)MSG_ReadShort():0);
|
CL_SetStatInt(0, STAT_WEAPONFRAME, (bits & SU_WEAPONFRAME)?(unsigned short)MSG_ReadShort():0);
|
||||||
CL_SetStatInt(0, STAT_ARMOR, (bits & SU_ARMOR)?MSG_ReadShort():0);
|
CL_SetStatInt(0, STAT_ARMOR, (bits & SU_ARMOR)?MSG_ReadShort():0);
|
||||||
CL_SetStatInt(0, STAT_WEAPON, (bits & SU_WEAPON)?MSG_ReadShort():0);
|
CL_SetStatInt(0, STAT_WEAPON, (bits & SU_WEAPONMODEL)?MSG_ReadShort():0);
|
||||||
|
|
||||||
CL_SetStatInt(0, STAT_HEALTH, MSG_ReadShort());
|
CL_SetStatInt(0, STAT_HEALTH, MSG_ReadShort());
|
||||||
|
|
||||||
|
@ -3120,51 +3083,55 @@ void CLNQ_ParseClientdata (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CL_SetStatInt(0, STAT_WEAPONFRAME, (bits & SU_WEAPONFRAME)?(unsigned char)MSG_ReadByte():0);
|
int weaponmodel = 0, armor = 0, weaponframe = 0, health = 0, currentammo = 0, shells = 0, nails = 0, rockets = 0, cells = 0, activeweapon = 0;
|
||||||
CL_SetStatInt(0, STAT_ARMOR, (bits & SU_ARMOR)?MSG_ReadByte():0);
|
|
||||||
CL_SetStatInt(0, STAT_WEAPON, (bits & SU_WEAPON)?MSG_ReadByte():0);
|
|
||||||
|
|
||||||
CL_SetStatInt(0, STAT_HEALTH, MSG_ReadShort());
|
if (bits & SU_WEAPONFRAME) weaponframe |= (unsigned char)MSG_ReadByte();
|
||||||
|
if (bits & SU_ARMOR) armor |= (unsigned char)MSG_ReadByte();
|
||||||
CL_SetStatInt(0, STAT_AMMO, MSG_ReadByte());
|
if (bits & SU_WEAPONMODEL) weaponmodel |= (unsigned char)MSG_ReadByte();
|
||||||
|
health |= MSG_ReadShort();
|
||||||
CL_SetStatInt(0, STAT_SHELLS, MSG_ReadByte());
|
currentammo |= MSG_ReadByte();
|
||||||
CL_SetStatInt(0, STAT_NAILS, MSG_ReadByte());
|
shells |= MSG_ReadByte();
|
||||||
CL_SetStatInt(0, STAT_ROCKETS, MSG_ReadByte());
|
nails |= MSG_ReadByte();
|
||||||
CL_SetStatInt(0, STAT_CELLS, MSG_ReadByte());
|
rockets |= MSG_ReadByte();
|
||||||
|
cells |= MSG_ReadByte();
|
||||||
CL_SetStatInt(0, STAT_ACTIVEWEAPON, MSG_ReadByte());
|
activeweapon |= MSG_ReadByte();
|
||||||
|
|
||||||
if (cls.protocol_nq == CPNQ_FITZ666)
|
if (cls.protocol_nq == CPNQ_FITZ666)
|
||||||
{
|
{
|
||||||
#define FITZSU_WEAPON2 (1<<16) // 1 byte, this is .weaponmodel & 0xFF00 (second byte)
|
if (bits & FITZSU_WEAPONMODEL2)
|
||||||
#define FITZSU_ARMOR2 (1<<17) // 1 byte, this is .armorvalue & 0xFF00 (second byte)
|
weaponmodel |= MSG_ReadByte() << 8;
|
||||||
#define FITZSU_AMMO2 (1<<18) // 1 byte, this is .currentammo & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_SHELLS2 (1<<19) // 1 byte, this is .ammo_shells & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_NAILS2 (1<<20) // 1 byte, this is .ammo_nails & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_ROCKETS2 (1<<21) // 1 byte, this is .ammo_rockets & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_CELLS2 (1<<22) // 1 byte, this is .ammo_cells & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_WEAPONFRAME2 (1<<24) // 1 byte, this is .weaponframe & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_WEAPONALPHA (1<<25) // 1 byte, this is alpha for weaponmodel, uses ENTALPHA_ENCODE, not sent if ENTALPHA_DEFAULT
|
|
||||||
if (bits & FITZSU_WEAPON2)
|
|
||||||
MSG_ReadByte();
|
|
||||||
if (bits & FITZSU_ARMOR2)
|
if (bits & FITZSU_ARMOR2)
|
||||||
MSG_ReadByte();
|
armor |= MSG_ReadByte() << 8;
|
||||||
if (bits & FITZSU_AMMO2)
|
if (bits & FITZSU_AMMO2)
|
||||||
MSG_ReadByte();
|
currentammo |= MSG_ReadByte() << 8;
|
||||||
if (bits & FITZSU_SHELLS2)
|
if (bits & FITZSU_SHELLS2)
|
||||||
MSG_ReadByte();
|
shells |= MSG_ReadByte() << 8;
|
||||||
if (bits & FITZSU_NAILS2)
|
if (bits & FITZSU_NAILS2)
|
||||||
MSG_ReadByte();
|
nails |= MSG_ReadByte() << 8;
|
||||||
if (bits & FITZSU_ROCKETS2)
|
if (bits & FITZSU_ROCKETS2)
|
||||||
MSG_ReadByte();
|
rockets |= MSG_ReadByte() << 8;
|
||||||
if (bits & FITZSU_CELLS2)
|
if (bits & FITZSU_CELLS2)
|
||||||
MSG_ReadByte();
|
cells |= MSG_ReadByte() << 8;
|
||||||
if (bits & FITZSU_WEAPONFRAME2)
|
if (bits & FITZSU_WEAPONFRAME2)
|
||||||
MSG_ReadByte();
|
weaponframe |= MSG_ReadByte() << 8;
|
||||||
if (bits & FITZSU_WEAPONALPHA)
|
if (bits & FITZSU_WEAPONALPHA)
|
||||||
MSG_ReadByte();
|
MSG_ReadByte();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CL_SetStatInt(0, STAT_WEAPONFRAME, weaponframe);
|
||||||
|
CL_SetStatInt(0, STAT_ARMOR, armor);
|
||||||
|
CL_SetStatInt(0, STAT_WEAPON, weaponmodel);
|
||||||
|
|
||||||
|
CL_SetStatInt(0, STAT_HEALTH, health);
|
||||||
|
|
||||||
|
CL_SetStatInt(0, STAT_AMMO, currentammo);
|
||||||
|
|
||||||
|
CL_SetStatInt(0, STAT_SHELLS, shells);
|
||||||
|
CL_SetStatInt(0, STAT_NAILS, nails);
|
||||||
|
CL_SetStatInt(0, STAT_ROCKETS, rockets);
|
||||||
|
CL_SetStatInt(0, STAT_CELLS, cells);
|
||||||
|
|
||||||
|
CL_SetStatInt(0, STAT_ACTIVEWEAPON, activeweapon);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CPNQ_IS_DP)
|
if (CPNQ_IS_DP)
|
||||||
|
|
|
@ -572,7 +572,62 @@ enum clcq2_ops_e
|
||||||
|
|
||||||
|
|
||||||
#ifdef NQPROT
|
#ifdef NQPROT
|
||||||
|
//NQ svc_clientdata stat updates.
|
||||||
|
#define SU_VIEWHEIGHT (1<<0)
|
||||||
|
#define SU_IDEALPITCH (1<<1)
|
||||||
|
#define SU_PUNCH1 (1<<2)
|
||||||
|
#define SU_PUNCH2 (1<<3)
|
||||||
|
#define SU_PUNCH3 (1<<4)
|
||||||
|
#define SU_VELOCITY1 (1<<5)
|
||||||
|
#define SU_VELOCITY2 (1<<6)
|
||||||
|
#define SU_VELOCITY3 (1<<7)
|
||||||
|
//define SU_AIMENT (1<<8) AVAILABLE BIT
|
||||||
|
#define SU_ITEMS (1<<9)
|
||||||
|
#define SU_ONGROUND (1<<10) // no data follows, the bit is it
|
||||||
|
#define SU_INWATER (1<<11) // no data follows, the bit is it
|
||||||
|
#define SU_WEAPONFRAME (1<<12)
|
||||||
|
#define SU_ARMOR (1<<13)
|
||||||
|
#define SU_WEAPONMODEL (1<<14)
|
||||||
|
#define SU_EXTEND1 (1<<15)
|
||||||
|
|
||||||
|
#define FITZSU_WEAPONMODEL2 (1<<16) // 1 byte, this is .weaponmodel & 0xFF00 (second byte)
|
||||||
|
#define FITZSU_ARMOR2 (1<<17) // 1 byte, this is .armorvalue & 0xFF00 (second byte)
|
||||||
|
#define FITZSU_AMMO2 (1<<18) // 1 byte, this is .currentammo & 0xFF00 (second byte)
|
||||||
|
#define FITZSU_SHELLS2 (1<<19) // 1 byte, this is .ammo_shells & 0xFF00 (second byte)
|
||||||
|
#define FITZSU_NAILS2 (1<<20) // 1 byte, this is .ammo_nails & 0xFF00 (second byte)
|
||||||
|
#define FITZSU_ROCKETS2 (1<<21) // 1 byte, this is .ammo_rockets & 0xFF00 (second byte)
|
||||||
|
#define FITZSU_CELLS2 (1<<22) // 1 byte, this is .ammo_cells & 0xFF00 (second byte)
|
||||||
|
#define SU_EXTEND2 (1<<23) // another byte to follow
|
||||||
|
|
||||||
|
#define FITZSU_WEAPONFRAME2 (1<<24) // 1 byte, this is .weaponframe & 0xFF00 (second byte)
|
||||||
|
#define FITZSU_WEAPONALPHA (1<<25) // 1 byte, this is alpha for weaponmodel, uses ENTALPHA_ENCODE, not sent if ENTALPHA_DEFAULT
|
||||||
|
#define FITZSU_UNUSED26 (1<<26)
|
||||||
|
#define FITZSU_UNUSED27 (1<<27)
|
||||||
|
#define FITZSU_UNUSED28 (1<<28)
|
||||||
|
#define FITZSU_UNUSED29 (1<<29)
|
||||||
|
#define FITZSU_UNUSED30 (1<<30)
|
||||||
|
#define SU_EXTEND3 (1<<31) // another byte to follow, future expansion
|
||||||
|
|
||||||
|
// first extend byte
|
||||||
|
#define DPSU_PUNCHVEC1 (1<<16)
|
||||||
|
#define DPSU_PUNCHVEC2 (1<<17)
|
||||||
|
#define DPSU_PUNCHVEC3 (1<<18)
|
||||||
|
#define DPSU_VIEWZOOM (1<<19) // byte factor (0 = 0.0 (not valid), 255 = 1.0)
|
||||||
|
#define DPSU_UNUSED20 (1<<20)
|
||||||
|
#define DPSU_UNUSED21 (1<<21)
|
||||||
|
#define DPSU_UNUSED22 (1<<22)
|
||||||
|
// second extend byte
|
||||||
|
#define DPSU_UNUSED24 (1<<24)
|
||||||
|
#define DPSU_UNUSED25 (1<<25)
|
||||||
|
#define DPSU_UNUSED26 (1<<26)
|
||||||
|
#define DPSU_UNUSED27 (1<<27)
|
||||||
|
#define DPSU_UNUSED28 (1<<28)
|
||||||
|
#define DPSU_UNUSED29 (1<<29)
|
||||||
|
#define DPSU_UNUSED30 (1<<30)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//NQ fast updates
|
||||||
#define NQU_MOREBITS (1<<0)
|
#define NQU_MOREBITS (1<<0)
|
||||||
#define NQU_ORIGIN1 (1<<1)
|
#define NQU_ORIGIN1 (1<<1)
|
||||||
#define NQU_ORIGIN2 (1<<2)
|
#define NQU_ORIGIN2 (1<<2)
|
||||||
|
|
|
@ -9645,7 +9645,7 @@ void PR_ResetBuiltins(progstype_t type) //fix all nulls to PF_FIXME and add any
|
||||||
{
|
{
|
||||||
for (i = 0; BuiltinList[i].name; i++)
|
for (i = 0; BuiltinList[i].name; i++)
|
||||||
{
|
{
|
||||||
if (BuiltinList[i].ebfsnum && !BuiltinList[i].obsolete)
|
if (BuiltinList[i].ebfsnum && !BuiltinList[i].obsolete && BuiltinList[i].bifunc != PF_Fixme)
|
||||||
builtincount[BuiltinList[i].ebfsnum]++;
|
builtincount[BuiltinList[i].ebfsnum]++;
|
||||||
}
|
}
|
||||||
for (i = 0; BuiltinList[i].name; i++)
|
for (i = 0; BuiltinList[i].name; i++)
|
||||||
|
|
|
@ -858,6 +858,9 @@ static unsigned int SVFTE_DeltaCalcBits(entity_state_t *from, entity_state_t *to
|
||||||
if (to->u.q1.traileffectnum != from->u.q1.traileffectnum)
|
if (to->u.q1.traileffectnum != from->u.q1.traileffectnum)
|
||||||
bits |= UF_TRAILEFFECT;
|
bits |= UF_TRAILEFFECT;
|
||||||
|
|
||||||
|
if (to->modelindex2 != from->modelindex2)
|
||||||
|
bits |= UF_MODELINDEX2;
|
||||||
|
|
||||||
if (to->u.q1.gravitydir[0] != from->u.q1.gravitydir[0] || to->u.q1.gravitydir[1] != from->u.q1.gravitydir[1])
|
if (to->u.q1.gravitydir[0] != from->u.q1.gravitydir[0] || to->u.q1.gravitydir[1] != from->u.q1.gravitydir[1])
|
||||||
bits |= UF_GRAVITYDIR;
|
bits |= UF_GRAVITYDIR;
|
||||||
|
|
||||||
|
|
|
@ -1235,40 +1235,6 @@ void SV_WriteClientdataToMessage (client_t *client, sizebuf_t *msg)
|
||||||
|
|
||||||
|
|
||||||
bits = 0;
|
bits = 0;
|
||||||
#define SU_VIEWHEIGHT (1<<0)
|
|
||||||
#define SU_IDEALPITCH (1<<1)
|
|
||||||
#define SU_PUNCH1 (1<<2)
|
|
||||||
#define SU_PUNCH2 (1<<3)
|
|
||||||
#define SU_PUNCH3 (1<<4)
|
|
||||||
#define SU_VELOCITY1 (1<<5)
|
|
||||||
#define SU_VELOCITY2 (1<<6)
|
|
||||||
#define SU_VELOCITY3 (1<<7)
|
|
||||||
//define SU_AIMENT (1<<8) AVAILABLE BIT
|
|
||||||
#define SU_ITEMS (1<<9)
|
|
||||||
#define SU_ONGROUND (1<<10) // no data follows, the bit is it
|
|
||||||
#define SU_INWATER (1<<11) // no data follows, the bit is it
|
|
||||||
#define SU_WEAPONFRAME (1<<12)
|
|
||||||
#define SU_ARMOR (1<<13)
|
|
||||||
#define SU_WEAPONMODEL (1<<14)
|
|
||||||
#define SU_EXTEND1 (1<<15)
|
|
||||||
|
|
||||||
#define FITZSU_WEAPONMODEL2 (1<<16) // 1 byte, this is .weaponmodel & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_ARMOR2 (1<<17) // 1 byte, this is .armorvalue & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_AMMO2 (1<<18) // 1 byte, this is .currentammo & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_SHELLS2 (1<<19) // 1 byte, this is .ammo_shells & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_NAILS2 (1<<20) // 1 byte, this is .ammo_nails & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_ROCKETS2 (1<<21) // 1 byte, this is .ammo_rockets & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_CELLS2 (1<<22) // 1 byte, this is .ammo_cells & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_EXTEND2 (1<<23) // another byte to follow
|
|
||||||
|
|
||||||
#define FITZSU_WEAPONFRAME2 (1<<24) // 1 byte, this is .weaponframe & 0xFF00 (second byte)
|
|
||||||
#define FITZSU_WEAPONALPHA (1<<25) // 1 byte, this is alpha for weaponmodel, uses ENTALPHA_ENCODE, not sent if ENTALPHA_DEFAULT
|
|
||||||
#define FITZSU_UNUSED26 (1<<26)
|
|
||||||
#define FITZSU_UNUSED27 (1<<27)
|
|
||||||
#define FITZSU_UNUSED28 (1<<28)
|
|
||||||
#define FITZSU_UNUSED29 (1<<29)
|
|
||||||
#define FITZSU_UNUSED30 (1<<30)
|
|
||||||
#define FITZSU_EXTEND3 (1<<31) // another byte to follow, future expansion
|
|
||||||
|
|
||||||
if (ent->v->view_ofs[2] != DEFAULT_VIEWHEIGHT)
|
if (ent->v->view_ofs[2] != DEFAULT_VIEWHEIGHT)
|
||||||
bits |= SU_VIEWHEIGHT;
|
bits |= SU_VIEWHEIGHT;
|
||||||
|
@ -1348,15 +1314,20 @@ void SV_WriteClientdataToMessage (client_t *client, sizebuf_t *msg)
|
||||||
if (bits >= (1u<<16))
|
if (bits >= (1u<<16))
|
||||||
bits |= SU_EXTEND1;
|
bits |= SU_EXTEND1;
|
||||||
if (bits >= (1u<<24))
|
if (bits >= (1u<<24))
|
||||||
bits |= FITZSU_EXTEND2;
|
bits |= SU_EXTEND2;
|
||||||
if (bits >= (1ull<<32))
|
if (bits >= (1ull<<32))
|
||||||
bits |= FITZSU_EXTEND3;
|
bits |= SU_EXTEND3;
|
||||||
|
|
||||||
// send the data
|
// send the data
|
||||||
|
|
||||||
MSG_WriteByte (msg, svc_clientdata);
|
MSG_WriteByte (msg, svc_clientdata);
|
||||||
MSG_WriteShort (msg, bits);
|
MSG_WriteShort (msg, bits);
|
||||||
|
|
||||||
|
if (bits & SU_EXTEND1)
|
||||||
|
MSG_WriteByte(msg, bits>>16);
|
||||||
|
if (bits & SU_EXTEND2)
|
||||||
|
MSG_WriteByte(msg, bits>>24);
|
||||||
|
|
||||||
if (bits & SU_VIEWHEIGHT)
|
if (bits & SU_VIEWHEIGHT)
|
||||||
MSG_WriteChar (msg, ent->v->view_ofs[2]);
|
MSG_WriteChar (msg, ent->v->view_ofs[2]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue