X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcsqcprojectile.qc;h=49076bb813537061bd02fad06ffd43fb4dd65535;hp=e585b1e37900497737a4800e9f5e5192588a7b50;hb=6d9bb7ebbc3e3930db1004e1051957d99ab8abc8;hpb=ce357a573fec4e54069e480a25bb3e2216be378a diff --git a/qcsrc/server/csqcprojectile.qc b/qcsrc/server/csqcprojectile.qc index e585b1e379..49076bb813 100644 --- a/qcsrc/server/csqcprojectile.qc +++ b/qcsrc/server/csqcprojectile.qc @@ -4,8 +4,8 @@ float CSQCProjectile_SendEntity(entity to, float sf) { float ft, fr; - // 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 @@ -21,6 +21,9 @@ float CSQCProjectile_SendEntity(entity to, float sf) sf |= 0x20; } + if(self.gravity != 0 && self.gravity != 1) + sf |= 0x10; + WriteByte(MSG_ENTITY, ENT_CLIENT_PROJECTILE); WriteByte(MSG_ENTITY, sf); @@ -35,7 +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); + if(sf & 0x10) + WriteCoord(MSG_ENTITY, self.gravity); } if(sf & 0x20) @@ -85,7 +89,7 @@ void UpdateCSQCProjectile(entity e) if(e.SendEntity == CSQCProjectile_SendEntity) { // send new origin data - e.SendFlags |= 1; + e.SendFlags |= 0x01; } } @@ -93,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; } }