Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void() Plasma_Touch =
- {
- local vector org;
- if (other == self.owner)
- return; // don't explode on owner
- if (pointcontents(self.origin) == CONTENT_SKY)
- {
- remove(self);
- return;
- }
- sound (self, CHAN_WEAPON, "supenf/lashit.wav", 1, ATTN_STATIC);
- org = self.origin - 8*normalize(self.velocity);
- if (other.health)
- {
- SpawnBlood (org, self.velocity*0.2, 15);
- T_Damage (other, self, self.owner, 20); //15
- }
- else
- {
- 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);
- }
- remove(self);
- };
- void() plasmashot1 = [0, plasmashot2] {self.nextthink = time + 0.05;};
- void() plasmashot2 = [1, plasmashot3] {self.nextthink = time + 0.05;};
- void() plasmashot3 = [2, plasmashot4] {self.nextthink = time + 0.05;};
- void() plasmashot4 = [3, plasmashot1] {self.nextthink = time + 0.05;};
- void(vector org, vector vec) LaunchPlasma =
- {
- local vector vec;
- sound (self, CHAN_WEAPON, "supenf/pshot.wav", 1, ATTN_NORM);
- vec = normalize(vec);
- newmis = spawn();
- newmis.owner = self;
- newmis.movetype = MOVETYPE_FLY;
- newmis.solid = SOLID_BBOX;
- newmis.effects = EF_DIMLIGHT;
- setmodel (newmis, "progs/pshot.spr");
- self.think = plasmashot1;
- setsize (newmis, '0 0 0', '0 0 0');
- setorigin (newmis, org);
- newmis.velocity = vec * 1000; //600
- newmis.angles = vectoangles(newmis.velocity);
- newmis.nextthink = time + 5;
- newmis.think = SUB_Remove;
- newmis.touch = Plasma_Touch;
- };
- void() shock_fire =
- {
- local vector org;
- self.effects = self.effects | EF_MUZZLEFLASH;
- makevectors (self.angles);
- org = self.origin + v_forward * 30 + v_right * 8.5 + '0 0 16';
- LaunchPlasma(org, self.enemy.origin - self.origin);
- };
- -----------------
- void() sup_atk1 =[ $attack1, sup_atk2 ] {ai_face();};
- void() sup_atk2 =[ $attack2, sup_atk3 ] {ai_face();};
- void() sup_atk3 =[ $attack3, sup_atk4 ] {ai_face();};
- void() sup_atk4 =[ $attack4, sup_atk5 ] {ai_face();};
- void() sup_atk5 =[ $attack5, sup_atk6 ] {ai_face();};
- void() sup_atk6 =[ $attack6, sup_atk7 ] {shock_fire();};
- void() sup_atk7 =[ $attack7, sup_atk8 ] {ai_face();};
- void() sup_atk8 =[ $attack8, sup_atk9 ] {ai_face();};
- void() sup_atk9 =[ $attack5, sup_atk10 ] {ai_face();};
- void() sup_atk10 =[ $attack6, sup_atk11 ] {shock_fire();};
- void() sup_atk11 =[ $attack7, sup_atk12 ] {ai_face();};
- void() sup_atk12 =[ $attack8, sup_atk13 ] {ai_face();};
- void() sup_atk13 =[ $attack9, sup_atk14 ] {ai_face();};
- void() sup_atk14 =[ $attack10, sup_run1 ] {ai_face();
- SUB_CheckRefire (sup_atk1);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement