home *** CD-ROM | disk | FTP | other *** search
- diff -u ./weapons.qc ./weapons.qc
- --- ./weapons.qc Wed Jul 24 23:51:24 1996
- +++ ./weapons.qc Sun Jan 11 06:50:32 1981
- @@ -202,26 +202,41 @@
- void(float damage, vector dir) TraceAttack =
- {
- local vector vel, org;
- + local vector direction;
- + local float num_ricochets;
-
- - vel = normalize(dir + v_up*crandom() + v_right*crandom());
- - vel = vel + 2*trace_plane_normal;
- - vel = vel * 200;
- + num_ricochets = 0;
-
- - org = trace_endpos - dir*4;
- -
- - if (trace_ent.takedamage)
- - {
- - SpawnBlood (org, vel*0.2, damage);
- - AddMultiDamage (trace_ent, damage);
- - }
- - else
- + do
- {
- + org = trace_endpos - dir*4;
- +
- + if (trace_ent.takedamage)
- + {
- + vel = normalize(dir + v_up*crandom() + v_right*crandom());
- + vel = vel + 2*trace_plane_normal;
- + vel = vel * 200;
- +
- + SpawnBlood (org, vel*0.2, damage);
- + AddMultiDamage (trace_ent, damage);
- + return;
- + }
- + if (pointcontents(org) == CONTENT_SKY)
- + return;
- WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
- WriteByte (MSG_BROADCAST, TE_GUNSHOT);
- WriteCoord (MSG_BROADCAST, org_x);
- WriteCoord (MSG_BROADCAST, org_y);
- WriteCoord (MSG_BROADCAST, org_z);
- - }
- +
- + makevectors ('360 360 360' - self.v_angle);
- + dir = v_forward;
- +
- + traceline (org, org + (dir * 2048), FALSE, self);
- +
- + num_ricochets = num_ricochets + 1;
- +
- + } while (num_ricochets <= 5);
- };
-
- /*
- @@ -608,11 +623,13 @@
- newmis.solid = SOLID_BBOX;
-
- newmis.angles = vectoangles(dir);
- + newmis.v_angle = self.v_angle;
-
- newmis.touch = spike_touch;
- newmis.classname = "spike";
- newmis.think = SUB_Remove;
- newmis.nextthink = time + 6;
- + newmis.frags = 0; // .frags used as ricochet count
- setmodel (newmis, "progs/spike.mdl");
- setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
- setorigin (newmis, org);
- @@ -670,7 +687,7 @@
- .float hit_z;
- void() spike_touch =
- {
- -local float rand;
- +local vector spike_dir;
- if (other == self.owner)
- return;
-
- @@ -688,6 +705,7 @@
- {
- spawn_touchblood (9);
- T_Damage (other, self, self.owner, 9);
- + remove(self);
- }
- else
- {
- @@ -702,15 +720,23 @@
- WriteCoord (MSG_BROADCAST, self.origin_x);
- WriteCoord (MSG_BROADCAST, self.origin_y);
- WriteCoord (MSG_BROADCAST, self.origin_z);
- - }
- -
- - remove(self);
-
- + remove(self);
- +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- + self.frags = self.frags + 1; // frags is used as a
- + if (self.frags <= 5) // ricochet count
- + {
- + self.v_angle = '360 360 360' - self.v_angle;
- + spike_dir = aim (self, 1000);
- + launch_spike(self.origin, spike_dir);
- + }
- + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- + }
- };
-
- void() superspike_touch =
- {
- -local float rand;
- +local vector spike_dir;
- if (other == self.owner)
- return;
-
- @@ -728,6 +754,7 @@
- {
- spawn_touchblood (18);
- T_Damage (other, self, self.owner, 18);
- + remove(self);
- }
- else
- {
- @@ -736,10 +763,21 @@
- WriteCoord (MSG_BROADCAST, self.origin_x);
- WriteCoord (MSG_BROADCAST, self.origin_y);
- WriteCoord (MSG_BROADCAST, self.origin_z);
- - }
- -
- - remove(self);
-
- + remove(self);
- +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- + self.frags = self.frags + 1; // frags is used as a
- + if (self.frags <= 5) // ricochet count
- + {
- + self.v_angle = '360 360 360' - self.v_angle;
- + spike_dir = aim (self, 1000);
- + launch_spike(self.origin, spike_dir);
- + newmis.touch = superspike_touch;
- + setmodel (newmis, "progs/s_spike.mdl");
- + setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
- + }
- + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- + }
- };
-
-
-