X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcsqcprojectile.qc;h=d250d39def5f523e1a57bb775731128aa04fb7e0;hb=3233dc7af731e4894176b9a317b09ff19090eb21;hp=aecdcf7f2f186b7091123ee7253fcb02753edf9f;hpb=2b80614c3425ce16a39073798b848b8c2b1e840c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/csqcprojectile.qc b/qcsrc/server/csqcprojectile.qc index aecdcf7f2f..d250d39def 100644 --- a/qcsrc/server/csqcprojectile.qc +++ b/qcsrc/server/csqcprojectile.qc @@ -3,10 +3,9 @@ float CSQCProjectile_SendEntity(entity to, float sf) { float ft, fr; - float s; - // note: flag 0x10 = no trail please - sf = sf & 0x1F; + // note: flag 0x08 = no trail please (teleport bit) + sf = sf & 0x0F; if(self.csqcprojectile_clientanimate) sf |= 0x80; // client animated, not interpolated @@ -22,12 +21,8 @@ float CSQCProjectile_SendEntity(entity to, float sf) sf |= 0x20; } - // HACK: subflags for sendflags = 0x80 - - s = 0; - - if (self.movetype == MOVETYPE_BOUNCEMISSILE || self.movetype == MOVETYPE_BOUNCE) - s |= 1; + if(self.gravity != 0) + sf |= 0x10; WriteByte(MSG_ENTITY, ENT_CLIENT_PROJECTILE); WriteByte(MSG_ENTITY, sf); @@ -43,15 +38,8 @@ float CSQCProjectile_SendEntity(entity to, float sf) WriteCoord(MSG_ENTITY, self.velocity_x); WriteCoord(MSG_ENTITY, self.velocity_y); WriteCoord(MSG_ENTITY, self.velocity_z); - WriteCoord(MSG_ENTITY, self.gravity); - - WriteByte(MSG_ENTITY, s); - - if (s & 1) - { - WriteCoord(MSG_ENTITY, self.bouncefactor); - WriteCoord(MSG_ENTITY, self.bouncestop); - } + if(sf & 0x10) + WriteCoord(MSG_ENTITY, self.gravity); } if(sf & 0x20) @@ -101,7 +89,7 @@ void UpdateCSQCProjectile(entity e) if(e.SendEntity == CSQCProjectile_SendEntity) { // send new origin data - e.SendFlags |= 1; + e.SendFlags |= 0x01; } } @@ -109,8 +97,10 @@ void UpdateCSQCProjectileAfterTeleport(entity e) { if(e.SendEntity == CSQCProjectile_SendEntity) { - // send new origin data and mark as teleported - e.SendFlags |= 0x11; + // send new origin data + e.SendFlags |= 0x01; + // mark as teleported + e.SendFlags |= 0x08; } }