SHARE
TWEET

Untitled

a guest Dec 28th, 2015 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void() Plasma_Touch =
  2. {
  3.     local vector org;
  4.    
  5.     if (other == self.owner)
  6.         return;     // don't explode on owner
  7.  
  8.     if (pointcontents(self.origin) == CONTENT_SKY)
  9.     {
  10.         remove(self);
  11.         return;
  12.     }
  13.    
  14.     sound (self, CHAN_WEAPON, "supenf/lashit.wav", 1, ATTN_STATIC);
  15.     org = self.origin - 8*normalize(self.velocity);
  16.  
  17.     if (other.health)
  18.     {
  19.         SpawnBlood (org, self.velocity*0.2, 15);
  20.         T_Damage (other, self, self.owner, 20); //15
  21.     }
  22.     else
  23.     {
  24.         WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  25.         WriteByte (MSG_BROADCAST, TE_GUNSHOT);
  26.         WriteCoord (MSG_BROADCAST, org_x);
  27.         WriteCoord (MSG_BROADCAST, org_y);
  28.         WriteCoord (MSG_BROADCAST, org_z);
  29.     }
  30.    
  31.     remove(self);  
  32. };
  33.  
  34. void()  plasmashot1 =   [0,     plasmashot2] {self.nextthink = time + 0.05;};
  35. void()  plasmashot2 =   [1,     plasmashot3] {self.nextthink = time + 0.05;};
  36. void()  plasmashot3 =   [2,     plasmashot4] {self.nextthink = time + 0.05;};
  37. void()  plasmashot4 =   [3,     plasmashot1] {self.nextthink = time + 0.05;};
  38.  
  39. void(vector org, vector vec) LaunchPlasma =
  40. {
  41.     local   vector  vec;
  42.        
  43.  
  44.     sound (self, CHAN_WEAPON, "supenf/pshot.wav", 1, ATTN_NORM);
  45.  
  46.     vec = normalize(vec);
  47.    
  48.     newmis = spawn();
  49.     newmis.owner = self;
  50.     newmis.movetype = MOVETYPE_FLY;
  51.     newmis.solid = SOLID_BBOX;
  52.     newmis.effects = EF_DIMLIGHT;
  53.  
  54.     setmodel (newmis, "progs/pshot.spr");
  55.     self.think = plasmashot1;
  56.     setsize (newmis, '0 0 0', '0 0 0');    
  57.  
  58.     setorigin (newmis, org);
  59.  
  60.     newmis.velocity = vec * 1000; //600
  61.     newmis.angles = vectoangles(newmis.velocity);
  62.  
  63.     newmis.nextthink = time + 5;
  64.     newmis.think = SUB_Remove;
  65.     newmis.touch = Plasma_Touch;
  66. };
  67.  
  68.  
  69.  
  70. void() shock_fire =
  71. {
  72.     local vector org;
  73.  
  74.     self.effects = self.effects | EF_MUZZLEFLASH;
  75.     makevectors (self.angles);
  76.    
  77.     org = self.origin + v_forward * 30 + v_right * 8.5 + '0 0 16';
  78.  
  79.     LaunchPlasma(org, self.enemy.origin - self.origin);
  80. };
  81.  
  82. -----------------
  83.  
  84. void()  sup_atk1    =[  $attack1,   sup_atk2    ] {ai_face();};
  85. void()  sup_atk2    =[  $attack2,   sup_atk3    ] {ai_face();};
  86. void()  sup_atk3    =[  $attack3,   sup_atk4    ] {ai_face();};
  87. void()  sup_atk4    =[  $attack4,   sup_atk5    ] {ai_face();};
  88. void()  sup_atk5    =[  $attack5,   sup_atk6    ] {ai_face();};
  89. void()  sup_atk6    =[  $attack6,   sup_atk7    ] {shock_fire();};
  90. void()  sup_atk7    =[  $attack7,   sup_atk8    ] {ai_face();};
  91. void()  sup_atk8    =[  $attack8,   sup_atk9    ] {ai_face();};
  92. void()  sup_atk9    =[  $attack5,   sup_atk10   ] {ai_face();};
  93. void()  sup_atk10   =[  $attack6,   sup_atk11   ] {shock_fire();};
  94. void()  sup_atk11   =[  $attack7,   sup_atk12   ] {ai_face();};
  95. void()  sup_atk12   =[  $attack8,   sup_atk13   ] {ai_face();};
  96. void()  sup_atk13   =[  $attack9,   sup_atk14   ] {ai_face();};
  97. void()  sup_atk14   =[  $attack10,  sup_run1    ] {ai_face();
  98. SUB_CheckRefire (sup_atk1);
  99. };
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top