home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / morph2 / morph.pat < prev    next >
Encoding:
Text File  |  1996-08-22  |  87.0 KB  |  2,478 lines

  1. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/client.qc morph/client.qc
  2. --- v101qc/client.qc    Thu Jul 25 01:51:22 1996
  3. +++ morph/client.qc    Thu Aug 22 17:02:32 1996
  4. @@ -2,7 +2,7 @@
  5.  // prototypes
  6.  void () W_WeaponFrame;
  7.  void() W_SetCurrentAmmo;
  8. -void() player_pain;
  9. +void(entity attacker, float take) player_pain;
  10.  void() player_stand1;
  11.  void (vector org) spawn_tfog;
  12.  void (vector org, entity death_owner) spawn_tdeath;
  13. @@ -53,6 +53,7 @@
  14.      parm7 = self.ammo_cells;
  15.      parm8 = self.weapon;
  16.      parm9 = self.armortype * 100;
  17. +    parm10 = self.morphnum;
  18.  };
  19.  
  20.  void() SetNewParms =
  21. @@ -66,6 +67,7 @@
  22.      parm6 = 0;
  23.      parm8 = 1;
  24.      parm9 = 0;
  25. +    parm10 = 0; // Human morph
  26.  };
  27.  
  28.  void() DecodeLevelParms =
  29. @@ -85,6 +87,7 @@
  30.      self.ammo_cells = parm7;
  31.      self.weapon = parm8;
  32.      self.armortype = parm9 * 0.01;
  33. +    self.impulse =  parm10;
  34.  };
  35.  
  36.  /*
  37. @@ -468,6 +471,19 @@
  38.      self.invincible_time = 0;
  39.  
  40.      DecodeLevelParms ();
  41. +
  42. +    self._stand=SUB_Null;
  43. +    self._pain=SUB_Null;
  44. +    self._run=SUB_Null;
  45. +    self._impulse=SUB_Null;
  46. +    self._attack=SUB_Null;
  47. +    self._jump=SUB_Null;
  48. +    self._jump2=SUB_Null;
  49. +    self._can_get_p=SUB_True;
  50. +    self._killmsg=SUB_Null;
  51. +    self._killmsg2=SUB_Null;
  52. +
  53. +    self.health_modifier = 1.0;
  54.      
  55.      W_SetCurrentAmmo ();
  56.  
  57. @@ -491,6 +507,7 @@
  58.  
  59.      setmodel (self, "progs/player.mdl");
  60.      modelindex_player = self.modelindex;
  61. +    self.modelindex_morph=modelindex_player;
  62.  
  63.      setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  64.      
  65. @@ -752,6 +769,11 @@
  66.  {
  67.      local vector start, end;
  68.      
  69. +    if (self._jump != SUB_Null) { // Should be after these checks?
  70. +        self._jump();
  71. +        return;
  72. +    }
  73. +
  74.      if (self.flags & FL_WATERJUMP)
  75.          return;
  76.      
  77. @@ -788,6 +810,8 @@
  78.      self.flags = self.flags - FL_ONGROUND;    // don't stairwalk
  79.      
  80.      self.button2 = 0;
  81. +
  82. +    if(self._jump2 != SUB_Null) { self._jump2(); return; }
  83.  // player jumping sound
  84.      sound (self, CHAN_BODY, "player/plyrjmp8.wav", 1, ATTN_NORM);
  85.      self.velocity_z = self.velocity_z + 270;
  86. @@ -1015,7 +1039,7 @@
  87.          self.modelindex = modelindex_eyes;
  88.      }
  89.      else
  90. -        self.modelindex = modelindex_player;    // don't use eyes
  91. +        self.modelindex = self.modelindex_morph;    // don't use eyes
  92.  
  93.  // invincibility
  94.      if (self.invincible_finished)
  95. @@ -1266,59 +1290,64 @@
  96.              {
  97.                  attacker.frags = attacker.frags + 1;
  98.  
  99. -                rnum = attacker.weapon;
  100. -                if (rnum == IT_AXE)
  101. -                {
  102. -                    deathstring = " was ax-murdered by ";
  103. -                    deathstring2 = "\n";
  104. -                }
  105. -                if (rnum == IT_SHOTGUN)
  106. -                {
  107. -                    deathstring = " chewed on ";
  108. -                    deathstring2 = "'s boomstick\n";
  109. -                }
  110. -                if (rnum == IT_SUPER_SHOTGUN)
  111. -                {
  112. -                    deathstring = " ate 2 loads of ";
  113. -                    deathstring2 = "'s buckshot\n";
  114. -                }
  115. -                if (rnum == IT_NAILGUN)
  116. -                {
  117. -                    deathstring = " was nailed by ";
  118. -                    deathstring2 = "\n";
  119. -                }
  120. -                if (rnum == IT_SUPER_NAILGUN)
  121. -                {
  122. -                    deathstring = " was punctured by ";
  123. -                    deathstring2 = "\n";
  124. -                }
  125. -                if (rnum == IT_GRENADE_LAUNCHER)
  126. -                {
  127. -                    deathstring = " eats ";
  128. -                    deathstring2 = "'s pineapple\n";
  129. -                    if (targ.health < -40)
  130. +                if (attacker._killmsg != SUB_Null) {
  131. +                    deathstring = attacker._killmsg(targ, attacker);
  132. +                    deathstring2 = attacker._killmsg2(targ, attacker);
  133. +                } else {
  134. +                    rnum = attacker.weapon;
  135. +                    if (rnum == IT_AXE)
  136.                      {
  137. -                        deathstring = " was gibbed by ";
  138. -                        deathstring2 = "'s grenade\n";
  139. +                        deathstring = " was ax-murdered by ";
  140. +                        deathstring2 = "\n";
  141.                      }
  142. -                }
  143. -                if (rnum == IT_ROCKET_LAUNCHER)
  144. -                {
  145. -                    deathstring = " rides ";
  146. -                    deathstring2 = "'s rocket\n";
  147. -                    if (targ.health < -40)
  148. +                    if (rnum == IT_SHOTGUN)
  149.                      {
  150. -                        deathstring = " was gibbed by ";
  151. -                        deathstring2 = "'s rocket\n" ;
  152. +                        deathstring = " chewed on ";
  153. +                        deathstring2 = "'s boomstick\n";
  154. +                    }
  155. +                    if (rnum == IT_SUPER_SHOTGUN)
  156. +                    {
  157. +                        deathstring = " ate 2 loads of ";
  158. +                        deathstring2 = "'s buckshot\n";
  159. +                    }
  160. +                    if (rnum == IT_NAILGUN)
  161. +                    {
  162. +                        deathstring = " was nailed by ";
  163. +                        deathstring2 = "\n";
  164. +                    }
  165. +                    if (rnum == IT_SUPER_NAILGUN)
  166. +                    {
  167. +                        deathstring = " was punctured by ";
  168. +                        deathstring2 = "\n";
  169. +                    }
  170. +                    if (rnum == IT_GRENADE_LAUNCHER)
  171. +                    {
  172. +                        deathstring = " eats ";
  173. +                        deathstring2 = "'s pineapple\n";
  174. +                        if (targ.health < -40)
  175. +                        {
  176. +                            deathstring = " was gibbed by ";
  177. +                            deathstring2 = "'s grenade\n";
  178. +                        }
  179. +                    }
  180. +                    if (rnum == IT_ROCKET_LAUNCHER)
  181. +                    {
  182. +                        deathstring = " rides ";
  183. +                        deathstring2 = "'s rocket\n";
  184. +                        if (targ.health < -40)
  185. +                        {
  186. +                            deathstring = " was gibbed by ";
  187. +                            deathstring2 = "'s rocket\n" ;
  188. +                        }
  189. +                    }
  190. +                    if (rnum == IT_LIGHTNING)
  191. +                    {
  192. +                        deathstring = " accepts ";
  193. +                        if (attacker.waterlevel > 1)
  194. +                            deathstring2 = "'s discharge\n";
  195. +                        else
  196. +                            deathstring2 = "'s shaft\n";
  197.                      }
  198. -                }
  199. -                if (rnum == IT_LIGHTNING)
  200. -                {
  201. -                    deathstring = " accepts ";
  202. -                    if (attacker.waterlevel > 1)
  203. -                        deathstring2 = "'s discharge\n";
  204. -                    else
  205. -                        deathstring2 = "'s shaft\n";
  206.                  }
  207.                  bprint (targ.netname);
  208.                  bprint (deathstring);
  209. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/defs.qc morph/defs.qc
  210. --- v101qc/defs.qc    Thu Jul 25 01:51:22 1996
  211. +++ morph/defs.qc    Thu Aug 22 17:03:01 1996
  212. @@ -690,4 +690,16 @@
  213.  
  214.  float(entity targ, entity inflictor) CanDamage;
  215.  
  216. -
  217. +.void() _stand;
  218. +.void(entity attacker, float take) _pain;
  219. +.void() _run;
  220. +.void() _impulse;
  221. +.void() _attack;
  222. +.void() _jump;
  223. +.void() _jump2;
  224. +.float morphnum;
  225. +.float(entity what, entity you) _can_get_p;
  226. +.float modelindex_morph;
  227. +.float health_modifier;
  228. +.string(entity targ, entity attacker) _killmsg;
  229. +.string(entity targ, entity attacker) _killmsg2;
  230. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/items.qc morph/items.qc
  231. --- v101qc/items.qc    Thu Jul 25 01:51:23 1996
  232. +++ morph/items.qc    Thu Aug 15 07:46:19 1996
  233. @@ -82,15 +82,15 @@
  234.  {
  235.      if (e.health <= 0)
  236.          return 0;
  237. -    if ((!ignore) && (e.health >= other.max_health))
  238. +    if ((!ignore) && (e.health >= other.max_health * other.health_modifier))
  239.          return 0;
  240.      healamount = ceil(healamount);
  241.  
  242.      e.health = e.health + healamount;
  243. -    if ((!ignore) && (e.health >= other.max_health))
  244. -        e.health = other.max_health;
  245. +    if ((!ignore) && (e.health >= other.max_health * other.health_modifier))
  246. +        e.health = other.max_health * other.health_modifier;
  247.          
  248. -    if (e.health > 250)
  249. +    if (e.health > 2.5 * other.max_health * e.health_modifier)
  250.          e.health = 250;
  251.      return 1;
  252.  };
  253. @@ -154,11 +154,12 @@
  254.      
  255.      if (other.classname != "player")
  256.          return;
  257. +    // if (!other._can_get_p(self,other)) return; // We can always get health
  258.      
  259.      if (self.healtype == 2) // Megahealth?  Ignore max_health...
  260.      {
  261. -        if (other.health >= 250)
  262. -            return;
  263. +        //if (other.health >= 250)
  264. +        //    return;
  265.          if (!T_Heal(other, self.healamount, 1))
  266.              return;
  267.      }
  268. @@ -207,7 +208,7 @@
  269.  {
  270.      other = self.owner;
  271.      
  272. -    if (other.health > other.max_health)
  273. +    if (other.health > other.max_health * other.health_modifier)
  274.      {
  275.          other.health = other.health - 1;
  276.          self.nextthink = time + 1;
  277. @@ -243,6 +244,7 @@
  278.          return;
  279.      if (other.classname != "player")
  280.          return;
  281. +    if (!other._can_get_p(self,other)) return;
  282.  
  283.      if (self.classname == "item_armor1")
  284.      {
  285. @@ -397,6 +399,7 @@
  286.  
  287.      if (!(other.flags & FL_CLIENT))
  288.          return;
  289. +    if (!other._can_get_p(self,other)) return;
  290.  
  291.  // if the player was using his best weapon, change up to the new one if better        
  292.      stemp = self;
  293. @@ -598,11 +601,14 @@
  294.  {
  295.  local entity    stemp;
  296.  local float        best;
  297. +local float cgp;
  298.  
  299.      if (other.classname != "player")
  300.          return;
  301.      if (other.health <= 0)
  302.          return;
  303. +    cgp=other._can_get_p(self,other);
  304. +    if (!cgp) return;
  305.  
  306.  // if the player was using his best weapon, change up to the new one if better        
  307.      stemp = self;
  308. @@ -654,21 +660,21 @@
  309.  
  310.  // change to a better weapon if appropriate
  311.  
  312. -    if ( other.weapon == best )
  313. +    if ( (cgp == 1) && (other.weapon == best ))
  314.      {
  315.          stemp = self;
  316.          self = other;
  317.          self.weapon = W_BestWeapon();
  318.          W_SetCurrentAmmo ();
  319.          self = stemp;
  320. -    }
  321.  
  322.  // if changed current ammo, update it
  323. -    stemp = self;
  324. -    self = other;
  325. -    W_SetCurrentAmmo();
  326. -    self = stemp;
  327. +        stemp = self;
  328. +        self = other;
  329. +        W_SetCurrentAmmo();
  330. +        self = stemp;
  331.  
  332. +    }
  333.  // remove it in single player, or setup for respawning in deathmatch
  334.      self.model = string_null;
  335.      self.solid = SOLID_NOT;
  336. @@ -878,6 +884,7 @@
  337.          return;
  338.      if (other.items & self.items)
  339.          return;
  340. +    // if (!other._can_get_p(self,other)) return; // Always allow key getting
  341.  
  342.      sprint (other, "You got the ");
  343.      sprint (other, self.netname);
  344. @@ -1012,6 +1019,7 @@
  345.          return;
  346.      if (other.health <= 0)
  347.          return;
  348. +    // if (!other._can_get_p(self,other)) return; // Always allow rune getting
  349.  
  350.      centerprint (other, "You got the rune!");
  351.  
  352. @@ -1085,6 +1093,7 @@
  353.          return;
  354.      if (other.health <= 0)
  355.          return;
  356. +    // if (!other._can_get_p(self,other)) return; // We can always get powerups
  357.  
  358.      sprint (other, "You got the ");
  359.      sprint (other, self.netname);
  360. @@ -1232,11 +1241,14 @@
  361.      local string    s;
  362.      local    float    best;
  363.      local        entity    stemp;
  364. +    local float    cgp;
  365.      
  366.      if (other.classname != "player")
  367.          return;
  368.      if (other.health <= 0)
  369.          return;
  370. +    cgp=other._can_get_p(self,other);
  371. +    if (!cgp) return;
  372.          
  373.  // if the player was using his best weapon, change up to the new one if better        
  374.      stemp = self;
  375. @@ -1287,19 +1299,17 @@
  376.      stuffcmd (other, "bf\n");
  377.  
  378.  // change to a better weapon if appropriate
  379. -    if ( other.weapon == best )
  380. +    if ( other.weapon == best && cgp == 1)
  381.      {
  382.          stemp = self;
  383.          self = other;
  384.          self.weapon = W_BestWeapon();
  385. +        W_SetCurrentAmmo ();
  386.          self = stemp;
  387.      }
  388.  
  389.      
  390.      remove(self);
  391. -    
  392. -    self = other;
  393. -    W_SetCurrentAmmo ();
  394.  };
  395.  
  396.  /*
  397. @@ -1337,4 +1347,51 @@
  398.      
  399.      item.nextthink = time + 120;    // remove after 2 minutes
  400.      item.think = SUB_Remove;
  401. +};
  402. +
  403. +void() BackpackSolidify = {
  404. +    self.solid = SOLID_TRIGGER;
  405. +    self.touch = BackpackTouch;
  406. +    self.nextthink = time + 900; // 15 minutes
  407. +    self.think = SUB_Remove;
  408. +    setmodel (self, "progs/backpack.mdl");
  409. +    setsize (self, '-16 -16 0', '16 16 56');
  410. +};
  411. +
  412. +void() DropBackpack2 =
  413. +{
  414. +    local entity    item;
  415. +
  416. +    if (!(self.ammo_shells + self.ammo_nails + self.ammo_rockets + self.ammo_cells))
  417. +        return;    // nothing in it
  418. +
  419. +    item = spawn();
  420. +    item.origin = self.origin - '0 0 24';
  421. +    
  422. +    item.items = self.weapon;
  423. +
  424. +    item.ammo_shells = self.ammo_shells;
  425. +    item.ammo_nails = self.ammo_nails;
  426. +    item.ammo_rockets = self.ammo_rockets;
  427. +    item.ammo_cells = self.ammo_cells;
  428. +
  429. +    self.ammo_shells=0;
  430. +    self.ammo_nails=0;
  431. +    self.ammo_rockets=0;
  432. +    self.ammo_cells=0;
  433. +
  434. +    item.velocity_z = 300;
  435. +    item.velocity_x = -100 + (random() * 200);
  436. +    item.velocity_y = -100 + (random() * 200);
  437. +    
  438. +    item.flags = FL_ITEM;
  439. +    item.solid = SOLID_NOT;
  440. +    item.movetype = MOVETYPE_TOSS;
  441. +    setmodel (item, "progs/backpack.mdl");
  442. +    setsize (item, '-16 -16 0', '16 16 56');
  443. +    // item.touch = BackpackTouch;
  444. +    
  445. +    item.nextthink = time + 2;    // solidify in two seconds
  446. +    item.think = BackpackSolidify;
  447. +    item.owner = world;
  448.  };
  449. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/m-demon.qc morph/m-demon.qc
  450. --- v101qc/m-demon.qc    Wed Dec 31 18:00:00 1969
  451. +++ morph/m-demon.qc    Thu Aug 22 17:08:25 1996
  452. @@ -0,0 +1,171 @@
  453. +/*
  454. +==============================================================================
  455. +
  456. +DEMON
  457. +
  458. +==============================================================================
  459. +*/
  460. +
  461. +$cd /raid/quake/id1/models/demon3
  462. +$scale    0.8
  463. +$origin 0 0 24
  464. +$base base
  465. +$skin base
  466. +
  467. +$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
  468. +$frame stand10 stand11 stand12 stand13
  469. +
  470. +$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8
  471. +
  472. +$frame run1 run2 run3 run4 run5 run6
  473. +
  474. +$frame leap1 leap2 leap3 leap4 leap5 leap6 leap7 leap8 leap9 leap10
  475. +$frame leap11 leap12
  476. +
  477. +$frame pain1 pain2 pain3 pain4 pain5 pain6
  478. +
  479. +$frame death1 death2 death3 death4 death5 death6 death7 death8 death9
  480. +
  481. +$frame attacka1 attacka2 attacka3 attacka4 attacka5 attacka6 attacka7 attacka8
  482. +$frame attacka9 attacka10 attacka11 attacka12 attacka13 attacka14 attacka15
  483. +
  484. +void(float side) player_demon_melee = {
  485. +        local   vector  source;
  486. +        local   vector  org;
  487. +        local   float   ldmg;
  488. +
  489. +        sound (self, CHAN_WEAPON, "weapons/ax1.wav", 1, ATTN_NORM);
  490. +
  491. +        source = self.origin + '0 0 4';
  492. +        makevectors (self.angles);
  493. +        traceline (source, source + v_forward*64, FALSE, self);
  494. +        if (!trace_ent.takedamage)
  495. +                traceline (source, source + v_forward*64 + v_right*30, FALSE, self);
  496. +        if (!trace_ent.takedamage)
  497. +                traceline (source, source + v_forward*64 - v_right*30, FALSE, self);
  498. +
  499. +        if (trace_fraction == 1.0)
  500. +                return;
  501. +
  502. +        org = trace_endpos - v_forward*4;
  503. +        if (trace_ent.takedamage)
  504. +        {
  505. +            sound (self, CHAN_WEAPON, "demon/dhit2.wav", 1, ATTN_NORM);
  506. +                ldmg = 40 + 10*random();
  507. +                T_Damage (trace_ent, self, self, ldmg);
  508. +
  509. +                SpawnMeatSpray (self.origin + v_forward*16, side * v_right);
  510. +        }
  511. +};
  512. +
  513. +void()  player_demon_attack = [$attacka1, player_demon_attack2 ] {self.attack_finished=time+1; self.view_ofs = '0 0 8';};
  514. +void()  player_demon_attack2 = [$attacka2, player_demon_attack3 ] {self.view_ofs = '0 0 16';};
  515. +void()  player_demon_attack3 = [$attacka3, player_demon_attack4 ] {self.view_ofs = '0 0 25';};
  516. +void()  player_demon_attack4 = [$attacka4, player_demon_attack5 ] {self.view_ofs = '0 0 23';};
  517. +void()  player_demon_attack5 = [$attacka5, player_demon_attack6 ] {self.view_ofs = '0 0 21'; player_demon_melee(200);};
  518. +void()  player_demon_attack6 = [$attacka6, player_demon_attack7 ] {self.view_ofs = '0 0 23';};
  519. +void()  player_demon_attack7 = [$attacka7, player_demon_attack8 ] {self.view_ofs = '0 0 24';};
  520. +void()  player_demon_attack8 = [$attacka8, player_demon_attack9 ] {self.view_ofs = '0 0 25';};
  521. +void()  player_demon_attack9 = [$attacka9, player_demon_attack10 ] {self.view_ofs = '0 0 24';};
  522. +void()  player_demon_attack10 = [$attacka10, player_demon_attack11 ] {self.view_ofs = '0 0 23';};
  523. +void()  player_demon_attack11 = [$attacka11, player_demon_attack12 ] {self.view_ofs = '0 0 21'; player_demon_melee(-200);};
  524. +void()  player_demon_attack12 = [$attacka12, player_demon_attack13 ] {self.view_ofs = '0 0 16';};
  525. +void()  player_demon_attack13 = [$attacka13, player_demon_attack14 ] {self.view_ofs = '0 0 12';};
  526. +void()  player_demon_attack14 = [$attacka14, player_demon_attack15 ] {self.view_ofs = '0 0 8';};
  527. +void()  player_demon_attack15 = [$attacka15, player_stand1 ] {self.view_ofs = '0 0 4';};
  528. +
  529. +void() player_demon_jumptouch =
  530. +{
  531. +        local float ldmg;
  532. +
  533. +        if(other.takedamage)
  534. +        {
  535. +                ldmg = 40 + 10*random();
  536. +                T_Damage(other, self, self, ldmg);
  537. +                SpawnMeatSpray (self.origin + v_forward*20,  100* v_forward);
  538. +                SpawnMeatSpray (self.origin + v_forward*20,  50* v_forward);
  539. +        }
  540. +
  541. +        self.touch = SUB_Null;
  542. +};
  543. +
  544. +void() player_demon_jump1 = [ $leap1, player_demon_jump1 ] {
  545. +        if (self.walkframe >= 12)
  546. +                self.walkframe = 11;
  547. +        self.frame = $leap1 + self.walkframe;
  548. +        self.walkframe = self.walkframe + 1;
  549. +        if (self.flags & FL_ONGROUND) {
  550. +        self.touch = SUB_Null;
  551. +                player_stand1();
  552. +    }
  553. +};
  554. +
  555. +void() player_demon_jump = {
  556. +    makevectors(self.v_angle);
  557. +    self.origin_z = self.origin_z + 1;
  558. +    self.velocity = v_forward * 800 + '0 0 350';
  559. +    sound(self, CHAN_BODY, "demon/djump.wav", 1, ATTN_NORM);
  560. +    self.touch = player_demon_jumptouch;
  561. +    player_demon_jump1();
  562. +};
  563. +
  564. +void() player_demon_stand = [ $stand1, player_stand1 ] {
  565. +    if(self.walkframe >= 13)
  566. +        self.walkframe=0;
  567. +    self.frame = $stand1 + self.walkframe;
  568. +    self.walkframe = self.walkframe + 1;
  569. +};
  570. +
  571. +void() player_demon_run = [ $run1, player_run ] {
  572. +    if(self.walkframe >= 6)
  573. +        self.walkframe = 0;
  574. +    self.frame = $run1 + self.walkframe;
  575. +    self.walkframe = self.walkframe + 1;
  576. +};
  577. +
  578. +void() player_demon_pain = [       $pain5, player_demon_pain1    ]
  579. +{
  580. +        self.walkframe = 1;
  581. +        PainSound();
  582. +        self.weaponframe = 0;
  583. +        self.frame = $pain5;
  584. +};
  585. +
  586. +void()  player_demon_pain1 =  [      $pain1, player_demon_pain1    ]
  587. +{
  588. +        if (self.walkframe >=10)
  589. +                player_stand1();
  590. +        if (self.walkframe < 6)
  591. +                self.frame = $pain5 + self.walkframe;
  592. +        else self.frame = $pain5 + (10 - self.walkframe);
  593. +        self.walkframe = self.walkframe + 1;
  594. +};
  595. +
  596. +string() player_demon_killmsg = { return " was slashed by "; };
  597. +string() player_demon_killmsg2 = { return "\n"; };
  598. +
  599. +void() player_demon_become = {
  600. +    bprint(self.netname);
  601. +    bprint(" has become a fiend.\n");
  602. +    self._stand=player_demon_stand;
  603. +    self._run=player_demon_run;    
  604. +    self._pain=player_demon_pain;
  605. +    self._jump=SUB_Null;
  606. +    self._jump2=player_demon_jump;
  607. +    self._attack=player_demon_attack;
  608. +    self._impulse=SUB_Nop;
  609. +    self._can_get_p=SUB_False;
  610. +    self._killmsg=player_demon_killmsg;
  611. +    self._killmsg2=player_demon_killmsg2;
  612. +    setmodel(self,"progs/demon.mdl");
  613. +    self.modelindex_morph=self.modelindex;
  614. +    self.weaponmodel="";
  615. +    self.view_ofs = '0 0 22';
  616. +    if(!deathmatch) setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  617. +    else setsize (self, '-16 -16 -24', '16 16 40');
  618. +    self.health = self.health * 5.00 / self.health_modifier;
  619. +    self.health_modifier = 5.00;
  620. +    makevectors(self.v_angle);
  621. +    spawn_tfog(self.origin + 20 * v_forward);
  622. +    DropBackpack2();
  623. +};
  624. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/m-hknigh.qc morph/m-hknigh.qc
  625. --- v101qc/m-hknigh.qc    Wed Dec 31 18:00:00 1969
  626. +++ morph/m-hknigh.qc    Thu Aug 22 17:08:29 1996
  627. @@ -0,0 +1,260 @@
  628. +/*
  629. +==============================================================================
  630. +
  631. +KNIGHT
  632. +
  633. +==============================================================================
  634. +*/
  635. +
  636. +$cd /raid/quake/id1/models/knight2
  637. +$origin 0 0 24
  638. +$base base
  639. +$skin skin
  640. +
  641. +$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
  642. +
  643. +$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8 walk9
  644. +$frame walk10 walk11 walk12 walk13 walk14 walk15 walk16 walk17
  645. +$frame walk18 walk19 walk20
  646. +
  647. +$frame run1 run2 run3 run4 run5 run6 run7 run8
  648. +
  649. +$frame pain1 pain2 pain3 pain4 pain5
  650. +
  651. +$frame death1 death2 death3 death4 death5 death6 death7 death8
  652. +$frame death9 death10 death11 death12
  653. +
  654. +$frame deathb1 deathb2 deathb3 deathb4 deathb5 deathb6 deathb7 deathb8
  655. +$frame deathb9
  656. +
  657. +$frame char_a1 char_a2 char_a3 char_a4 char_a5 char_a6 char_a7 char_a8
  658. +$frame char_a9 char_a10 char_a11 char_a12 char_a13 char_a14 char_a15 char_a16
  659. +
  660. +$frame magica1 magica2 magica3 magica4 magica5 magica6 magica7 magica8
  661. +$frame magica9 magica10 magica11 magica12 magica13 magica14
  662. +
  663. +$frame magicb1 magicb2 magicb3 magicb4 magicb5 magicb6 magicb7 magicb8
  664. +$frame magicb9 magicb10 magicb11 magicb12 magicb13
  665. +
  666. +$frame char_b1 char_b2 char_b3 char_b4 char_b5 char_b6
  667. +
  668. +$frame slice1 slice2 slice3 slice4 slice5 slice6 slice7 slice8 slice9 slice10
  669. +
  670. +$frame smash1 smash2 smash3 smash4 smash5 smash6 smash7 smash8 smash9 smash10
  671. +$frame smash11
  672. +
  673. +$frame w_attack1 w_attack2 w_attack3 w_attack4 w_attack5 w_attack6 w_attack7 
  674. +$frame w_attack8 w_attack9 w_attack10 w_attack11 w_attack12 w_attack13 w_attack14
  675. +$frame w_attack15 w_attack16 w_attack17 w_attack18 w_attack19 w_attack20 
  676. +$frame w_attack21 w_attack22 
  677. +
  678. +$frame magicc1 magicc2 magicc3 magicc4 magicc5 magicc6 magicc7 magicc8
  679. +$frame magicc9 magicc10 magicc11
  680. +
  681. +void() player_hknight_stand = [ $stand1, player_stand1 ] {
  682. +    if(self.walkframe >= 9)    
  683. +        self.walkframe = 0;
  684. +    self.frame = $stand1 + self.walkframe;
  685. +    self.walkframe = self.walkframe + 1;
  686. +};
  687. +
  688. +void() player_hknight_run = [ $run1, player_run ] {
  689. +    if (self.walkframe >= 8)
  690. +        self.walkframe = 0;
  691. +    self.frame = $run1 + self.walkframe;
  692. +    self.walkframe = self.walkframe + 1;
  693. +};
  694. +
  695. +////////////////////////////////////////////
  696. +// 5 frames of pain for player_hknight, going to player_stand1
  697. +////////////////////////////////////////////
  698. +
  699. +void() player_hknight_pain1 = [ $pain1, player_hknight_pain2 ] { };
  700. +void() player_hknight_pain2 = [ $pain2, player_hknight_pain3 ] { };
  701. +void() player_hknight_pain3 = [ $pain3, player_hknight_pain4 ] { };
  702. +void() player_hknight_pain4 = [ $pain4, player_hknight_pain5 ] { };
  703. +void() player_hknight_pain5 = [ $pain5, player_stand1 ] { };
  704. +
  705. +void() player_hknight_pain = {
  706. +    if(self.pain_finished > time) return;
  707. +    self.pain_finished = time + 1;
  708. +    player_hknight_pain1();
  709. +};
  710. +
  711. +void(float offset) player_hknight_shot =
  712. +{
  713. +    local    vector    offang;
  714. +    local    vector    org, vec;
  715. +    
  716. +    offang = self.v_angle;
  717. +    offang_y = offang_y + offset * 6;
  718. +    
  719. +    makevectors (offang);
  720. +
  721. +    org = self.origin + self.mins + self.size*0.5 + v_forward * 20;
  722. +
  723. +// set missile speed
  724. +    vec = normalize (v_forward);
  725. +    vec_z = vec_z + (random() - 0.5)*0.1;
  726. +    
  727. +    launch_spike (org, vec);
  728. +    newmis.classname = "knightspike";
  729. +    setmodel (newmis, "progs/k_spike.mdl");
  730. +    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);        
  731. +    newmis.velocity = vec*300;
  732. +    sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);
  733. +};
  734. +
  735. +void() player_hknight_sword = {
  736. +    local    vector    source;
  737. +    local    vector    org;
  738. +
  739. +    source = self.origin + '0 0 16';
  740. +    traceline (source, source + v_forward*96, FALSE, self);
  741. +    if (trace_fraction == 1.0)
  742. +        return;
  743. +    
  744. +    org = trace_endpos - v_forward*4;
  745. +
  746. +    if (trace_ent.takedamage)
  747. +    {
  748. +        trace_ent.axhitme = 1;
  749. +        SpawnBlood (org, '0 0 0', 20);
  750. +        T_Damage (trace_ent, self, self, 20);
  751. +    }
  752. +    else
  753. +    {    // hit wall
  754. +        sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
  755. +        WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  756. +        WriteByte (MSG_BROADCAST, TE_GUNSHOT);
  757. +        WriteCoord (MSG_BROADCAST, org_x);
  758. +        WriteCoord (MSG_BROADCAST, org_y);
  759. +        WriteCoord (MSG_BROADCAST, org_z);
  760. +    }
  761. +};
  762. +////////////////////////////////////////////
  763. +// 10 frames of slice for player_hknight, going to player_stand1
  764. +////////////////////////////////////////////
  765. +
  766. +void() player_hknight_slice1 = [ $slice1, player_hknight_slice2 ] { };
  767. +void() player_hknight_slice2 = [ $slice2, player_hknight_slice3 ] { };
  768. +void() player_hknight_slice3 = [ $slice3, player_hknight_slice4 ] { };
  769. +void() player_hknight_slice4 = [ $slice4, player_hknight_slice5 ] { player_hknight_sword(); };
  770. +void() player_hknight_slice5 = [ $slice5, player_hknight_slice6 ] { };
  771. +void() player_hknight_slice6 = [ $slice6, player_hknight_slice7 ] { player_hknight_sword(); };
  772. +void() player_hknight_slice7 = [ $slice7, player_hknight_slice8 ] { };
  773. +void() player_hknight_slice8 = [ $slice8, player_hknight_slice9 ] { };
  774. +void() player_hknight_slice9 = [ $slice9, player_hknight_slice10 ] { };
  775. +void() player_hknight_slice10 = [ $slice10, player_stand1 ] { };
  776. +
  777. +////////////////////////////////////////////
  778. +// 11 frames of smash for player_hknight, going to player_stand1
  779. +////////////////////////////////////////////
  780. +
  781. +void() player_hknight_smash1 = [ $smash1, player_hknight_smash2 ] { };
  782. +void() player_hknight_smash2 = [ $smash2, player_hknight_smash3 ] { };
  783. +void() player_hknight_smash3 = [ $smash3, player_hknight_smash4 ] { };
  784. +void() player_hknight_smash4 = [ $smash4, player_hknight_smash5 ] { };
  785. +void() player_hknight_smash5 = [ $smash5, player_hknight_smash6 ] { player_hknight_sword(); };
  786. +void() player_hknight_smash6 = [ $smash6, player_hknight_smash7 ] { };
  787. +void() player_hknight_smash7 = [ $smash7, player_hknight_smash8 ] { player_hknight_sword(); };
  788. +void() player_hknight_smash8 = [ $smash8, player_hknight_smash9 ] { };
  789. +void() player_hknight_smash9 = [ $smash9, player_hknight_smash10 ] { player_hknight_sword(); };
  790. +void() player_hknight_smash10 = [ $smash10, player_hknight_smash11 ] { };
  791. +void() player_hknight_smash11 = [ $smash11, player_stand1 ] { };
  792. +
  793. +////////////////////////////////////////////
  794. +// 14 frames of magica for player_hknight, going to player_stand1
  795. +////////////////////////////////////////////
  796. +
  797. +void() player_hknight_magica1 = [ $magica1, player_hknight_magica2 ] { };
  798. +void() player_hknight_magica2 = [ $magica2, player_hknight_magica3 ] { };
  799. +void() player_hknight_magica3 = [ $magica3, player_hknight_magica4 ] { };
  800. +void() player_hknight_magica4 = [ $magica4, player_hknight_magica5 ] { };
  801. +void() player_hknight_magica5 = [ $magica5, player_hknight_magica6 ] { };
  802. +void() player_hknight_magica6 = [ $magica6, player_hknight_magica7 ] { };
  803. +void() player_hknight_magica7 = [ $magica7, player_hknight_magica8 ] { player_hknight_shot(-2);};
  804. +void() player_hknight_magica8 = [ $magica8, player_hknight_magica9 ] { player_hknight_shot(-1);};
  805. +void() player_hknight_magica9 = [ $magica9, player_hknight_magica10 ] { player_hknight_shot(0);};
  806. +void() player_hknight_magica10 = [ $magica10, player_hknight_magica11 ] { player_hknight_shot(1);};
  807. +void() player_hknight_magica11 = [ $magica11, player_hknight_magica12 ] { player_hknight_shot(2);};
  808. +void() player_hknight_magica12 = [ $magica12, player_hknight_magica13 ] { player_hknight_shot(3);};
  809. +void() player_hknight_magica13 = [ $magica13, player_hknight_magica14 ] { };
  810. +void() player_hknight_magica14 = [ $magica14, player_stand1 ] { };
  811. +
  812. +////////////////////////////////////////////
  813. +// 13 frames of magicb for player_hknight, going to player_stand1
  814. +////////////////////////////////////////////
  815. +
  816. +void() player_hknight_magicb1 = [ $magicb1, player_hknight_magicb2 ] { };
  817. +void() player_hknight_magicb2 = [ $magicb2, player_hknight_magicb3 ] { };
  818. +void() player_hknight_magicb3 = [ $magicb3, player_hknight_magicb4 ] { };
  819. +void() player_hknight_magicb4 = [ $magicb4, player_hknight_magicb5 ] { };
  820. +void() player_hknight_magicb5 = [ $magicb5, player_hknight_magicb6 ] { };
  821. +void() player_hknight_magicb6 = [ $magicb6, player_hknight_magicb7 ] { };
  822. +void() player_hknight_magicb7 = [ $magicb7, player_hknight_magicb8 ] { player_hknight_shot(2);};
  823. +void() player_hknight_magicb8 = [ $magicb8, player_hknight_magicb9 ] { player_hknight_shot(1);};
  824. +void() player_hknight_magicb9 = [ $magicb9, player_hknight_magicb10 ] { player_hknight_shot(0);};
  825. +void() player_hknight_magicb10 = [ $magicb10, player_hknight_magicb11 ] { player_hknight_shot(-1);};
  826. +void() player_hknight_magicb11 = [ $magicb11, player_hknight_magicb12 ] { player_hknight_shot(-2);};
  827. +void() player_hknight_magicb12 = [ $magicb12, player_hknight_magicb13 ] { player_hknight_shot(-3);};
  828. +void() player_hknight_magicb13 = [ $magicb13, player_stand1 ] { };
  829. +
  830. +
  831. +
  832. +void() player_hknight_attack = {
  833. +// FIXME: What about w_attack?
  834. +    self.attack_finished=time+1; // (eh, or so)
  835. +    if(self.weapon == IT_AXE) {
  836. +        // A sword attack
  837. +        sound (self, CHAN_WEAPON, "weapons/ax1.wav", 1, ATTN_NORM);
  838. +        if (random() > 0.66) player_hknight_slice1();
  839. +        else player_hknight_smash1();
  840. +    } else {
  841. +        // A magic attack
  842. +        if (random() > 0.5) player_hknight_magica1();
  843. +        else player_hknight_magicb1();
  844. +    }
  845. +};
  846. +
  847. +void() player_hknight_impulse = {
  848. +    if(self.impulse == 1) self.weapon = IT_AXE;
  849. +    else self.weapon = IT_EXTRA_WEAPON;
  850. +};
  851. +
  852. +string(entity targ, entity attacker) player_hknight_killmsg = {
  853. +    if(attacker.weapon & IT_AXE)
  854. +        return " was slashed by ";
  855. +    else
  856. +        return " was fried by ";
  857. +};
  858. +
  859. +string(entity targ, entity attacker) player_hknight_killmsg2 = {
  860. +    return ".\n";
  861. +};
  862. +
  863. +void() player_hknight_become = {
  864. +    bprint(self.netname);
  865. +    bprint(" has become a hell knight.\n");
  866. +    self._stand=player_hknight_stand;
  867. +    self._run=player_hknight_run;
  868. +    self._pain=player_hknight_pain;
  869. +    self._jump=SUB_Null; // Default player jump
  870. +    self._jump2=SUB_Null;
  871. +    self._attack=player_hknight_attack;
  872. +    self._impulse=player_hknight_impulse;
  873. +    self._can_get_p=SUB_False;
  874. +    self._killmsg=player_hknight_killmsg;
  875. +    self._killmsg2=player_hknight_killmsg2;
  876. +    setmodel(self,"progs/hknight.mdl");
  877. +    self.modelindex_morph=self.modelindex;
  878. +    self.weaponmodel="";
  879. +    self.view_ofs = '0 0 22';
  880. +    if(!deathmatch) setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  881. +    else     setsize (self, '-16 -16 -24', '16 16 40');
  882. +    self.health = self.health * 2.50 / self.health_modifier;
  883. +    self.health_modifier = 2.50;
  884. +    makevectors(self.v_angle);
  885. +    spawn_tfog(self.origin + 20 * v_forward);
  886. +    DropBackpack2();
  887. +};
  888. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/m-human.qc morph/m-human.qc
  889. --- v101qc/m-human.qc    Wed Dec 31 18:00:00 1969
  890. +++ morph/m-human.qc    Thu Aug 22 17:08:33 1996
  891. @@ -0,0 +1,24 @@
  892. +void() player_human_become = {
  893. +    bprint(self.netname);
  894. +    bprint(" has become a human.\n");
  895. +    self._stand=SUB_Null;
  896. +    self._run=SUB_Null;
  897. +    self._pain=SUB_Null;
  898. +    self._jump=SUB_Null;
  899. +    self._jump2=SUB_Null;
  900. +    self._attack=SUB_Null;
  901. +    self._impulse=SUB_Null;
  902. +    self.health = self.health * 1.0 / self.health_modifier;
  903. +    self.health_modifier = 1.0;
  904. +    self._can_get_p=SUB_True;
  905. +    self._killmsg=SUB_Null;
  906. +    self._killmsg2=SUB_Null;
  907. +    setmodel(self,"progs/player.mdl");
  908. +    self.weapon = W_BestWeapon ();
  909. +    W_SetCurrentAmmo ();
  910. +    self.modelindex_morph=self.modelindex;
  911. +    setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  912. +    self.view_ofs = '0 0 22';
  913. +    makevectors(self.v_angle);
  914. +    spawn_tfog(self.origin + 20 * v_forward);
  915. +};
  916. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/m-ogre.qc morph/m-ogre.qc
  917. --- v101qc/m-ogre.qc    Wed Dec 31 18:00:00 1969
  918. +++ morph/m-ogre.qc    Thu Aug 22 17:08:36 1996
  919. @@ -0,0 +1,235 @@
  920. +/*
  921. +==============================================================================
  922. +
  923. +OGRE
  924. +
  925. +==============================================================================
  926. +*/
  927. +
  928. +$cd /raid/quake/id1/models/ogre_c
  929. +$origin 0 0 24
  930. +$base base        
  931. +$skin base
  932. +
  933. +$frame    stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
  934. +
  935. +$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7
  936. +$frame walk8 walk9 walk10 walk11 walk12 walk13 walk14 walk15 walk16
  937. +
  938. +$frame run1 run2 run3 run4 run5 run6 run7 run8
  939. +
  940. +$frame swing1 swing2 swing3 swing4 swing5 swing6 swing7
  941. +$frame swing8 swing9 swing10 swing11 swing12 swing13 swing14
  942. +
  943. +$frame smash1 smash2 smash3 smash4 smash5 smash6 smash7
  944. +$frame smash8 smash9 smash10 smash11 smash12 smash13 smash14
  945. +
  946. +$frame shoot1 shoot2 shoot3 shoot4 shoot5 shoot6
  947. +
  948. +$frame pain1 pain2 pain3 pain4 pain5
  949. +
  950. +$frame painb1 painb2 painb3
  951. +
  952. +$frame painc1 painc2 painc3 painc4 painc5 painc6
  953. +
  954. +$frame paind1 paind2 paind3 paind4 paind5 paind6 paind7 paind8 paind9 paind10
  955. +$frame paind11 paind12 paind13 paind14 paind15 paind16
  956. +
  957. +$frame paine1 paine2 paine3 paine4 paine5 paine6 paine7 paine8 paine9 paine10
  958. +$frame paine11 paine12 paine13 paine14 paine15
  959. +
  960. +$frame death1 death2 death3 death4 death5 death6
  961. +$frame death7 death8 death9 death10 death11 death12
  962. +$frame death13 death14
  963. +
  964. +$frame bdeath1 bdeath2 bdeath3 bdeath4 bdeath5 bdeath6
  965. +$frame bdeath7 bdeath8 bdeath9 bdeath10
  966. +
  967. +$frame pull1 pull2 pull3 pull4 pull5 pull6 pull7 pull8 pull9 pull10 pull11
  968. +
  969. +void() player_ogre_stand = [ $stand1, player_stand1 ] {
  970. +    if(self.walkframe >= 9)
  971. +        self.walkframe = 0;
  972. +    self.frame = $stand1 + self.walkframe;
  973. +    self.walkframe = self.walkframe = 1;
  974. +};
  975. +
  976. +void() player_ogre_run = [ $run1, player_run ] {
  977. +    if(self.walkframe >= 8)
  978. +        self.walkframe = 0;
  979. +    self.frame = $run1 + self.walkframe;
  980. +    self.walkframe = self.walkframe + 1;
  981. +};
  982. +////////////////////////////////////////////
  983. +// 5 frames of pain for player_ogre, going to player_stand1
  984. +////////////////////////////////////////////
  985. +
  986. +void() player_ogre_pain1 = [ $pain1, player_ogre_pain2 ] { self.pain_finished = time + 3; sound(self, CHAN_VOICE, "ogre/ogpain1.wav", 1, ATTN_NORM); };
  987. +void() player_ogre_pain2 = [ $pain2, player_ogre_pain3 ] { };
  988. +void() player_ogre_pain3 = [ $pain3, player_ogre_pain4 ] { };
  989. +void() player_ogre_pain4 = [ $pain4, player_ogre_pain5 ] { };
  990. +void() player_ogre_pain5 = [ $pain5, player_stand1 ] { };
  991. +
  992. +void(float side) player_chainsaw =
  993. +{
  994. +local vector    delta;
  995. +local float     ldmg;
  996. +
  997. +    makevectors(self.v_angle);
  998. +
  999. +    traceline(self.origin, self.origin + v_forward * 100, FALSE, self);
  1000. +    if(trace_fraction == 1.0)
  1001. +        return;
  1002. +    
  1003. +    if(!trace_ent.takedamage) {
  1004. +        // Clank!
  1005. +        sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
  1006. +        return;
  1007. +    }
  1008. +        
  1009. +    ldmg = (random() + random() + random()) * 4;
  1010. +    T_Damage (trace_ent, self, self, ldmg);
  1011. +    
  1012. +    if (side)
  1013. +    {
  1014. +        makevectors (self.angles);
  1015. +        if (side == 1)
  1016. +            SpawnMeatSpray (self.origin + v_forward*16, crandom() * 100 * v_right);
  1017. +        else
  1018. +            SpawnMeatSpray (self.origin + v_forward*16, side * v_right);
  1019. +    }
  1020. +};
  1021. +
  1022. +void() player_ogre_swing1    =[    $swing1,        player_ogre_swing2    ] {
  1023. +sound (self, CHAN_WEAPON, "ogre/ogsawatk.wav", 1, ATTN_NORM);
  1024. +};
  1025. +void() player_ogre_swing2    =[    $swing2,        player_ogre_swing3    ] {};
  1026. +void() player_ogre_swing3    =[    $swing3,        player_ogre_swing4    ] {};
  1027. +void() player_ogre_swing4    =[    $swing4,        player_ogre_swing5    ] {};
  1028. +void() player_ogre_swing5    =[    $swing5,        player_ogre_swing6    ] { player_chainsaw(0);self.angles_y = self.angles_y + random()*25;};
  1029. +void() player_ogre_swing6    =[    $swing6,        player_ogre_swing7    ] {player_chainsaw(200);self.angles_y = self.angles_y + random()* 25;};
  1030. +void() player_ogre_swing7    =[    $swing7,        player_ogre_swing8    ] {player_chainsaw(0);self.angles_y = self.angles_y + random()* 25;};
  1031. +void() player_ogre_swing8    =[    $swing8,        player_ogre_swing9    ] {player_chainsaw(0);self.angles_y = self.angles_y + random()* 25;};
  1032. +void() player_ogre_swing9    =[    $swing9,        player_ogre_swing10 ] {player_chainsaw(0);self.angles_y = self.angles_y + random()* 25;};
  1033. +void() player_ogre_swing10    =[    $swing10,        player_ogre_swing11 ] {player_chainsaw(-200);self.angles_y = self.angles_y + random()* 25;};
  1034. +void() player_ogre_swing11    =[    $swing11,        player_ogre_swing12 ] {player_chainsaw(0);self.angles_y = self.angles_y + random()* 25;};
  1035. +void() player_ogre_swing12    =[    $swing12,        player_ogre_swing13 ] {};
  1036. +void() player_ogre_swing13    =[    $swing13,        player_ogre_swing14 ] {};
  1037. +void() player_ogre_swing14    =[    $swing14,        player_stand1    ] {};
  1038. +
  1039. +void() player_ogre_smash1    =[    $smash1,            player_stand1 ] {
  1040. +sound (self, CHAN_WEAPON, "ogre/ogsawatk.wav", 1, ATTN_NORM);
  1041. +};
  1042. +void() player_ogre_smash2    =[    $smash2,        player_ogre_smash3    ] {};
  1043. +void() player_ogre_smash3    =[    $smash3,        player_ogre_smash4    ] {};
  1044. +void() player_ogre_smash4    =[    $smash4,        player_ogre_smash5    ] {};
  1045. +void() player_ogre_smash5    =[    $smash5,        player_ogre_smash6    ] {};
  1046. +void() player_ogre_smash6    =[    $smash6,        player_ogre_smash7    ] { player_chainsaw(0);};
  1047. +void() player_ogre_smash7    =[    $smash7,        player_ogre_smash8    ] { player_chainsaw(0);};
  1048. +void() player_ogre_smash8    =[    $smash8,        player_ogre_smash9    ] { player_chainsaw(0);};
  1049. +void() player_ogre_smash9    =[    $smash9,        player_ogre_smash10 ] { player_chainsaw(0);};
  1050. +void() player_ogre_smash10    =[    $smash10,        player_ogre_smash11 ] {player_chainsaw(1);};
  1051. +void() player_ogre_smash11    =[    $smash11,        player_ogre_smash12 ] { player_chainsaw(0);};
  1052. +
  1053. +void() player_ogre_smash12    =[    $smash12,        player_ogre_smash13 ] {};
  1054. +void() player_ogre_smash13    =[    $smash13,        player_ogre_smash14 ] {};
  1055. +void() player_ogre_smash14    =[    $smash14,        player_stand1 ] {};
  1056. +
  1057. +////////////////////////////////////////////
  1058. +// 6 frames of shoot for player_ogre, going to player_stand1
  1059. +////////////////////////////////////////////
  1060. +
  1061. +void() player_ogre_shoot1 = [ $shoot1, player_ogre_shoot2 ] { };
  1062. +void() player_ogre_shoot2 = [ $shoot2, player_ogre_shoot3 ] { };
  1063. +void() player_ogre_shoot3 = [ $shoot3, player_ogre_shoot4 ] { W_FireGrenade();
  1064. +        if(self.ammo_rockets==0) { // When we're out, we fire reeeealllly slow
  1065. +            self.attack_finished = time + 3.0;
  1066. +            self.ammo_rockets=self.currentammo=1;
  1067. +        }
  1068. +};
  1069. +void() player_ogre_shoot4 = [ $shoot4, player_ogre_shoot5 ] { };
  1070. +void() player_ogre_shoot5 = [ $shoot5, player_ogre_shoot6 ] { };
  1071. +void() player_ogre_shoot6 = [ $shoot6, player_stand1 ] { };
  1072. +
  1073. +void() player_ogre_attack = {
  1074. +    if(self.weapon == IT_AXE) {
  1075. +//        if(random()>0.66) {
  1076. +//            self.attack_finished = time + 1.2;
  1077. +//            player_ogre_smash1();
  1078. +//        } else {
  1079. +        self.attack_finished = time + 1.0;
  1080. +        player_ogre_swing1();
  1081. +//        }
  1082. +    } else {
  1083. +        player_ogre_shoot1();
  1084. +        self.attack_finished = time + 0.8;
  1085. +        if(self.ammo_rockets==0) {
  1086. +            self.attack_finished = time + 3.0;
  1087. +            self.ammo_rockets=self.currentammo=1;
  1088. +        }
  1089. +    }
  1090. +};
  1091. +
  1092. +string(entity targ, entity attacker) player_ogre_killmsg = {
  1093. +    if(self.weapon == IT_AXE) return " was sawed to death by ";
  1094. +    else return " eats ";
  1095. +};
  1096. +    
  1097. +string(entity targ, entity attacker) player_ogre_killmsg2 = {
  1098. +    if(self.weapon == IT_AXE) return "\n";
  1099. +    else return "'s pineapple\n";
  1100. +};
  1101. +
  1102. +void() player_ogre_impulse = {
  1103. +    if(self.impulse == 1)
  1104. +        self.weapon = IT_AXE;
  1105. +    else    self.weapon = IT_GRENADE_LAUNCHER;
  1106. +};
  1107. +
  1108. +void(entity s, entity o) player_ogre_can_get_p = {
  1109. +    if(o.touch == ammo_touch && o.weapon==3) {
  1110. +        s.currentammo=s.currentammo+o.aflag;
  1111. +        if(s.currentammo>100) s.currentammo=100;
  1112. +        return 2;
  1113. +    }    
  1114. +    else if(o.touch == BackpackTouch && o.ammo_rockets) {
  1115. +        s.currentammo=s.currentammo+o.ammo_rockets;
  1116. +        if(s.currentammo>100) s.currentammo=100;
  1117. +        o.ammo_shells=o.ammo_nails=o.ammo_cells=0; // He throws 'em away
  1118. +        return 2;
  1119. +    }
  1120. +    else return 0;
  1121. +};
  1122. +
  1123. +void() player_ogre_become = {
  1124. +    local float temprockets;
  1125. +    bprint(self.netname);
  1126. +    bprint(" has become an ogre.\n");
  1127. +    self._stand=player_ogre_stand;
  1128. +    self._run=player_ogre_run;    
  1129. +    self._pain=player_ogre_pain1;
  1130. +    self._jump = SUB_Null;
  1131. +    self._jump2 = SUB_Null;
  1132. +    self._attack=player_ogre_attack;
  1133. +    self._impulse=player_ogre_impulse;
  1134. +    self._can_get_p=player_ogre_can_get_p;
  1135. +    self._killmsg=player_ogre_killmsg;
  1136. +    self._killmsg2=player_ogre_killmsg2;
  1137. +    setmodel(self,"progs/ogre.mdl");
  1138. +    self.modelindex_morph=self.modelindex;
  1139. +    self.weaponmodel="";
  1140. +    self.view_ofs = '0 0 32';
  1141. +    if(!deathmatch) setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  1142. +    else     setsize (self, '-16 -16 -24', '16 16 40');
  1143. +    self.health = self.health * 2.75 / self.health_modifier;
  1144. +    self.health_modifier = 2.75;
  1145. +    makevectors(self.v_angle);
  1146. +    spawn_tfog(self.origin + 20 * v_forward);
  1147. +    temprockets=self.ammo_rockets;
  1148. +    self.ammo_rockets=0;
  1149. +    DropBackpack2();
  1150. +    self.ammo_rockets=temprockets;
  1151. +    self.currentammo=0;
  1152. +    self.weapon=IT_AXE;
  1153. +};
  1154. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/m-shalra.qc morph/m-shalra.qc
  1155. --- v101qc/m-shalra.qc    Wed Dec 31 18:00:00 1969
  1156. +++ morph/m-shalra.qc    Thu Aug 22 17:12:35 1996
  1157. @@ -0,0 +1,166 @@
  1158. +/*
  1159. +==============================================================================
  1160. +
  1161. +SHAL-RATH
  1162. +
  1163. +==============================================================================
  1164. +*/
  1165. +$cd /raid/quake/id1/models/shalrath
  1166. +$origin 0 0 24
  1167. +$base base
  1168. +$skin skin
  1169. +$scale 0.7
  1170. +
  1171. +$frame attack1 attack2 attack3 attack4 attack5 attack6 attack7 attack8
  1172. +$frame attack9 attack10 attack11
  1173. +
  1174. +$frame pain1 pain2 pain3 pain4 pain5 
  1175. +
  1176. +$frame death1 death2 death3 death4 death5 death6 death7
  1177. +
  1178. +$frame    walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8 walk9 walk10
  1179. +$frame    walk11 walk12
  1180. +
  1181. +void() player_shalrath_stand = [ $walk1, player_stand1 ] { };
  1182. +void() player_shalrath_run = {
  1183. +    if(self.walkframe >= 12)
  1184. +        self.walkframe = 0;
  1185. +    self.frame = $walk1 + self.walkframe;
  1186. +    self.walkframe = self.walkframe + 1;
  1187. +};
  1188. +
  1189. +void() player_shalrath_pain1 = [ $pain1, player_shalrath_pain2 ] {sound (self, CHAN_VOICE, "shalrath/pain.wav", 1, ATTN_NORM);};
  1190. +void() player_shalrath_pain2 = [ $pain1, player_shalrath_pain3 ] {};
  1191. +void() player_shalrath_pain3 = [ $pain1, player_shalrath_pain4 ] {};
  1192. +void() player_shalrath_pain4 = [ $pain1, player_shalrath_pain5 ] {};
  1193. +void() player_shalrath_pain5 = [ $pain1, player_stand1 ] {};
  1194. +
  1195. +// void() player_shalrath_jump = { self.velocity_z=10; };
  1196. +
  1197. +void() player_ShalMissileTouch =
  1198. +{
  1199. +    if (other == self.owner)
  1200. +        return;        // don't explode on owner
  1201. +
  1202. +    if (other.classname == "monster_zombie")
  1203. +        T_Damage (other, self, self, 110);    
  1204. +    T_RadiusDamage (self, self.owner, 80, world);
  1205. +    sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
  1206. +
  1207. +    WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  1208. +    WriteByte (MSG_BROADCAST, TE_EXPLOSION);
  1209. +    WriteCoord (MSG_BROADCAST, self.origin_x);
  1210. +    WriteCoord (MSG_BROADCAST, self.origin_y);
  1211. +    WriteCoord (MSG_BROADCAST, self.origin_z);
  1212. +
  1213. +    self.velocity = '0 0 0';
  1214. +    self.touch = SUB_Null;
  1215. +    setmodel (self, "progs/s_explod.spr");
  1216. +    self.solid = SOLID_NOT;
  1217. +    s_explode1 ();
  1218. +};
  1219. +/*
  1220. +================
  1221. +player_ShalMissile
  1222. +================
  1223. +*/
  1224. +void() ShalHome;
  1225. +void() player_ShalMissile =
  1226. +{
  1227. +    local    entity     missile;
  1228. +
  1229. +    makevectors(self.v_angle);
  1230. +
  1231. +    self.effects = self.effects | EF_MUZZLEFLASH;
  1232. +    sound (self, CHAN_WEAPON, "shalrath/attack2.wav", 1, ATTN_NORM);
  1233. +
  1234. +    missile = spawn ();
  1235. +    missile.owner = self;
  1236. +
  1237. +    missile.solid = SOLID_BBOX;
  1238. +    missile.movetype = MOVETYPE_FLYMISSILE;
  1239. +    setmodel (missile, "progs/v_spike.mdl");
  1240. +
  1241. +    setsize (missile, '0 0 0', '0 0 0');        
  1242. +
  1243. +    makevectors (self.v_angle);
  1244. +    if(self.enemy.classname == "worldspawn") {
  1245. +        traceline (self.origin, self.origin + v_forward * 2048, FALSE, self);
  1246. +        self.enemy=trace_ent;
  1247. +    }
  1248. +    missile.velocity = v_forward;
  1249. +    if(self.enemy.classname == "worldspawn") {
  1250. +        missile.enemy = world;
  1251. +        //missile.velocity = v_forward;
  1252. +    } else {
  1253. +        missile.enemy = self.enemy;
  1254. +        //missile.velocity = normalize(self.enemy.origin - self.origin);
  1255. +    }
  1256. +
  1257. +    missile.velocity = missile.velocity * 400;
  1258. +    missile.angles = vectoangles(missile.velocity);
  1259. +
  1260. +    missile.origin = self.origin + '0 0 10';
  1261. +    missile.avelocity = '300 300 300';
  1262. +    missile.nextthink = 0.4 + time;
  1263. +    missile.think = ShalHome;
  1264. +    missile.touch = player_ShalMissileTouch;
  1265. +};
  1266. +
  1267. +void() player_shalrath_attack1 = [ $attack1, player_shalrath_attack2 ] {
  1268. +    local vector v;
  1269. +    sound (self, CHAN_VOICE, "shalrath/attack.wav", 1, ATTN_NORM);
  1270. +    self.attack_finished=time+1;
  1271. +    makevectors(self.v_angle);
  1272. +    v=aim(self, 2048);
  1273. +    traceline(self.origin+ self.view_ofs, self.origin+v * 2048 + self.view_ofs, FALSE, self);
  1274. +    if((trace_ent.classname != "worldspawn") && (trace_ent.takedamage & DAMAGE_AIM)) {
  1275. +        self.enemy = trace_ent;
  1276. +    } else if(self.enemy) {
  1277. +        if(!visible(self.enemy)) self.enemy=world;
  1278. +        if(!infront(self.enemy)) self.enemy=world;
  1279. +        if(self.enemy.health <=0) self.enemy=world;
  1280. +        if(self.enemy.takedamage != DAMAGE_AIM) self.enemy=world;
  1281. +    }
  1282. +};
  1283. +void() player_shalrath_attack2 = [ $attack2, player_shalrath_attack3 ] {};
  1284. +void() player_shalrath_attack3 = [ $attack4, player_shalrath_attack4 ] {};
  1285. +void() player_shalrath_attack4 = [ $attack8, player_shalrath_attack5 ] {};
  1286. +void() player_shalrath_attack5 = [ $attack10, player_stand1 ] {player_ShalMissile(); };
  1287. +    
  1288. +
  1289. +string() player_shalrath_killmsg = {
  1290. +    return " was exploded by ";
  1291. +};
  1292. +
  1293. +string() player_shalrath_killmsg2 = {
  1294. +    return ".\n";
  1295. +};
  1296. +
  1297. +void() player_shalrath_become = {
  1298. +    bprint(self.netname);
  1299. +    bprint(" has become a vore.\n");
  1300. +    self._stand=player_shalrath_stand;
  1301. +    self._run=player_shalrath_run;
  1302. +    self._pain=player_shalrath_pain1;
  1303. +    self._jump=SUB_Null;
  1304. +    self._jump2=SUB_Null;
  1305. +    self._attack=player_shalrath_attack1;
  1306. +    self._impulse=SUB_Nop;
  1307. +    self._can_get_p=SUB_False;
  1308. +    self._killmsg=player_shalrath_killmsg;
  1309. +    self._killmsg2=player_shalrath_killmsg2;
  1310. +    setmodel(self,"progs/shalrath.mdl");
  1311. +    self.modelindex_morph=self.modelindex;
  1312. +    self.weaponmodel="";
  1313. +    self.view_ofs = '0 0 22';
  1314. +    //setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
  1315. +    if(!deathmatch) setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  1316. +    else     setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
  1317. +    
  1318. +    self.health = self.health * 3.0 / self.health_modifier;
  1319. +    self.health_modifier = 3.0;
  1320. +    makevectors(self.v_angle);
  1321. +    spawn_tfog(self.origin + 20 * v_forward);
  1322. +    DropBackpack2();
  1323. +};
  1324. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/m-shambl.qc morph/m-shambl.qc
  1325. --- v101qc/m-shambl.qc    Wed Dec 31 18:00:00 1969
  1326. +++ morph/m-shambl.qc    Thu Aug 22 17:08:42 1996
  1327. @@ -0,0 +1,278 @@
  1328. +/*
  1329. +==============================================================================
  1330. +
  1331. +SHAMBLER
  1332. +
  1333. +==============================================================================
  1334. +*/
  1335. +
  1336. +$cd /raid/quake/id1/models/shams
  1337. +$origin 0 0 24
  1338. +$base base        
  1339. +$skin base
  1340. +
  1341. +$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
  1342. +$frame stand10 stand11 stand12 stand13 stand14 stand15 stand16 stand17
  1343. +
  1344. +$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 
  1345. +$frame walk8 walk9 walk10 walk11 walk12
  1346. +
  1347. +$frame    run1 run2 run3 run4 run5 run6
  1348. +
  1349. +$frame smash1 smash2 smash3 smash4 smash5 smash6 smash7 
  1350. +$frame smash8 smash9 smash10 smash11 smash12
  1351. +
  1352. +$frame swingr1 swingr2 swingr3 swingr4 swingr5 
  1353. +$frame swingr6 swingr7 swingr8 swingr9
  1354. +
  1355. +$frame swingl1 swingl2 swingl3 swingl4 swingl5 
  1356. +$frame swingl6 swingl7 swingl8 swingl9
  1357. +
  1358. +$frame magic1 magic2 magic3 magic4 magic5 
  1359. +$frame magic6 magic7 magic8 magic9 magic10 magic11 magic12
  1360. +
  1361. +$frame pain1 pain2 pain3 pain4 pain5 pain6
  1362. +
  1363. +$frame death1 death2 death3 death4 death5 death6 
  1364. +$frame death7 death8 death9 death10 death11
  1365. +
  1366. +void() player_shambler_stand = [ $stand1, player_stand1 ] {
  1367. +    if(self.walkframe >=  17)
  1368. +        self.walkframe = 0;
  1369. +    self.frame = $stand1 + self.walkframe;
  1370. +    self.walkframe = self.walkframe + 1;
  1371. +};
  1372. +     
  1373. +void() player_shambler_run = [ $run1, player_run ] {
  1374. +    if(self.walkframe >= 6) 
  1375. +        self.walkframe = 0;
  1376. +    self.frame = $run1 + self.walkframe;
  1377. +    self.walkframe = self.walkframe + 1;
  1378. +};
  1379. +
  1380. +////////////////////////////////////////////
  1381. +// 5 frames of pain for player_shambler, going to player_stand1
  1382. +////////////////////////////////////////////
  1383. +
  1384. +void() player_shambler_pain1 = [ $pain1, player_shambler_pain2 ] { };
  1385. +void() player_shambler_pain2 = [ $pain2, player_shambler_pain3 ] { };
  1386. +void() player_shambler_pain3 = [ $pain3, player_shambler_pain4 ] { };
  1387. +void() player_shambler_pain4 = [ $pain4, player_shambler_pain5 ] { };
  1388. +void() player_shambler_pain5 = [ $pain5, player_stand1 ] { };
  1389. +
  1390. +void(entity attacker, float damage)    player_shambler_pain =
  1391. +{
  1392. +    sound (self, CHAN_VOICE, "shambler/shurt2.wav", 1, ATTN_NORM);
  1393. +
  1394. +    if (self.health <= 0)
  1395. +        return;        // allready dying, don't go into pain frame
  1396. +
  1397. +    if (random()*400 > damage)
  1398. +        return;        // didn't flinch
  1399. +
  1400. +    if (self.pain_finished > time)
  1401. +        return;
  1402. +    self.pain_finished = time + 2;
  1403. +        
  1404. +    player_shambler_pain1 ();
  1405. +};
  1406. +
  1407. +void() player_CastLightning =
  1408. +{
  1409. +    local    vector    org, dir;
  1410. +    
  1411. +    self.effects = self.effects | EF_MUZZLEFLASH;
  1412. +
  1413. +    if(self.waterlevel > 1) {
  1414. +        T_RadiusDamage(self, self, self.health, world); /* We all die! */
  1415. +        return;
  1416. +    }
  1417. +
  1418. +    org = self.origin + '0 0 40';
  1419. +
  1420. +    makevectors (self.v_angle);
  1421. +    dir = normalize (v_forward);
  1422. +
  1423. +    traceline (org, self.origin + dir*4096, TRUE, self);
  1424. +
  1425. +    WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  1426. +    WriteByte (MSG_BROADCAST, TE_LIGHTNING1);
  1427. +    WriteEntity (MSG_BROADCAST, self);
  1428. +    WriteCoord (MSG_BROADCAST, org_x);
  1429. +    WriteCoord (MSG_BROADCAST, org_y);
  1430. +    WriteCoord (MSG_BROADCAST, org_z);
  1431. +    WriteCoord (MSG_BROADCAST, trace_endpos_x);
  1432. +    WriteCoord (MSG_BROADCAST, trace_endpos_y);
  1433. +    WriteCoord (MSG_BROADCAST, trace_endpos_z);
  1434. +
  1435. +    LightningDamage (org, trace_endpos, self, 10);
  1436. +};
  1437. +
  1438. +void() player_shambler_magic1     =[      $magic1,       player_shambler_magic2    ] {
  1439. +    sound (self, CHAN_WEAPON, "shambler/sattck1.wav", 1, ATTN_NORM);
  1440. +    self.attack_finished=time+1.1;
  1441. +};
  1442. +void() player_shambler_magic2     =[      $magic2,       player_shambler_magic3    ] {};
  1443. +void() player_shambler_magic3     =[      $magic3,       player_shambler_magic4    ] {
  1444. +    local entity o;
  1445. +    self.effects = self.effects | EF_MUZZLEFLASH;
  1446. +    self.owner = spawn();
  1447. +    o = self.owner;
  1448. +    setmodel (o, "progs/s_light.mdl");
  1449. +    setorigin (o, self.origin);
  1450. +    o.angles = self.angles;
  1451. +    o.nextthink = time + 0.7;
  1452. +    o.think = SUB_Remove;
  1453. +};
  1454. +void() player_shambler_magic4     =[      $magic4,       player_shambler_magic5    ]
  1455. +{ self.effects = self.effects | EF_MUZZLEFLASH; self.owner.frame = 1; };
  1456. +void() player_shambler_magic5     =[      $magic5,       player_shambler_magic6    ]
  1457. +{ self.effects = self.effects | EF_MUZZLEFLASH; self.owner.frame = 2; };
  1458. +void() player_shambler_magic6     =[      $magic6,       player_shambler_magic9    ] {
  1459. +    remove (self.owner);
  1460. +    player_CastLightning();
  1461. +    sound (self, CHAN_WEAPON, "shambler/sboom.wav", 1, ATTN_NORM);
  1462. +};
  1463. +void() player_shambler_magic9     =[      $magic9,       player_shambler_magic10   ]
  1464. +{player_CastLightning();};
  1465. +void() player_shambler_magic10    =[      $magic10,      player_shambler_magic11   ]
  1466. +{player_CastLightning();};
  1467. +void() player_shambler_magic11    =[      $magic11,      player_shambler_magic12   ]
  1468. +{player_CastLightning();};
  1469. +void() player_shambler_magic12    =[      $magic12,      player_stand1       ] {};
  1470. +
  1471. +void() player_shambler_swingr1;
  1472. +
  1473. +void(float side) player_ShamClaw =
  1474. +{
  1475. +
  1476. +    local    vector    source;
  1477. +    local    vector    org;
  1478. +    local float     ldmg;
  1479. +
  1480. +    sound (self, CHAN_VOICE, "shambler/smack.wav", 1, ATTN_NORM);
  1481. +
  1482. +    source = self.origin + '0 0 16';
  1483. +    traceline (source, source + v_forward*128, FALSE, self);
  1484. +    if (trace_fraction == 1.0)
  1485. +        return;
  1486. +    
  1487. +    org = trace_endpos - v_forward*4;
  1488. +
  1489. +    if (trace_ent.takedamage)
  1490. +    {
  1491. +        trace_ent.axhitme = 1;
  1492. +        SpawnBlood (org, '0 0 0', 20);
  1493. +        if (side)
  1494. +        {
  1495. +            makevectors (self.angles);
  1496. +            SpawnMeatSpray (self.origin + v_forward*16, side * v_right);
  1497. +        }
  1498. +        ldmg = (random() + random() + random()) * 20;
  1499. +        T_Damage (trace_ent, self, self, ldmg);
  1500. +    }
  1501. +    else
  1502. +    {    // hit wall
  1503. +        sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
  1504. +        WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  1505. +        WriteByte (MSG_BROADCAST, TE_GUNSHOT);
  1506. +        WriteCoord (MSG_BROADCAST, org_x);
  1507. +        WriteCoord (MSG_BROADCAST, org_y);
  1508. +        WriteCoord (MSG_BROADCAST, org_z);
  1509. +    }
  1510. +
  1511. +};
  1512. +
  1513. +void() player_shambler_smash1     =[      $smash1,       player_shambler_smash2    ] {
  1514. +sound (self, CHAN_VOICE, "shambler/melee1.wav", 1, ATTN_NORM);
  1515. +};
  1516. +void() player_shambler_smash2     =[      $smash2,       player_shambler_smash3    ] {};
  1517. +void() player_shambler_smash3     =[      $smash3,       player_shambler_smash4    ] {};
  1518. +void() player_shambler_smash4     =[      $smash4,       player_shambler_smash5    ] {};
  1519. +void() player_shambler_smash5     =[      $smash5,       player_shambler_smash6    ] {};
  1520. +void() player_shambler_smash6     =[      $smash6,       player_shambler_smash7    ] {};
  1521. +void() player_shambler_smash7     =[      $smash7,       player_shambler_smash8    ] {};
  1522. +void() player_shambler_smash8     =[      $smash8,       player_shambler_smash9    ] {};
  1523. +void() player_shambler_smash9     =[      $smash9,       player_shambler_smash10   ] {player_ShamClaw(150); };
  1524. +void() player_shambler_smash10    =[      $smash10,      player_shambler_smash11   ] {player_ShamClaw(150);};
  1525. +void() player_shambler_smash11    =[      $smash11,      player_shambler_smash12   ] {player_ShamClaw(150);};
  1526. +void() player_shambler_smash12    =[      $smash12,      player_run       ] {};
  1527. +
  1528. +void() player_shambler_swingl1    =[      $swingl1,      player_shambler_swingl2   ] {
  1529. +sound (self, CHAN_VOICE, "shambler/melee2.wav", 1, ATTN_NORM);
  1530. +};
  1531. +void() player_shambler_swingl2 =[      $swingl2,      player_shambler_swingl3   ] {};
  1532. +void() player_shambler_swingl3 =[      $swingl3,      player_shambler_swingl4   ] {};
  1533. +void() player_shambler_swingl4 =[      $swingl4,      player_shambler_swingl5   ] {};
  1534. +void() player_shambler_swingl5 =[      $swingl5,      player_shambler_swingl6   ] {};
  1535. +void() player_shambler_swingl6 =[      $swingl6,      player_shambler_swingl7   ] {};
  1536. +void() player_shambler_swingl7 =[      $swingl7,      player_shambler_swingl8   ] { player_ShamClaw(250);};
  1537. +void() player_shambler_swingl8 =[      $swingl8,      player_shambler_swingl9   ] {};
  1538. +void() player_shambler_swingl9 =[      $swingl9,      player_run  ] {};
  1539. +
  1540. +void() player_shambler_swingr1    =[      $swingr1,      player_shambler_swingr2   ] {
  1541. +sound (self, CHAN_VOICE, "shambler/melee1.wav", 1, ATTN_NORM);
  1542. +};
  1543. +void() player_shambler_swingr2    =[      $swingr2,      player_shambler_swingr3   ] {};
  1544. +void() player_shambler_swingr3 =[      $swingr3,      player_shambler_swingr4   ] {};
  1545. +void() player_shambler_swingr4 =[      $swingr4,      player_shambler_swingr5   ] {};
  1546. +void() player_shambler_swingr5 =[      $swingr5,      player_shambler_swingr6   ] {};
  1547. +void() player_shambler_swingr6 =[      $swingr6,      player_shambler_swingr7   ] {};
  1548. +void() player_shambler_swingr7 =[      $swingr7,      player_shambler_swingr8   ] { player_ShamClaw(-250);};
  1549. +void() player_shambler_swingr8 =[      $swingr8,      player_shambler_swingr9   ] {};
  1550. +void() player_shambler_swingr9 =[      $swingr9,      player_run  ] { };
  1551. +
  1552. +void() player_shambler_attack = {
  1553. +    if(self.weapon == IT_AXE) {
  1554. +        if(random()>0.9) {
  1555. +            self.attack_finished = time + 1.1;
  1556. +            player_shambler_smash1();
  1557. +        } else if(random()>0.5) {
  1558. +            self.attack_finished = time + 0.8;
  1559. +            player_shambler_swingl1();
  1560. +        } else {
  1561. +            self.attack_finished = time + 0.8;
  1562. +            player_shambler_swingr1();
  1563. +        }
  1564. +    } else {
  1565. +        player_shambler_magic1();
  1566. +    }
  1567. +};
  1568. +
  1569. +void() player_shambler_impulse = {
  1570. +    if(self.impulse == 1) self.weapon = IT_AXE;
  1571. +    else self.weapon = IT_EXTRA_WEAPON;
  1572. +};
  1573. +
  1574. +string(entity targ, entity attacker) player_shambler_killmsg = {
  1575. +    if(attacker.weapon == IT_AXE) return " was smashed by ";
  1576. +    else return " was zapped by ";
  1577. +};
  1578. +
  1579. +string() player_shambler_killmsg2 = { return "\n"; };
  1580. +
  1581. +void() player_shambler_become = {
  1582. +    bprint(self.netname);
  1583. +    bprint(" has become a shambler.\n");
  1584. +    self._stand=player_shambler_stand;
  1585. +    self._run=player_shambler_run;
  1586. +    self._pain=player_shambler_pain1;
  1587. +    self._jump=SUB_Null;
  1588. +    self._jump2=SUB_Null;
  1589. +    self._attack=player_shambler_attack;
  1590. +    self._impulse=player_shambler_impulse;
  1591. +    self._can_get_p=SUB_False;
  1592. +    self._killmsg=player_shambler_killmsg;
  1593. +    self._killmsg2=player_shambler_killmsg2;
  1594. +    setmodel(self,"progs/shambler.mdl");
  1595. +    self.modelindex_morph=self.modelindex;
  1596. +    self.weaponmodel = "";
  1597. +    if(!deathmatch) setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  1598. +    else     setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
  1599. +    self.view_ofs = '0 0 32';
  1600. +    self.health = self.health * 4.0 / self.health_modifier;
  1601. +    self.health_modifier = 4.0;
  1602. +    makevectors(self.v_angle);
  1603. +    spawn_tfog(self.origin + 20 * v_forward);
  1604. +    DropBackpack2();
  1605. +};
  1606. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/m-template.qc morph/m-template.qc
  1607. --- v101qc/m-template.qc    Wed Dec 31 18:00:00 1969
  1608. +++ morph/m-template.qc    Thu Aug 22 17:08:45 1996
  1609. @@ -0,0 +1,81 @@
  1610. +/// This is a template for adding a new morph.
  1611. +///
  1612. +/// Complete the fields you want to change from the base player
  1613. +///
  1614. +/// Add appropriate pre-caching for any sounds/models you use in this morph
  1615. +///
  1616. +/// Then add some way (an item, impulse, or anything else) to call
  1617. +/// player_XXX_become
  1618. +///
  1619. +/// The various fields you can set are:
  1620. +/// Functions:
  1621. +///
  1622. +/// _stand:  We want to show the standing animation
  1623. +/// _run:    We want to show the running/moving animation
  1624. +///          (You could check if the vlen(self.velocity) is large or small,
  1625. +///           and show either a running animation or a walking animation,
  1626. +///           since both are present in many monsters)
  1627. +/// _pain:   We just got hurt.  Maybe show a pain animation, make a sound, ...
  1628. +/// _jump, _jump2:   Player pressed the jump button.  Checks (in water, on ground)
  1629. +///          are _not_ made before _jump is called, but are made before _jump2 is
  1630. +///          called.  _jump2 is not called if _jump is not SUB_Null.
  1631. +/// _attack: time > self.attack_finished and we are pressing fire
  1632. +///          show attack animation, fire projectiles, set self.attack_finished
  1633. +///          Maybe check self.weapon, which can be set from _impulse
  1634. +/// _impulse: An impulse command from 1..9 was pressed.  Switch  weapon or do
  1635. +///          whatever else is appropriate 
  1636. +/// _can_get_p: Return true if player can get the item, or false if not.
  1637. +///          Note that 'self' is _not_ the player in _can_get_p.
  1638. +///          SUB_True and SUB_False can be used here.
  1639. +///          Currently, morphed players can _always_ get health
  1640. +///          Return 0 for 'not get', return 1 for 'can get'.
  1641. +///          In the case of ammo, return '2' for 'get, but don't update weapon'
  1642. +///          (I should add SUB_get_powerups/SUB_get_ammo, ...
  1643. +///           Or maybe make a bitfield, FL_GET_AMMO, FL_GET_WEAPON, ... ?)
  1644. +/// _killmsg, _killmsg2: Return the message that should be printed,
  1645. +///          similarly to the code in client.qc.  Again, self is not player
  1646. +///
  1647. +/// SUB_Null means to use the default player action,
  1648. +/// SUB_Nop means that the action does nothing (such as jump for the zombie)
  1649. +///
  1650. +///
  1651. +/// Variables:
  1652. +/// modelindex_morph: setmodel to the new model for player, then
  1653. +///          self.modelindex_morph=self.modelindex
  1654. +/// weaponmode, view_ofs: regular meaning
  1655. +/// health_modifier: the amount that health should be divided by when
  1656. +///          changing to another morph.  Generally, you multiply by this
  1657. +///          same number when becoming that morph
  1658. +///
  1659. +/// Call DropBackpack2() if it is inappropriate for the player to carry
  1660. +/// ammo in his new morph
  1661. +///
  1662. +/// If it's necessary to add a new behaviours, make sure you amend 
  1663. +/// the other player_*_become() to set it back the way it was
  1664. +
  1665. +void() player_template_become = {
  1666. +    bprint(self.netname);
  1667. +    bprint(" has become a template.\n");
  1668. +
  1669. +    self._stand=player_template_stand;
  1670. +    self._run=player_template_run;    
  1671. +    self._pain=player_template_pain;
  1672. +    self._jump=player_template_jump;
  1673. +    self._jump2=player_template_jump2;
  1674. +    self._attack=player_template_attack;
  1675. +    self._impulse=player_template_impulse;
  1676. +    self._can_get_p=player_template_can_get_p;
  1677. +    self._killmsg=player_template_killmsg;
  1678. +    self._killmsg2=player_template_killmsg2;
  1679. +    setmodel(self,"progs/template.mdl");
  1680. +    self.modelindex_morph=self.modelindex;
  1681. +    self.weaponmodel="";
  1682. +    self.view_ofs = '0 0 22';
  1683. +    if(!deathmatch) setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  1684. +    else     setsize (self, '-16 -16 -24', '16 16 40');
  1685. +    self.health = self.health * 0.75 / self.health_modifier;
  1686. +    self.health_modifier = 0.75;
  1687. +    makevectors(self.v_angle);
  1688. +    spawn_tfog(self.origin + 20 * v_forward);
  1689. +    DropBackpack2();
  1690. +};
  1691. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/m-wizard.qc morph/m-wizard.qc
  1692. --- v101qc/m-wizard.qc    Wed Dec 31 18:00:00 1969
  1693. +++ morph/m-wizard.qc    Thu Aug 22 17:09:08 1996
  1694. @@ -0,0 +1,151 @@
  1695. +
  1696. +/*
  1697. +==============================================================================
  1698. +
  1699. +WIZARD
  1700. +
  1701. +==============================================================================
  1702. +*/
  1703. +
  1704. +$cd /raid/quake/id1/models/a_wizard
  1705. +$origin 0 0 24
  1706. +$base wizbase    
  1707. +$skin wizbase
  1708. +
  1709. +$frame hover1 hover2 hover3 hover4 hover5 hover6 hover7 hover8
  1710. +$frame hover9 hover10 hover11 hover12 hover13 hover14 hover15
  1711. +
  1712. +$frame fly1 fly2 fly3 fly4 fly5 fly6 fly7 fly8 fly9 fly10
  1713. +$frame fly11 fly12 fly13 fly14
  1714. +
  1715. +$frame attack1 attack2 attack3 attack4 attack5 attack6 attack7
  1716. +$frame attack8 attack9 attack10 attack11 attack12 attack13
  1717. +
  1718. +$frame pain1 pain2 pain3 pain4
  1719. +
  1720. +$frame death1 death2 death3 death4 death5 death6 death7 death8
  1721. +
  1722. +void() player_wizard_stand = [ $hover1, player_stand1 ] {
  1723. +    if(self.walkframe >= 15)
  1724. +        self.walkframe = 0;
  1725. +    self.frame = $hover1 + self.walkframe;
  1726. +    self.walkframe = self.walkframe + 1;
  1727. +};
  1728. +
  1729. +void() player_wizard_run = [ $fly1, player_run ] {
  1730. +    if(self.walkframe >= 14)
  1731. +        self.walkframe=0;
  1732. +    self.frame = $fly1 + self.walkframe;
  1733. +    self.walkframe = self.walkframe + 1;
  1734. +};
  1735. +
  1736. +void() player_wizard_jump = {
  1737. +    self.velocity_z = 200;
  1738. +    Wiz_idlesound();
  1739. +};
  1740. +
  1741. +////////////////////////////////////////////
  1742. +// 4 frames of pain for player_wizard, going to player_stand1
  1743. +////////////////////////////////////////////
  1744. +
  1745. +void() player_wizard_pain1 = [ $pain1, player_wizard_pain2 ] {
  1746. +    sound (self, CHAN_VOICE, "wizard/wpain.wav", 1, ATTN_NORM);
  1747. +};
  1748. +void() player_wizard_pain2 = [ $pain2, player_wizard_pain3 ] { };
  1749. +void() player_wizard_pain3 = [ $pain3, player_wizard_pain4 ] { };
  1750. +void() player_wizard_pain4 = [ $pain4, player_stand1 ] { };
  1751. +
  1752. +void() player_Wiz_FastFire = {
  1753. +    local float offset;
  1754. +    local entity missile;
  1755. +    local vector dir;
  1756. +
  1757. +    if(random()>0.75) offset=0;
  1758. +    else if(random()>0.5) offset=0-(random()*10);
  1759. +    else offset=random()*10;
  1760. +
  1761. +    dir=self.v_angle;
  1762. +    dir_y=dir_y+offset;
  1763. +
  1764. +//    self.punchangle_x = -2;
  1765. +
  1766. +    missile = spawn ();
  1767. +    missile.owner = self;
  1768. +    missile.movetype = MOVETYPE_FLYMISSILE;
  1769. +    missile.solid = SOLID_BBOX;
  1770. +        
  1771. +// set missile speed    
  1772. +
  1773. +    missile.origin = self.origin;
  1774. +    makevectors (dir);
  1775. +    // missile.velocity = aim(self, 600);
  1776. +    missile.velocity = normalize(v_forward);
  1777. +    missile.velocity = missile.velocity * 1000;
  1778. +    missile.angles = vectoangles(missile.velocity);
  1779. +    missile.classname = "wizspike";
  1780. +    setmodel(missile, "progs/w_spike.mdl");
  1781. +    setsize(missile, '0 0 0', '0 0 0');
  1782. +    missile.touch = spike_touch;
  1783. +};
  1784. +
  1785. +////////////////////////////////////////////
  1786. +// 13 frames of attack for player_wizard, going to player_stand1
  1787. +////////////////////////////////////////////
  1788. +
  1789. +/*
  1790. +void() player_wizard_attack1 = [ $attack1, player_wizard_attack2 ] { self.attack_finished = time + 1.5; };
  1791. +void() player_wizard_attack2 = [ $attack2, player_wizard_attack3 ] { };
  1792. +void() player_wizard_attack3 = [ $attack3, player_wizard_attack4 ] { };
  1793. +void() player_wizard_attack4 = [ $attack4, player_wizard_attack5 ] { };
  1794. +void() player_wizard_attack5 = [ $attack5, player_wizard_attack6 ] { };
  1795. +void() player_wizard_attack6 = [ $attack6, player_wizard_attack7 ] { };
  1796. +void() player_wizard_attack7 = [ $attack7, player_wizard_attack8 ] { };
  1797. +void() player_wizard_attack8 = [ $attack8, player_wizard_attack9 ] { };
  1798. +void() player_wizard_attack9 = [ $attack9, player_wizard_attack10 ] { };
  1799. +void() player_wizard_attack10 = [ $attack10, player_wizard_attack11 ] { };
  1800. +void() player_wizard_attack11 = [ $attack11, player_wizard_attack12 ] { sound(self, CHAN_WEAPON, "wizard/wattack.wav", 1, ATTN_NORM);};
  1801. +void() player_wizard_attack12 = [ $attack12, player_wizard_attack13 ] {player_Wiz_FastFire(-10); };
  1802. +void() player_wizard_attack13 = [ $attack13, player_stand1 ] { player_Wiz_FastFire(-10);};
  1803. +*/
  1804. +
  1805. +void() player_wizard_attack1 = [ $attack1, player_wizard_attack3 ] { self.attack_finished = time + 1.0; };
  1806. +void() player_wizard_attack2 = [ $attack3, player_wizard_attack3 ] { };
  1807. +void() player_wizard_attack3 = [ $attack5, player_wizard_attack4 ] { };
  1808. +void() player_wizard_attack4 = [ $attack7, player_wizard_attack5 ] { sound(self, CHAN_WEAPON, "wizard/wattack.wav", 1, ATTN_NORM); };
  1809. +void() player_wizard_attack5 = [ $attack9, player_wizard_attack6 ] { player_Wiz_FastFire(); };
  1810. +void() player_wizard_attack6 = [ $attack11, player_wizard_attack7 ] { player_Wiz_FastFire(); };
  1811. +void() player_wizard_attack7 = [ $attack13, player_stand1 ] { player_Wiz_FastFire();};
  1812. +
  1813. +string() player_wizard_killmsg = {
  1814. +    return " was scragged by ";
  1815. +};
  1816. +
  1817. +string() player_wizard_killmsg2 = {
  1818. +    return ".\n";
  1819. +};
  1820. +
  1821. +void() player_wizard_become = {
  1822. +    bprint(self.netname);
  1823. +    bprint(" has become a scrag.\n");
  1824. +    self._stand=player_wizard_stand;
  1825. +    self._run=player_wizard_run;
  1826. +    self._pain=player_wizard_pain1;
  1827. +    self._jump=player_wizard_jump;
  1828. +    self._jump2=player_wizard_jump;
  1829. +    self._attack=player_wizard_attack1;
  1830. +    self._impulse=SUB_Nop;
  1831. +    self._can_get_p=SUB_False;
  1832. +    self._killmsg=player_wizard_killmsg;
  1833. +    self._killmsg2=player_wizard_killmsg2;
  1834. +    setmodel(self,"progs/wizard.mdl");
  1835. +    self.modelindex_morph=self.modelindex;
  1836. +    self.weaponmodel = "";
  1837. +    if(!deathmatch) setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  1838. +    else     setsize (self, '-16 -16 -24', '16 16 40');
  1839. +    self.view_ofs = '0 0 22';
  1840. +    self.health = self.health * 2.0 / self.health_modifier;
  1841. +    self.health_modifier = 2.0;
  1842. +    makevectors(self.v_angle);
  1843. +    spawn_tfog(self.origin + 20 * v_forward);
  1844. +    DropBackpack2();
  1845. +};
  1846. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/m-zombie.qc morph/m-zombie.qc
  1847. --- v101qc/m-zombie.qc    Wed Dec 31 18:00:00 1969
  1848. +++ morph/m-zombie.qc    Thu Aug 22 17:09:17 1996
  1849. @@ -0,0 +1,347 @@
  1850. +$cd /raid/quake/id1/models/zombie
  1851. +
  1852. +$origin    0 0 24
  1853. +
  1854. +$base base
  1855. +$skin skin
  1856. +
  1857. +$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8
  1858. +$frame stand9 stand10 stand11 stand12 stand13 stand14 stand15
  1859. +
  1860. +$frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8 walk9 walk10 walk11
  1861. +$frame walk12 walk13 walk14 walk15 walk16 walk17 walk18 walk19
  1862. +
  1863. +$frame run1 run2 run3 run4 run5 run6 run7 run8 run9 run10 run11 run12
  1864. +$frame run13 run14 run15 run16 run17 run18
  1865. +
  1866. +$frame atta1 atta2 atta3 atta4 atta5 atta6 atta7 atta8 atta9 atta10 atta11
  1867. +$frame atta12 atta13
  1868. +
  1869. +$frame attb1 attb2 attb3 attb4 attb5 attb6 attb7 attb8 attb9 attb10 attb11
  1870. +$frame attb12 attb13 attb14
  1871. +
  1872. +$frame attc1 attc2 attc3 attc4 attc5 attc6 attc7 attc8 attc9 attc10 attc11
  1873. +$frame attc12
  1874. +
  1875. +$frame paina1 paina2 paina3 paina4 paina5 paina6 paina7 paina8 paina9 paina10
  1876. +$frame paina11 paina12
  1877. +
  1878. +$frame painb1 painb2 painb3 painb4 painb5 painb6 painb7 painb8 painb9 painb10
  1879. +$frame painb11 painb12 painb13 painb14 painb15 painb16 painb17 painb18 painb19
  1880. +$frame painb20 painb21 painb22 painb23 painb24 painb25 painb26 painb27 painb28
  1881. +
  1882. +$frame painc1 painc2 painc3 painc4 painc5 painc6 painc7 painc8 painc9 painc10
  1883. +$frame painc11 painc12 painc13 painc14 painc15 painc16 painc17 painc18
  1884. +
  1885. +$frame paind1 paind2 paind3 paind4 paind5 paind6 paind7 paind8 paind9 paind10
  1886. +$frame paind11 paind12 paind13
  1887. +
  1888. +$frame paine1 paine2 paine3 paine4 paine5 paine6 paine7 paine8 paine9 paine10
  1889. +$frame paine11 paine12 paine13 paine14 paine15 paine16 paine17 paine18 paine19
  1890. +$frame paine20 paine21 paine22 paine23 paine24 paine25 paine26 paine27 paine28
  1891. +$frame paine29 paine30
  1892. +
  1893. +$frame cruc_1 cruc_2 cruc_3 cruc_4 cruc_5 cruc_6
  1894. +
  1895. +/* Morph to zombie */
  1896. +
  1897. +void() player_zombie_stand = [ $stand1, player_stand1 ] {
  1898. +    if(self.walkframe >= 15)
  1899. +        self.walkframe = 0;
  1900. +        if(self.health < 75) self.health = self.health + 1; // Zombies regenerate
  1901. +    self.frame = $stand1 + self.walkframe;
  1902. +    self.walkframe = self.walkframe + 1;
  1903. +};
  1904. +
  1905. +void() player_zombie_run = [ $run1, player_run ] {
  1906. +    if(self.walkframe >= 19)
  1907. +        self.walkframe = 0;
  1908. +    self.frame = $run1 + self.walkframe;
  1909. +    self.walkframe = self.walkframe + 1;
  1910. +};
  1911. +
  1912. +////////////////////////////////////////////
  1913. +// 12 frames of paina for player_zombie, going to stand
  1914. +////////////////////////////////////////////
  1915. +
  1916. +void() player_zombie_paina1 = [ $paina1, player_zombie_paina2 ] {self.attack_finished=time+10; self.movetype=MOVETYPE_NONE;};
  1917. +void() player_zombie_paina2 = [ $paina2, player_zombie_paina3 ] { };
  1918. +void() player_zombie_paina3 = [ $paina3, player_zombie_paina4 ] { };
  1919. +void() player_zombie_paina4 = [ $paina4, player_zombie_paina5 ] { };
  1920. +void() player_zombie_paina5 = [ $paina5, player_zombie_paina6 ] { };
  1921. +void() player_zombie_paina6 = [ $paina6, player_zombie_paina7 ] { };
  1922. +void() player_zombie_paina7 = [ $paina7, player_zombie_paina8 ] { };
  1923. +void() player_zombie_paina8 = [ $paina8, player_zombie_paina9 ] { };
  1924. +void() player_zombie_paina9 = [ $paina9, player_zombie_paina10 ] { };
  1925. +void() player_zombie_paina10 = [ $paina10, player_zombie_paina11 ] { };
  1926. +void() player_zombie_paina11 = [ $paina11, player_zombie_paina12 ] { };
  1927. +void() player_zombie_paina12 = [ $paina12, player_stand1 ] {self.attack_finished=time; self.movetype=MOVETYPE_WALK;};
  1928. +
  1929. +////////////////////////////////////////////
  1930. +// 28 frames of painb for player_zombie, going to stand
  1931. +////////////////////////////////////////////
  1932. +
  1933. +void() player_zombie_painb1 = [ $painb1, player_zombie_painb2 ] {self.attack_finished=time+10; self.movetype=MOVETYPE_NONE;};
  1934. +void() player_zombie_painb2 = [ $painb2, player_zombie_painb3 ] { };
  1935. +void() player_zombie_painb3 = [ $painb3, player_zombie_painb4 ] { };
  1936. +void() player_zombie_painb4 = [ $painb4, player_zombie_painb5 ] { };
  1937. +void() player_zombie_painb5 = [ $painb5, player_zombie_painb6 ] { };
  1938. +void() player_zombie_painb6 = [ $painb6, player_zombie_painb7 ] { };
  1939. +void() player_zombie_painb7 = [ $painb7, player_zombie_painb8 ] { };
  1940. +void() player_zombie_painb8 = [ $painb8, player_zombie_painb9 ] { };
  1941. +void() player_zombie_painb9 = [ $painb9, player_zombie_painb10 ] { };
  1942. +void() player_zombie_painb10 = [ $painb10, player_zombie_painb11 ] { };
  1943. +void() player_zombie_painb11 = [ $painb11, player_zombie_painb12 ] { };
  1944. +void() player_zombie_painb12 = [ $painb12, player_zombie_painb13 ] { };
  1945. +void() player_zombie_painb13 = [ $painb13, player_zombie_painb14 ] { };
  1946. +void() player_zombie_painb14 = [ $painb14, player_zombie_painb15 ] { };
  1947. +void() player_zombie_painb15 = [ $painb15, player_zombie_painb16 ] { };
  1948. +void() player_zombie_painb16 = [ $painb16, player_zombie_painb17 ] { };
  1949. +void() player_zombie_painb17 = [ $painb17, player_zombie_painb18 ] { };
  1950. +void() player_zombie_painb18 = [ $painb18, player_zombie_painb19 ] { };
  1951. +void() player_zombie_painb19 = [ $painb19, player_zombie_painb20 ] { };
  1952. +void() player_zombie_painb20 = [ $painb20, player_zombie_painb21 ] { };
  1953. +void() player_zombie_painb21 = [ $painb21, player_zombie_painb22 ] { };
  1954. +void() player_zombie_painb22 = [ $painb22, player_zombie_painb23 ] { };
  1955. +void() player_zombie_painb23 = [ $painb23, player_zombie_painb24 ] { };
  1956. +void() player_zombie_painb24 = [ $painb24, player_zombie_painb25 ] { };
  1957. +void() player_zombie_painb25 = [ $painb25, player_zombie_painb26 ] { };
  1958. +void() player_zombie_painb26 = [ $painb26, player_zombie_painb27 ] { };
  1959. +void() player_zombie_painb27 = [ $painb27, player_zombie_painb28 ] { };
  1960. +void() player_zombie_painb28 = [ $painb28, player_stand1 ] {self.attack_finished=time; self.movetype=MOVETYPE_WALK;};
  1961. +
  1962. +////////////////////////////////////////////
  1963. +// 18 frames of painc for player_zombie, going to stand
  1964. +////////////////////////////////////////////
  1965. +
  1966. +void() player_zombie_painc1 = [ $painc1, player_zombie_painc2 ] {self.attack_finished=time+10; self.movetype=MOVETYPE_NONE;};
  1967. +void() player_zombie_painc2 = [ $painc2, player_zombie_painc3 ] { };
  1968. +void() player_zombie_painc3 = [ $painc3, player_zombie_painc4 ] { };
  1969. +void() player_zombie_painc4 = [ $painc4, player_zombie_painc5 ] { };
  1970. +void() player_zombie_painc5 = [ $painc5, player_zombie_painc6 ] { };
  1971. +void() player_zombie_painc6 = [ $painc6, player_zombie_painc7 ] { };
  1972. +void() player_zombie_painc7 = [ $painc7, player_zombie_painc8 ] { };
  1973. +void() player_zombie_painc8 = [ $painc8, player_zombie_painc9 ] { };
  1974. +void() player_zombie_painc9 = [ $painc9, player_zombie_painc10 ] { };
  1975. +void() player_zombie_painc10 = [ $painc10, player_zombie_painc11 ] { };
  1976. +void() player_zombie_painc11 = [ $painc11, player_zombie_painc12 ] { };
  1977. +void() player_zombie_painc12 = [ $painc12, player_zombie_painc13 ] { };
  1978. +void() player_zombie_painc13 = [ $painc13, player_zombie_painc14 ] { };
  1979. +void() player_zombie_painc14 = [ $painc14, player_zombie_painc15 ] { };
  1980. +void() player_zombie_painc15 = [ $painc15, player_zombie_painc16 ] { };
  1981. +void() player_zombie_painc16 = [ $painc16, player_zombie_painc17 ] { };
  1982. +void() player_zombie_painc17 = [ $painc17, player_zombie_painc18 ] { };
  1983. +void() player_zombie_painc18 = [ $painc18, player_stand1 ] {self.attack_finished=time; self.movetype=MOVETYPE_WALK;};
  1984. +
  1985. +////////////////////////////////////////////
  1986. +// 13 frames of paind for player_zombie, going to stand
  1987. +////////////////////////////////////////////
  1988. +
  1989. +void() player_zombie_paind1 = [ $paind1, player_zombie_paind2 ] {self.attack_finished=time+10; self.movetype=MOVETYPE_NONE;};
  1990. +void() player_zombie_paind2 = [ $paind2, player_zombie_paind3 ] { };
  1991. +void() player_zombie_paind3 = [ $paind3, player_zombie_paind4 ] { };
  1992. +void() player_zombie_paind4 = [ $paind4, player_zombie_paind5 ] { };
  1993. +void() player_zombie_paind5 = [ $paind5, player_zombie_paind6 ] { };
  1994. +void() player_zombie_paind6 = [ $paind6, player_zombie_paind7 ] { };
  1995. +void() player_zombie_paind7 = [ $paind7, player_zombie_paind8 ] { };
  1996. +void() player_zombie_paind8 = [ $paind8, player_zombie_paind9 ] { };
  1997. +void() player_zombie_paind9 = [ $paind9, player_zombie_paind10 ] { };
  1998. +void() player_zombie_paind10 = [ $paind10, player_zombie_paind11 ] { };
  1999. +void() player_zombie_paind11 = [ $paind11, player_zombie_paind12 ] { };
  2000. +void() player_zombie_paind12 = [ $paind12, player_zombie_paind13 ] { };
  2001. +void() player_zombie_paind13 = [ $paind13, player_stand1 ] {self.attack_finished=time; self.movetype=MOVETYPE_WALK;};
  2002. +
  2003. +////////////////////////////////////////////
  2004. +// 30 frames of paine for player_zombie, going to stand
  2005. +////////////////////////////////////////////
  2006. +
  2007. +void() player_zombie_paine1 = [ $paine1, player_zombie_paine2 ] {self.attack_finished=time+10; self.movetype=MOVETYPE_NONE;};
  2008. +void() player_zombie_paine2 = [ $paine2, player_zombie_paine3 ] { };
  2009. +void() player_zombie_paine3 = [ $paine3, player_zombie_paine4 ] { };
  2010. +void() player_zombie_paine4 = [ $paine4, player_zombie_paine5 ] { };
  2011. +void() player_zombie_paine5 = [ $paine5, player_zombie_paine6 ] { };
  2012. +void() player_zombie_paine6 = [ $paine6, player_zombie_paine7 ] { };
  2013. +void() player_zombie_paine7 = [ $paine7, player_zombie_paine8 ] { };
  2014. +void() player_zombie_paine8 = [ $paine8, player_zombie_paine9 ] { };
  2015. +void() player_zombie_paine9 = [ $paine9, player_zombie_paine10 ] { };
  2016. +void() player_zombie_paine10 = [ $paine10, player_zombie_paine11 ] { };
  2017. +void() player_zombie_paine11 = [ $paine11, player_zombie_paine12 ] { };
  2018. +void() player_zombie_paine12 = [ $paine12, player_zombie_paine13 ] { };
  2019. +void() player_zombie_paine13 = [ $paine13, player_zombie_paine14 ] { };
  2020. +void() player_zombie_paine14 = [ $paine14, player_zombie_paine15 ] { };
  2021. +void() player_zombie_paine15 = [ $paine15, player_zombie_paine16 ] { };
  2022. +void() player_zombie_paine16 = [ $paine16, player_zombie_paine17 ] { };
  2023. +void() player_zombie_paine17 = [ $paine17, player_zombie_paine18 ] { };
  2024. +void() player_zombie_paine18 = [ $paine18, player_zombie_paine19 ] { };
  2025. +void() player_zombie_paine19 = [ $paine19, player_zombie_paine20 ] { };
  2026. +void() player_zombie_paine20 = [ $paine20, player_zombie_paine21 ] { };
  2027. +void() player_zombie_paine21 = [ $paine21, player_zombie_paine22 ] { };
  2028. +void() player_zombie_paine22 = [ $paine22, player_zombie_paine23 ] { };
  2029. +void() player_zombie_paine23 = [ $paine23, player_zombie_paine24 ] { };
  2030. +void() player_zombie_paine24 = [ $paine24, player_zombie_paine25 ] { };
  2031. +void() player_zombie_paine25 = [ $paine25, player_zombie_paine26 ] { };
  2032. +void() player_zombie_paine26 = [ $paine26, player_zombie_paine27 ] { };
  2033. +void() player_zombie_paine27 = [ $paine27, player_zombie_paine28 ] { };
  2034. +void() player_zombie_paine28 = [ $paine28, player_zombie_paine29 ] { };
  2035. +void() player_zombie_paine29 = [ $paine29, player_zombie_paine30 ] { };
  2036. +void() player_zombie_paine30 = [ $paine30, player_stand1 ] {self.attack_finished=time; self.movetype=MOVETYPE_WALK;};
  2037. +
  2038. +void(entity attacker, float take) player_zombie_pain = {
  2039. +    if(self.health < 70) self.health=70;
  2040. +    if(self.pain_finished > time) return;
  2041. +    self.pain_finished = time + 10;
  2042. +    if(random()>0.50) sound (self, CHAN_VOICE, "zombie/z_pain.wav", 1, ATTN_NORM);
  2043. +    else sound(self, CHAN_VOICE, "zombie/z_pain1.wav", 1, ATTN_NORM);
  2044. +    if(take > 60) {
  2045. +        if(random()>0.50) player_zombie_paine1();
  2046. +        else player_zombie_painb1();
  2047. +    } else {
  2048. +        if(random()>0.66) player_zombie_paina1();
  2049. +        else if(random()>0.50) player_zombie_painc1();
  2050. +        else player_zombie_paind1();
  2051. +    }
  2052. +};
  2053. +
  2054. +void() player_zombie_jump = {
  2055. +    // Zombies can't jump
  2056. +};
  2057. +
  2058. +void() player_ZombieFireGrenade =
  2059. +{
  2060. +    local    entity missile, mpuff;
  2061. +
  2062. +    sound (self, CHAN_WEAPON, "zombie/z_shot1.wav", 1, ATTN_NORM);
  2063. +
  2064. +    self.punchangle_x = -2;
  2065. +
  2066. +    missile = spawn ();
  2067. +    missile.owner = self;
  2068. +    missile.movetype = MOVETYPE_BOUNCE;
  2069. +    missile.solid = SOLID_BBOX;
  2070. +    missile.classname = "grenade";
  2071. +
  2072. +// set missile speed    
  2073. +
  2074. +    makevectors (self.v_angle);
  2075. +
  2076. +    if(self.v_angle_x)
  2077. +        missile.velocity = v_forward*600 + v_up * 200 + crandom()*v_right*10 + crandom()*v_up*10;
  2078. +    else {
  2079. +        missile.velocity = aim(self, 10000);
  2080. +        missile.velocity = missile.velocity * 600;
  2081. +        missile.velocity_z = 200;
  2082. +    }
  2083. +    
  2084. +    missile.avelocity = '3000 1000 2000';
  2085. +
  2086. +    missile.angles = vectoangles(missile.velocity);
  2087. +
  2088. +    missile.touch = ZombieGrenadeTouch;
  2089. +    
  2090. +// set missile duration
  2091. +    missile.nextthink = time + 2.5;
  2092. +    missile.think = SUB_Remove;
  2093. +
  2094. +    setmodel (missile, "progs/zom_gib.mdl");
  2095. +    setsize (missile, '0 0 0', '0 0 0');        
  2096. +    setorigin (missile, self.origin);
  2097. +};
  2098. +////////////////////////////////////////////
  2099. +// 13 frames of atta for player_zombie, going to stand
  2100. +////////////////////////////////////////////
  2101. +
  2102. +void() player_zombie_atta1 = [ $atta1, player_zombie_atta2 ] { };
  2103. +void() player_zombie_atta2 = [ $atta2, player_zombie_atta3 ] { };
  2104. +void() player_zombie_atta3 = [ $atta3, player_zombie_atta4 ] { };
  2105. +void() player_zombie_atta4 = [ $atta4, player_zombie_atta5 ] { };
  2106. +void() player_zombie_atta5 = [ $atta5, player_zombie_atta6 ] { };
  2107. +void() player_zombie_atta6 = [ $atta6, player_zombie_atta7 ] { };
  2108. +void() player_zombie_atta7 = [ $atta7, player_zombie_atta8 ] { };
  2109. +void() player_zombie_atta8 = [ $atta8, player_zombie_atta9 ] { };
  2110. +void() player_zombie_atta9 = [ $atta9, player_zombie_atta10 ] { };
  2111. +void() player_zombie_atta10 = [ $atta10, player_zombie_atta11 ] { };
  2112. +void() player_zombie_atta11 = [ $atta11, player_zombie_atta12 ] { };
  2113. +void() player_zombie_atta12 = [ $atta12, player_zombie_atta13 ] { };
  2114. +void() player_zombie_atta13 = [ $atta13, player_stand1 ] { player_ZombieFireGrenade(); self.attack_finished=time; };
  2115. +
  2116. +////////////////////////////////////////////
  2117. +// 14 frames of attb for player_zombie, going to stand
  2118. +////////////////////////////////////////////
  2119. +
  2120. +void() player_zombie_attb1 = [ $attb1, player_zombie_attb2 ] { };
  2121. +void() player_zombie_attb2 = [ $attb2, player_zombie_attb3 ] { };
  2122. +void() player_zombie_attb3 = [ $attb3, player_zombie_attb4 ] { };
  2123. +void() player_zombie_attb4 = [ $attb4, player_zombie_attb5 ] { };
  2124. +void() player_zombie_attb5 = [ $attb5, player_zombie_attb6 ] { };
  2125. +void() player_zombie_attb6 = [ $attb6, player_zombie_attb7 ] { };
  2126. +void() player_zombie_attb7 = [ $attb7, player_zombie_attb8 ] { };
  2127. +void() player_zombie_attb8 = [ $attb8, player_zombie_attb9 ] { };
  2128. +void() player_zombie_attb9 = [ $attb9, player_zombie_attb10 ] { };
  2129. +void() player_zombie_attb10 = [ $attb10, player_zombie_attb11 ] { };
  2130. +void() player_zombie_attb11 = [ $attb11, player_zombie_attb12 ] { };
  2131. +void() player_zombie_attb12 = [ $attb12, player_zombie_attb13 ] { };
  2132. +void() player_zombie_attb13 = [ $attb12, player_zombie_attb14 ] { };
  2133. +void() player_zombie_attb14 = [ $attb14, player_stand1 ] { player_ZombieFireGrenade(); self.attack_finished=time; };
  2134. +
  2135. +////////////////////////////////////////////
  2136. +// 12 frames of attc for player_zombie, going to stand
  2137. +////////////////////////////////////////////
  2138. +
  2139. +void() player_zombie_attc1 = [ $attc1, player_zombie_attc2 ] { };
  2140. +void() player_zombie_attc2 = [ $attc2, player_zombie_attc3 ] { };
  2141. +void() player_zombie_attc3 = [ $attc3, player_zombie_attc4 ] { };
  2142. +void() player_zombie_attc4 = [ $attc4, player_zombie_attc5 ] { };
  2143. +void() player_zombie_attc5 = [ $attc5, player_zombie_attc6 ] { };
  2144. +void() player_zombie_attc6 = [ $attc6, player_zombie_attc7 ] { };
  2145. +void() player_zombie_attc7 = [ $attc7, player_zombie_attc8 ] { };
  2146. +void() player_zombie_attc8 = [ $attc8, player_zombie_attc9 ] { };
  2147. +void() player_zombie_attc9 = [ $attc9, player_zombie_attc10 ] { };
  2148. +void() player_zombie_attc10 = [ $attc10, player_zombie_attc11 ] { };
  2149. +void() player_zombie_attc11 = [ $attc11, player_zombie_attc12 ] { };
  2150. +void() player_zombie_attc12 = [ $attc12, player_stand1 ] { player_ZombieFireGrenade(); self.attack_finished=time; };
  2151. +
  2152. +void() player_zombie_attack = {
  2153. +    self.attack_finished=time+10;
  2154. +    if(random()>0.66) player_zombie_atta1();
  2155. +    else if(random()>0.5) player_zombie_attb1();
  2156. +    else player_zombie_attc1();
  2157. +};
  2158. +
  2159. +void() player_zombie_impulse = {
  2160. +    // Zombie has only one weapon
  2161. +};
  2162. +
  2163. +string() player_zombie_killmsg = {
  2164. +    return " was splatted to death by ";
  2165. +};
  2166. +
  2167. +string() player_zombie_killmsg2 = {
  2168. +    return ".\n";
  2169. +};
  2170. +
  2171. +void() player_zombie_become = {
  2172. +    bprint(self.netname);
  2173. +    bprint(" has become a zombie.\n");
  2174. +    self._stand=player_zombie_stand;
  2175. +    self._run=player_zombie_run;
  2176. +    self._pain=player_zombie_pain;
  2177. +    self._jump=SUB_Nop;
  2178. +    self._jump2=SUB_Nop;
  2179. +    self._attack=player_zombie_attack;
  2180. +    self._impulse=player_zombie_impulse;
  2181. +    self._can_get_p=SUB_False;
  2182. +    self._killmsg=player_zombie_killmsg;
  2183. +    self._killmsg2=player_zombie_killmsg2;
  2184. +    setmodel(self,"progs/zombie.mdl");
  2185. +    self.modelindex_morph=self.modelindex;
  2186. +    self.weaponmodel="";
  2187. +    self.view_ofs = '0 0 22';
  2188. +    if(!deathmatch) setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  2189. +    else     setsize (self, '-16 -16 -24', '16 16 40');
  2190. +    self.health = self.health * 0.75 / self.health_modifier;
  2191. +    self.health_modifier = 0.75;
  2192. +    makevectors(self.v_angle);
  2193. +    spawn_tfog(self.origin + 20 * v_forward);
  2194. +    DropBackpack2();
  2195. +};
  2196. +
  2197. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/ogre.qc morph/ogre.qc
  2198. --- v101qc/ogre.qc    Thu Jul 25 01:51:23 1996
  2199. +++ morph/ogre.qc    Fri Aug 16 08:00:55 1996
  2200. @@ -449,6 +449,9 @@
  2201.      self.th_missile = ogre_nail1;
  2202.      self.th_pain = ogre_pain;
  2203.      
  2204. +    self.weaponmodel="progs/ogre.mdl";
  2205. +    self.weaponframe=0;
  2206. +
  2207.      walkmonster_start();
  2208.  };
  2209.  
  2210. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/player.qc morph/player.qc
  2211. --- v101qc/player.qc    Thu Jul 25 01:51:23 1996
  2212. +++ morph/player.qc    Wed Aug 14 07:45:38 1996
  2213. @@ -98,6 +98,8 @@
  2214.          return;
  2215.      }
  2216.  
  2217. +    if (self._stand != SUB_Null) { self._stand(); return; }
  2218. +
  2219.      if (self.weapon == IT_AXE)
  2220.      {
  2221.          if (self.walkframe >= 12)
  2222. @@ -122,6 +124,7 @@
  2223.          player_stand1();
  2224.          return;
  2225.      }
  2226. +    if (self._run != SUB_Null) { self._run(); return; }
  2227.  
  2228.      if (self.weapon == IT_AXE)
  2229.      {
  2230. @@ -334,8 +337,10 @@
  2231.  void()    player_axpain5 =    [    $axpain5,    player_axpain6    ] {};
  2232.  void()    player_axpain6 =    [    $axpain6,    player_run    ] {};
  2233.  
  2234. -void() player_pain =
  2235. +void(entity attacker, float take) player_pain =
  2236.  {
  2237. +    if (self._pain != SUB_Null) { self._pain(attacker, take); return; }
  2238. +
  2239.      if (self.weaponframe)
  2240.          return;
  2241.  
  2242. @@ -531,6 +536,8 @@
  2243.      self.super_damage_finished = 0;
  2244.      self.radsuit_finished = 0;
  2245.      self.modelindex = modelindex_player;    // don't use eyes
  2246. +    setmodel(self,"progs/player.mdl"); // In case he was morphed
  2247. +    setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  2248.  
  2249.      if (deathmatch || coop)
  2250.          DropBackpack();
  2251. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/progs.src morph/progs.src
  2252. --- v101qc/progs.src    Wed Jul 31 21:15:26 1996
  2253. +++ morph/progs.src    Wed Aug 14 15:13:23 1996
  2254. @@ -33,3 +33,12 @@
  2255.  shalrath.qc        // registered
  2256.  enforcer.qc        // registered
  2257.  oldone.qc        // registered
  2258. +
  2259. +m-zombie.qc        // Morphing
  2260. +m-ogre.qc    
  2261. +m-demon.qc
  2262. +m-human.qc
  2263. +m-shalra.qc
  2264. +m-wizard.qc
  2265. +m-hknigh.qc
  2266. +m-shambl.qc
  2267. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/shalrath.qc morph/shalrath.qc
  2268. --- v101qc/shalrath.qc    Thu Jul 25 01:51:23 1996
  2269. +++ morph/shalrath.qc    Wed Aug 14 23:52:12 1996
  2270. @@ -160,18 +160,24 @@
  2271.  {
  2272.      local vector    dir, vtemp;
  2273.      vtemp = self.enemy.origin + '0 0 10';
  2274. +    if (!self.enemy) {
  2275. +        return;
  2276. +    }
  2277.      if (self.enemy.health < 1)
  2278.      {
  2279.          remove(self);
  2280.          return;
  2281.      }
  2282. +    self.nextthink = time + 0.2;
  2283. +    self.think = ShalHome;    
  2284. +    // Go where last seen if not now visible
  2285. +    // For player and nightmare real monsters
  2286. +    if (self.owner.classname == "player" || skill == 3) if(!visible(self.enemy)) return;
  2287.      dir = normalize(vtemp - self.origin);
  2288.      if (skill == 3)
  2289.          self.velocity = dir * 350;
  2290.      else
  2291.          self.velocity = dir * 250;
  2292. -    self.nextthink = time + 0.2;
  2293. -    self.think = ShalHome;    
  2294.  };
  2295.  
  2296.  void() ShalMissileTouch =
  2297. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/subs.qc morph/subs.qc
  2298. --- v101qc/subs.qc    Thu Jul 25 01:51:24 1996
  2299. +++ morph/subs.qc    Tue Aug 13 13:45:52 1996
  2300. @@ -314,3 +314,9 @@
  2301.      self.cnt = 1;
  2302.      self.think = thinkst;
  2303.  };
  2304. +
  2305. +void() SUB_Nop = // Since SUB_Null is used as 'no function'
  2306. +{ };
  2307. +
  2308. +float() SUB_True = { return 1; }; // Return a true value
  2309. +float() SUB_False = { return 0; }; // Return a false value
  2310. diff -ur --new-file -x progs.dat -x progdefs.h -x *.bak -x *~ -x *.rej -x *.cfg -x *.sav v101qc/weapons.qc morph/weapons.qc
  2311. --- v101qc/weapons.qc    Thu Jul 25 01:51:24 1996
  2312. +++ morph/weapons.qc    Thu Aug 22 17:03:53 1996
  2313. @@ -22,6 +22,112 @@
  2314.      precache_sound ("weapons/grenade.wav");    // grenade launcher
  2315.      precache_sound ("weapons/bounce.wav");        // grenade bounce
  2316.      precache_sound ("weapons/shotgn2.wav");    // super shotgun
  2317. +
  2318. +//// Zombie morph
  2319. +        precache_model ("progs/zombie.mdl");
  2320. +        precache_model ("progs/h_zombie.mdl");
  2321. +        precache_model ("progs/zom_gib.mdl");
  2322. +
  2323. +        precache_sound ("zombie/z_idle.wav");
  2324. +        precache_sound ("zombie/z_idle1.wav");
  2325. +        precache_sound ("zombie/z_shot1.wav");
  2326. +        precache_sound ("zombie/z_gib.wav");
  2327. +        precache_sound ("zombie/z_pain.wav");
  2328. +        precache_sound ("zombie/z_pain1.wav");
  2329. +        precache_sound ("zombie/z_fall.wav");
  2330. +        precache_sound ("zombie/z_miss.wav");
  2331. +        precache_sound ("zombie/z_hit.wav");
  2332. +        precache_sound ("zombie/idle_w2.wav");
  2333. +//// 
  2334. +
  2335. +//// Shalrath morph
  2336. +    precache_model2 ("progs/shalrath.mdl");
  2337. +    precache_model2 ("progs/h_shal.mdl");
  2338. +    precache_model2 ("progs/v_spike.mdl");
  2339. +    
  2340. +    precache_sound2 ("shalrath/attack.wav");
  2341. +    precache_sound2 ("shalrath/attack2.wav");
  2342. +    precache_sound2 ("shalrath/death.wav");
  2343. +    precache_sound2 ("shalrath/idle.wav");
  2344. +    precache_sound2 ("shalrath/pain.wav");
  2345. +    precache_sound2 ("shalrath/sight.wav");
  2346. +////
  2347. +
  2348. +//// Wizard morph
  2349. +    precache_model ("progs/wizard.mdl");
  2350. +    precache_model ("progs/h_wizard.mdl");
  2351. +    precache_model ("progs/w_spike.mdl");
  2352. +
  2353. +    precache_sound ("wizard/hit.wav");        // used by c code
  2354. +    precache_sound ("wizard/wattack.wav");
  2355. +    precache_sound ("wizard/wdeath.wav");
  2356. +    precache_sound ("wizard/widle1.wav");
  2357. +    precache_sound ("wizard/widle2.wav");
  2358. +    precache_sound ("wizard/wpain.wav");
  2359. +    precache_sound ("wizard/wsight.wav");
  2360. +////
  2361. +
  2362. +//// Hell knight morph
  2363. +    precache_model2 ("progs/hknight.mdl");
  2364. +    precache_model2 ("progs/k_spike.mdl");
  2365. +    precache_model2 ("progs/h_hellkn.mdl");
  2366. +
  2367. +    
  2368. +    precache_sound2 ("hknight/attack1.wav");
  2369. +    precache_sound2 ("hknight/death1.wav");
  2370. +    precache_sound2 ("hknight/pain1.wav");
  2371. +    precache_sound2 ("hknight/sight1.wav");
  2372. +    precache_sound ("hknight/hit.wav");        // used by C code, so don't sound2
  2373. +    precache_sound2 ("hknight/slash1.wav");
  2374. +    precache_sound2 ("hknight/idle.wav");
  2375. +    precache_sound2 ("hknight/grunt.wav");
  2376. +
  2377. +    precache_sound ("knight/sword1.wav");
  2378. +    precache_sound ("knight/sword2.wav");
  2379. +////
  2380. +
  2381. +//// Shambler morph
  2382. +    precache_model ("progs/shambler.mdl");
  2383. +    precache_model ("progs/s_light.mdl");
  2384. +    precache_model ("progs/h_shams.mdl");
  2385. +    precache_model ("progs/bolt.mdl");
  2386. +    
  2387. +    precache_sound ("shambler/sattck1.wav");
  2388. +    precache_sound ("shambler/sboom.wav");
  2389. +    precache_sound ("shambler/sdeath.wav");
  2390. +    precache_sound ("shambler/shurt2.wav");
  2391. +    precache_sound ("shambler/sidle.wav");
  2392. +    precache_sound ("shambler/ssight.wav");
  2393. +    precache_sound ("shambler/melee1.wav");
  2394. +    precache_sound ("shambler/melee2.wav");
  2395. +    precache_sound ("shambler/smack.wav");
  2396. +////
  2397. +
  2398. +//// Demon morph
  2399. +    precache_model ("progs/demon.mdl");
  2400. +    precache_model ("progs/h_demon.mdl");
  2401. +
  2402. +    precache_sound ("demon/ddeath.wav");
  2403. +    precache_sound ("demon/dhit2.wav");
  2404. +    precache_sound ("demon/djump.wav");
  2405. +    precache_sound ("demon/dpain1.wav");
  2406. +    precache_sound ("demon/idle1.wav");
  2407. +    precache_sound ("demon/sight2.wav");
  2408. +////
  2409. +
  2410. +//// Ogre morph
  2411. +    precache_model ("progs/ogre.mdl");
  2412. +    precache_model ("progs/h_ogre.mdl");
  2413. +    precache_model ("progs/grenade.mdl");
  2414. +
  2415. +    precache_sound ("ogre/ogdrag.wav");
  2416. +    precache_sound ("ogre/ogdth.wav");
  2417. +    precache_sound ("ogre/ogidle.wav");
  2418. +    precache_sound ("ogre/ogidle2.wav");
  2419. +    precache_sound ("ogre/ogpain1.wav");
  2420. +    precache_sound ("ogre/ogsawatk.wav");
  2421. +    precache_sound ("ogre/ogwake.wav");
  2422. +////
  2423.  };
  2424.  
  2425.  float() crandom =
  2426. @@ -884,6 +990,10 @@
  2427.  {
  2428.      local    float    r;
  2429.  
  2430. +    if (self._attack != SUB_Null) {
  2431. +        self._attack();
  2432. +        return;
  2433. +    }
  2434.      if (!W_CheckNoAmmo ())
  2435.          return;
  2436.  
  2437. @@ -1158,8 +1268,22 @@
  2438.  
  2439.  ============
  2440.  */
  2441. +void() player_zombie_become;
  2442. +void() player_shalrath_become;
  2443. +void() player_human_become;
  2444. +void() player_wizard_become;
  2445. +void() player_hknight_become;
  2446. +void() player_shambler_become;
  2447. +void() player_demon_become;
  2448. +void() player_ogre_become;
  2449. +
  2450.  void() ImpulseCommands =
  2451.  {
  2452. +    if (self.impulse >= 1 && self.impulse <= 10 && self._impulse != SUB_Null) {
  2453. +        self._impulse();
  2454. +        return;
  2455. +    }
  2456. +
  2457.      if (self.impulse >= 1 && self.impulse <= 8)
  2458.          W_ChangeWeapon ();
  2459.  
  2460. @@ -1170,6 +1294,16 @@
  2461.      if (self.impulse == 11)
  2462.          ServerflagsCommand ();
  2463.  
  2464. +    if(self.impulse > 90 && self.impulse < 98) self.morphnum=self.impulse;
  2465. +    if (self.impulse == 90) player_human_become();
  2466. +    if (self.impulse == 91) player_zombie_become();
  2467. +    if (self.impulse == 92) player_shalrath_become();
  2468. +    if (self.impulse == 93) player_wizard_become();
  2469. +    if (self.impulse == 94) player_hknight_become();
  2470. +    if (self.impulse == 95) player_shambler_become();
  2471. +    if (self.impulse == 96) player_demon_become();
  2472. +    if (self.impulse == 97) player_ogre_become();
  2473. +    
  2474.      if (self.impulse == 255)
  2475.          QuadCheat ();
  2476.          
  2477.