this.angles = ReadAngleVector();
}
+ if(sf & ISF_SIZE)
+ {
+ setsize(this, '-16 -16 0', '16 16 48');
+ }
+
if(sf & ISF_STATUS) // need to read/write status first so model can handle simple, fb etc.
{
this.ItemStatus = ReadByte();
_setmodel(this, this.mdl);
this.skin = ReadByte();
- }
- if(sf & ISF_SIZE && sf & ISF_SIZE2) // Default
- setsize(this, ITEM_D_MINS, ITEM_D_MAXS);
- else if(sf & ISF_SIZE && !(sf & ISF_SIZE2)) // Small
- setsize(this, ITEM_S_MINS, ITEM_S_MAXS);
- else if(!(sf & ISF_SIZE) && sf & ISF_SIZE2) // Large
- setsize(this, ITEM_D_MINS, ITEM_L_MAXS);
+ setsize(this, '-16 -16 0', '16 16 48');
+ }
if(sf & ISF_COLORMAP)
{
const int IT_PICKUPMASK = IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS | IT_JETPACK | IT_FUEL_REGEN; // strength and invincible are handled separately
// item networking
-const int ISF_SIZE2 = BIT(0);
const int ISF_LOCATION = BIT(1);
const int ISF_MODEL = BIT(2);
const int ISF_STATUS = BIT(3);
else
sf &= ~ISF_DROP;
- // if the client must set the bbox or model,
- // reuse ISF_SIZE and ISF_SIZE2 to also tell it which bbox
- if(sf & ISF_SIZE || sf & ISF_MODEL)
- {
- if(this.maxs == ITEM_S_MAXS) // Small
- {
- sf |= ISF_SIZE;
- sf &= ~ISF_SIZE2;
- }
- else if(this.maxs == ITEM_L_MAXS) // Large
- {
- sf &= ~ISF_SIZE;
- sf |= ISF_SIZE2;
- }
- else // Default
- sf |= ISF_SIZE | ISF_SIZE2;
- }
- else // don't set the bbox
- sf &= ~ISF_SIZE & ~ISF_SIZE2;
-
WriteHeader(MSG_ENTITY, ENT_CLIENT_ITEM);
WriteByte(MSG_ENTITY, sf);
WriteAngleVector(MSG_ENTITY, this.angles);
}
+ // sets size on the client, unused on server
+ //if(sf & ISF_SIZE)
+
if(sf & ISF_STATUS)
WriteByte(MSG_ENTITY, this.ItemStatus);