X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcsqcprojectile.qc;h=3c747bdbb2633c439df886e6b470da9aa82f5165;hb=1182fdc12fe84d3cd9489af075ce1c2e6a88facb;hp=31e5b7788513b7eb180cd929c10d46bae871fc08;hpb=70e0121c311b23e870c263ef672e9778cb519c3e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/csqcprojectile.qc b/qcsrc/server/csqcprojectile.qc index 31e5b7788..3c747bdbb 100644 --- a/qcsrc/server/csqcprojectile.qc +++ b/qcsrc/server/csqcprojectile.qc @@ -13,6 +13,7 @@ float CSQCProjectile_SendEntity(entity to, float sf) if(self.flags & FL_ONGROUND) sf |= 0x40; + ft = fr = 0; if(self.fade_time != 0 || self.fade_rate != 0) { ft = (self.fade_time - time) / sys_frametime; @@ -47,11 +48,13 @@ float CSQCProjectile_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, ft); WriteByte(MSG_ENTITY, fr); } + + WriteByte(MSG_ENTITY, self.realowner.team); } if(sf & 2) WriteByte(MSG_ENTITY, self.csqcprojectile_type); // TODO maybe put this into sf? - + return 1; } @@ -68,9 +71,9 @@ void CSQCProjectile_Check(entity e) void CSQCProjectile(entity e, float clientanimate, float type, float docull) { Net_LinkEntity(e, docull, 0, CSQCProjectile_SendEntity); - + e.csqcprojectile_clientanimate = clientanimate; - + if(e.movetype == MOVETYPE_TOSS || e.movetype == MOVETYPE_BOUNCE) { if(e.gravity == 0) @@ -79,11 +82,15 @@ void CSQCProjectile(entity e, float clientanimate, float type, float docull) else e.gravity = 0; - e.csqcprojectile_type = type; if(!sound_allowed(MSG_BROADCAST, e)) type |= 0x80; + e.csqcprojectile_type = type; } +// FIXME HACK +float ItemSend(entity to, float sf); +void ItemUpdate(entity item); +// END HACK void UpdateCSQCProjectile(entity e) { if(e.SendEntity == CSQCProjectile_SendEntity) @@ -91,6 +98,12 @@ void UpdateCSQCProjectile(entity e) // send new origin data e.SendFlags |= 0x01; } +// FIXME HACK + else if(e.SendEntity == ItemSend) + { + ItemUpdate(e); + } +// END HACK } void UpdateCSQCProjectileAfterTeleport(entity e) @@ -103,25 +116,3 @@ void UpdateCSQCProjectileAfterTeleport(entity e) e.SendFlags |= 0x08; } } - -.void(void) csqcprojectile_oldthink; -.float csqcprojectile_oldnextthink; - -void CSQCProjectile_Update_Think() -{ - UpdateCSQCProjectile(self); - self.think = self.csqcprojectile_oldthink; - self.nextthink = max(time, self.csqcprojectile_oldnextthink); -} - -void UpdateCSQCProjectileNextFrame(entity e) -{ - if(e.SendEntity == CSQCProjectile_SendEntity) - if(e.think != CSQCProjectile_Update_Think) - { - e.csqcprojectile_oldthink = e.think; - e.csqcprojectile_oldnextthink = e.nextthink; - e.think = CSQCProjectile_Update_Think; - e.nextthink = time; - } -}