void BlastBounceExplode () { float damg; // if (deathmatch == 4) // { // if ( ((other.weapon == 32) || (other.weapon == 16))) // { // if (random() < 0.1) // { // if (other != world) // { // // bprint (PRINT_HIGH, "Got here\n"); // other.deathtype = "blaze"; // T_Damage (other, self, self.owner, 1000 ); // T_RadiusDamage (self, self.owner, 1000, other); // } // } // } // } if (other == self.owner) return; // don't explode on owner if (self.voided) { return; } // self.voided = 1; // if (pointcontents(self.origin) == CONTENT_SKY) // { // remove(self); // return; // } damg = 20 + random()*20; if (other.health) { other.deathtype = "blast"; T_Damage (other, self, self.owner, damg ); } // don't do radius damage to the other, because all the damage // was done in the impact T_RadiusDamage (self, self.owner, damg, other, "blast"); sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM); self.origin = self.origin - 8 * normalize(self.velocity); WriteByte (MSG_MULTICAST, SVC_TEMPENTITY); WriteByte (MSG_MULTICAST, TE_EXPLOSION); WriteCoord (MSG_MULTICAST, self.origin_x); WriteCoord (MSG_MULTICAST, self.origin_y); WriteCoord (MSG_MULTICAST, self.origin_z); multicast (self.origin, MULTICAST_PHS); // remove(self); } void BlastBounce() { if(other.health > 0) { if(other.SaberSwing) { self.owner = other; sound(self, CHAN_AUTO, "blaster/lsaberbounce.wav", 1, ATTN_NORM); } else BlastExplode(); } if(!other.SaberSwing) { if((self.bounces > 2) || (random() > 0.8)) BlastExplode(); } self.movetype = MOVETYPE_BOUNCE; /* if(!(other.SaberSwing)) BlastBounceExplode(); else self.owner = other; */ local float BounceSound; BounceSound = rint(random()*2); if(BounceSound == 0) sound(self, CHAN_BODY, "blaster/blbounce1.wav", 1, ATTN_NORM); if(BounceSound == 1) sound(self, CHAN_BODY, "blaster/blbounce2.wav", 1, ATTN_NORM); if(BounceSound == 2) sound(self, CHAN_BODY, "blaster/blbounce3.wav", 1, ATTN_NORM); self.bounces = self.bounces + 1; self.nextthink = time + 0.05; self.think = BlastThink; } void BlastThink() { if(time >= self.MissileTime) remove(self); if(self.bounces > 0) self.movetype = MOVETYPE_FLYMISSILE; // if(self.voided == 0) // sound(self, CHAN_AUTO, "blaster/blasttrav.wav", 1, ATTN_NORM); self.nextthink = time + 0.05; self.think = BlastThink; }