home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / qvote27 / client.qc next >
Encoding:
Text File  |  1996-08-20  |  33.3 KB  |  1,463 lines

  1. // prototypes
  2. void () W_WeaponFrame;
  3. void() W_SetCurrentAmmo;
  4. void() player_pain;
  5. void() player_stand1;
  6. void (vector org) spawn_tfog;
  7. void (vector org, entity death_owner) spawn_tdeath;
  8.  
  9. float    modelindex_eyes, modelindex_player;
  10.  
  11. /*
  12. =============================================================================
  13.  
  14.                 LEVEL CHANGING / INTERMISSION
  15.  
  16. =============================================================================
  17. */
  18.  
  19. float    intermission_running;
  20. float    intermission_exittime;
  21.  
  22. /*QUAKED info_intermission (1 0.5 0.5) (-16 -16 -16) (16 16 16)
  23. This is the camera point for the intermission.
  24. Use mangle instead of angle, so you can set pitch or roll as well as yaw.  'pitch roll yaw'
  25. */
  26. void() info_intermission =
  27. {
  28. };
  29.  
  30.  
  31.  
  32. void() SetChangeParms =
  33. {
  34. // remove items
  35.     self.items = self.items - (self.items & 
  36.     (IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD) );
  37.     
  38. // cap super health
  39.     if (self.health > 100)
  40.         self.health = 100;
  41.     if (self.health < 50)
  42.         self.health = 50;
  43.     parm1 = self.items;
  44.     parm2 = self.health;
  45.     parm3 = self.armorvalue;
  46.     if (self.ammo_shells < 25)
  47.         parm4 = 25;
  48.     else
  49.         parm4 = self.ammo_shells;
  50.     parm5 = self.ammo_nails;
  51.     parm6 = self.ammo_rockets;
  52.     parm7 = self.ammo_cells;
  53.     parm8 = self.weapon;
  54.     parm9 = self.armortype * 100;
  55. };
  56.  
  57. void() SetNewParms =
  58. {
  59.     parm1 = IT_SHOTGUN | IT_AXE;
  60.     parm2 = 100;
  61.     parm3 = 0;
  62.     parm4 = 25;
  63.     parm5 = 0;
  64.     parm6 = 0;
  65.     parm6 = 0;
  66.     parm8 = 1;
  67.     parm9 = 0;
  68. };
  69.  
  70. void() DecodeLevelParms =
  71. {
  72.     if (serverflags)
  73.     {
  74.         if (world.model == "maps/start.bsp")
  75.             SetNewParms ();        // take away all stuff on starting new episode
  76.     }
  77.     
  78.     self.items = parm1;
  79.     self.health = parm2;
  80.     self.armorvalue = parm3;
  81.     self.ammo_shells = parm4;
  82.     self.ammo_nails = parm5;
  83.     self.ammo_rockets = parm6;
  84.     self.ammo_cells = parm7;
  85.     self.weapon = parm8;
  86.     self.armortype = parm9 * 0.01;
  87. };
  88.  
  89. /*
  90. ============
  91. FindIntermission
  92.  
  93. Returns the entity to view from
  94. ============
  95. */
  96. entity() FindIntermission =
  97. {
  98.     local    entity spot;
  99.     local    float cyc;
  100.  
  101. // look for info_intermission first
  102.     spot = find (world, classname, "info_intermission");
  103.     if (spot)
  104.     {    // pick a random one
  105.         cyc = random() * 4;
  106.         while (cyc > 1)
  107.         {
  108.             spot = find (spot, classname, "info_intermission");
  109.             if (!spot)
  110.                 spot = find (spot, classname, "info_intermission");
  111.             cyc = cyc - 1;
  112.         }
  113.         return spot;
  114.     }
  115.  
  116. // then look for the start position
  117.     spot = find (world, classname, "info_player_start");
  118.     if (spot)
  119.         return spot;
  120.     
  121. // testinfo_player_start is only found in regioned levels
  122.     spot = find (world, classname, "testplayerstart");
  123.     if (spot)
  124.         return spot;
  125.     
  126.     objerror ("FindIntermission: no spot");
  127. };
  128.  
  129.  
  130. string nextmap;
  131. void() GotoNextMap =
  132. {
  133.     if (cvar("samelevel"))    // if samelevel is set, stay on same level
  134.         changelevel (mapname);
  135.     else
  136.         changelevel (nextmap);
  137. };
  138.  
  139.  
  140. void() ExitIntermission =
  141. {
  142. // skip any text in deathmatch
  143.     if (deathmatch)
  144.     {
  145.         GotoNextMap ();
  146.         return;
  147.     }
  148.     
  149.     intermission_exittime = time + 1;
  150.     intermission_running = intermission_running + 1;
  151.  
  152. //
  153. // run some text if at the end of an episode
  154. //
  155.     if (intermission_running == 2)
  156.     {
  157.         if (world.model == "maps/e1m7.bsp")
  158.         {
  159.             WriteByte (MSG_ALL, SVC_CDTRACK);
  160.             WriteByte (MSG_ALL, 2);
  161.             WriteByte (MSG_ALL, 3);
  162.             if (!cvar("registered"))
  163.             {
  164.                 WriteByte (MSG_ALL, SVC_FINALE);
  165.                 WriteString (MSG_ALL, "As the corpse of the monstrous entity\nChthon sinks back into the lava whence\nit rose, you grip the Rune of Earth\nMagic tightly. Now that you have\nconquered the Dimension of the Doomed,\nrealm of Earth Magic, you are ready to\ncomplete your task in the other three\nhaunted lands of Quake. Or are you? If\nyou don't register Quake, you'll never\nknow what awaits you in the Realm of\nBlack Magic, the Netherworld, and the\nElder World!");
  166.             }
  167.             else
  168.             {
  169.                 WriteByte (MSG_ALL, SVC_FINALE);
  170.                 WriteString (MSG_ALL, "As the corpse of the monstrous entity\nChthon sinks back into the lava whence\nit rose, you grip the Rune of Earth\nMagic tightly. Now that you have\nconquered the Dimension of the Doomed,\nrealm of Earth Magic, you are ready to\ncomplete your task. A Rune of magic\npower lies at the end of each haunted\nland of Quake. Go forth, seek the\ntotality of the four Runes!");
  171.             }
  172.             return;
  173.         }
  174.         else if (world.model == "maps/e2m6.bsp")
  175.         {
  176.             WriteByte (MSG_ALL, SVC_CDTRACK);
  177.             WriteByte (MSG_ALL, 2);
  178.             WriteByte (MSG_ALL, 3);
  179.  
  180.             WriteByte (MSG_ALL, SVC_FINALE);
  181.             WriteString (MSG_ALL, "The Rune of Black Magic throbs evilly in\nyour hand and whispers dark thoughts\ninto your brain. You learn the inmost\nlore of the Hell-Mother; Shub-Niggurath!\nYou now know that she is behind all the\nterrible plotting which has led to so\nmuch death and horror. But she is not\ninviolate! Armed with this Rune, you\nrealize that once all four Runes are\ncombined, the gate to Shub-Niggurath's\nPit will open, and you can face the\nWitch-Goddess herself in her frightful\notherworld cathedral.");
  182.             return;
  183.         }
  184.         else if (world.model == "maps/e3m6.bsp")
  185.         {
  186.             WriteByte (MSG_ALL, SVC_CDTRACK);
  187.             WriteByte (MSG_ALL, 2);
  188.             WriteByte (MSG_ALL, 3);
  189.  
  190.             WriteByte (MSG_ALL, SVC_FINALE);
  191.             WriteString (MSG_ALL, "The charred viscera of diabolic horrors\nbubble viscously as you seize the Rune\nof Hell Magic. Its heat scorches your\nhand, and its terrible secrets blight\nyour mind. Gathering the shreds of your\ncourage, you shake the devil's shackles\nfrom your soul, and become ever more\nhard and determined to destroy the\nhideous creatures whose mere existence\nthreatens the souls and psyches of all\nthe population of Earth.");
  192.             return;
  193.         }
  194.         else if (world.model == "maps/e4m7.bsp")
  195.         {
  196.             WriteByte (MSG_ALL, SVC_CDTRACK);
  197.             WriteByte (MSG_ALL, 2);
  198.             WriteByte (MSG_ALL, 3);
  199.  
  200.             WriteByte (MSG_ALL, SVC_FINALE);
  201.             WriteString (MSG_ALL, "Despite the awful might of the Elder\nWorld, you have achieved the Rune of\nElder Magic, capstone of all types of\narcane wisdom. Beyond good and evil,\nbeyond life and death, the Rune\npulsates, heavy with import. Patient and\npotent, the Elder Being Shub-Niggurath\nweaves her dire plans to clear off all\nlife from the Earth, and bring her own\nfoul offspring to our world! For all the\ndwellers in these nightmare dimensions\nare her descendants! Once all Runes of\nmagic power are united, the energy\nbehind them will blast open the Gateway\nto Shub-Niggurath, and you can travel\nthere to foil the Hell-Mother's plots\nin person.");
  202.             return;
  203.         }
  204.  
  205.         GotoNextMap();
  206.     }
  207.     
  208.     if (intermission_running == 3)
  209.     {
  210.         if (!cvar("registered"))
  211.         {    // shareware episode has been completed, go to sell screen
  212.             WriteByte (MSG_ALL, SVC_SELLSCREEN);
  213.             return;
  214.         }
  215.         
  216.         if ( (serverflags&15) == 15)
  217.         {
  218.             WriteByte (MSG_ALL, SVC_FINALE);
  219.             WriteString (MSG_ALL, "Now, you have all four Runes. You sense\ntremendous invisible forces moving to\nunseal ancient barriers. Shub-Niggurath\nhad hoped to use the Runes Herself to\nclear off the Earth, but now instead,\nyou will use them to enter her home and\nconfront her as an avatar of avenging\nEarth-life. If you defeat her, you will\nbe remembered forever as the savior of\nthe planet. If she conquers, it will be\nas if you had never been born.");
  220.             return;
  221.         }
  222.         
  223.     }
  224.  
  225.     GotoNextMap();
  226. };
  227.  
  228. /*
  229. ============
  230. IntermissionThink
  231.  
  232. When the player presses attack or jump, change to the next level
  233. ============
  234. */
  235. void() IntermissionThink =
  236. {
  237.     if (time < intermission_exittime)
  238.         return;
  239.  
  240.     if (!self.button0 && !self.button1 && !self.button2)
  241.         return;
  242.     
  243.     ExitIntermission ();
  244. };
  245.  
  246. void() execute_changelevel =
  247. {
  248.     local entity    pos;
  249.  
  250.     intermission_running = 1;
  251.     
  252. // enforce a wait time before allowing changelevel
  253.     if (deathmatch)
  254.         intermission_exittime = time + 5;
  255.     else
  256.         intermission_exittime = time + 2;
  257.  
  258.     WriteByte (MSG_ALL, SVC_CDTRACK);
  259.     WriteByte (MSG_ALL, 3);
  260.     WriteByte (MSG_ALL, 3);
  261.     
  262.     pos = FindIntermission ();
  263.  
  264.     other = find (world, classname, "player");
  265.     while (other != world)
  266.     {
  267.         other.view_ofs = '0 0 0';
  268.         other.angles = other.v_angle = pos.mangle;
  269.         other.fixangle = TRUE;        // turn this way immediately
  270.         other.nextthink = time + 0.5;
  271.         other.takedamage = DAMAGE_NO;
  272.         other.solid = SOLID_NOT;
  273.         other.movetype = MOVETYPE_NONE;
  274.         other.modelindex = 0;
  275.         setorigin (other, pos.origin);
  276.         other = find (other, classname, "player");
  277.     }    
  278.  
  279.     WriteByte (MSG_ALL, SVC_INTERMISSION);
  280. };
  281.  
  282.  
  283. void() changelevel_touch =
  284. {
  285.     local entity    pos;
  286.  
  287.     if (other.classname != "player")
  288.         return;
  289.  
  290.     if (cvar("noexit"))
  291.     {
  292.         T_Damage (other, self, self, 50000);
  293.         return;
  294.     }
  295.     bprint (other.netname);
  296.     bprint (" exited the level\n");
  297.     
  298.     nextmap = self.map;
  299.  
  300.     SUB_UseTargets ();
  301.  
  302.     if ( (self.spawnflags & 1) && (deathmatch == 0) )
  303.     {    // NO_INTERMISSION
  304.         GotoNextMap();
  305.         return;
  306.     }
  307.     
  308.     self.touch = SUB_Null;
  309.  
  310. // we can't move people right now, because touch functions are called
  311. // in the middle of C movement code, so set a think time to do it
  312.     self.think = execute_changelevel;
  313.     self.nextthink = time + 0.1;
  314. };
  315.  
  316. /*QUAKED trigger_changelevel (0.5 0.5 0.5) ? NO_INTERMISSION
  317. When the player touches this, he gets sent to the map listed in the "map" variable.  Unless the NO_INTERMISSION flag is set, the view will go to the info_intermission spot and display stats.
  318. */
  319. void() trigger_changelevel =
  320. {
  321.     if (!self.map)
  322.         objerror ("chagnelevel trigger doesn't have map");
  323.     
  324.     InitTrigger ();
  325.     self.touch = changelevel_touch;
  326. };
  327.  
  328.  
  329. /*
  330. =============================================================================
  331.  
  332.                 PLAYER GAME EDGE FUNCTIONS
  333.  
  334. =============================================================================
  335. */
  336.  
  337. void() set_suicide_frame;
  338.  
  339. // called by ClientKill and DeadThink
  340. void() respawn =
  341. {
  342.     if (coop)
  343.     {
  344.         // make a copy of the dead body for appearances sake
  345.         CopyToBodyQue (self);
  346.         // get the spawn parms as they were at level start
  347.         setspawnparms (self);
  348.         // respawn        
  349.         PutClientInServer ();
  350.     }
  351.     else if (deathmatch)
  352.     {
  353.         // make a copy of the dead body for appearances sake
  354.         CopyToBodyQue (self);
  355.         // set default spawn parms
  356.         SetNewParms ();
  357.         // respawn        
  358.         PutClientInServer ();
  359.     }
  360.     else
  361.     {    // restart the entire server
  362.         localcmd ("restart\n");
  363.     }
  364. };
  365.  
  366.  
  367. /*
  368. ============
  369. ClientKill
  370.  
  371. Player entered the suicide command
  372. ============
  373. */
  374. void() ClientKill =
  375. {
  376.     bprint (self.netname);
  377.     bprint (" suicides\n");
  378.     set_suicide_frame ();
  379.     self.modelindex = modelindex_player;
  380.     self.frags = self.frags - 2;    // extra penalty
  381.     respawn ();
  382. };
  383.  
  384. float(vector v) CheckSpawnPoint =
  385. {
  386.     return FALSE;
  387. };
  388.  
  389. /*
  390. ============
  391. SelectSpawnPoint
  392.  
  393. Returns the entity to spawn at
  394. ============
  395. */
  396. entity() SelectSpawnPoint =
  397. {
  398.     local    entity spot;
  399.     
  400. // testinfo_player_start is only found in regioned levels
  401.     spot = find (world, classname, "testplayerstart");
  402.     if (spot)
  403.         return spot;
  404.         
  405. // choose a info_player_deathmatch point
  406.     if (coop)
  407.     {
  408.         lastspawn = find(lastspawn, classname, "info_player_coop");
  409.         if (lastspawn == world)
  410.             lastspawn = find (lastspawn, classname, "info_player_start");
  411.         if (lastspawn != world)
  412.             return lastspawn;
  413.     }
  414.     else if (deathmatch)
  415.     {
  416.         lastspawn = find(lastspawn, classname, "info_player_deathmatch");
  417.         if (lastspawn == world)
  418.             lastspawn = find (lastspawn, classname, "info_player_deathmatch");
  419.         if (lastspawn != world)
  420.             return lastspawn;
  421.     }
  422.  
  423.     if (serverflags)
  424.     {    // return with a rune to start
  425.         spot = find (world, classname, "info_player_start2");
  426.         if (spot)
  427.             return spot;
  428.     }
  429.     
  430.     spot = find (world, classname, "info_player_start");
  431.     if (!spot)
  432.         error ("PutClientInServer: no info_player_start on level");
  433.     
  434.     return spot;
  435. };
  436.  
  437. /*
  438. ===========
  439. PutClientInServer
  440.  
  441. called each time a player is spawned
  442. ============
  443. */
  444. void() DecodeLevelParms;
  445. void() PlayerDie;
  446.  
  447.  
  448. void() PutClientInServer =
  449. {
  450.     local    entity spot;
  451.  
  452.     self.classname = "player";
  453.     self.health = 100;
  454.     self.takedamage = DAMAGE_AIM;
  455.     self.solid = SOLID_SLIDEBOX;
  456.     self.movetype = MOVETYPE_WALK;
  457.     self.show_hostile = 0;
  458.     self.max_health = 100;
  459.     self.flags = FL_CLIENT;
  460.     self.air_finished = time + 12;
  461.     self.dmg = 2;           // initial water damage
  462.     self.super_damage_finished = 0;
  463.     self.radsuit_finished = 0;
  464.     self.invisible_finished = 0;
  465.     self.invincible_finished = 0;
  466.     self.effects = 0;
  467.     self.invincible_time = 0;
  468.  
  469.     DecodeLevelParms ();
  470.     
  471.     W_SetCurrentAmmo ();
  472.  
  473.     self.attack_finished = time;
  474.     self.th_pain = player_pain;
  475.     self.th_die = PlayerDie;
  476.     
  477.     self.deadflag = DEAD_NO;
  478. // paustime is set by teleporters to keep the player from moving a while
  479.     self.pausetime = 0;
  480.     
  481.     spot = SelectSpawnPoint ();
  482.  
  483.     self.origin = spot.origin + '0 0 1';
  484.     self.angles = spot.angles;
  485.     self.fixangle = TRUE;        // turn this way immediately
  486.  
  487. // oh, this is a hack!
  488.     setmodel (self, "progs/eyes.mdl");
  489.     modelindex_eyes = self.modelindex;
  490.  
  491.     setmodel (self, "progs/player.mdl");
  492.     modelindex_player = self.modelindex;
  493.  
  494.     setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
  495.     
  496.     self.view_ofs = '0 0 22';
  497.  
  498.     player_stand1 ();
  499.     
  500.     if (deathmatch || coop)
  501.     {
  502.         makevectors(self.angles);
  503.         spawn_tfog (self.origin + v_forward*20);
  504.     }
  505.  
  506.     spawn_tdeath (self.origin, self);
  507.  
  508.         
  509. };
  510.  
  511.  
  512. /*
  513. =============================================================================
  514.  
  515.                 QUAKED FUNCTIONS
  516.  
  517. =============================================================================
  518. */
  519.  
  520.  
  521. /*QUAKED info_player_start (1 0 0) (-16 -16 -24) (16 16 24)
  522. The normal starting point for a level.
  523. */
  524. void() info_player_start =
  525. {
  526. };
  527.  
  528.  
  529. /*QUAKED info_player_start2 (1 0 0) (-16 -16 -24) (16 16 24)
  530. Only used on start map for the return point from an episode.
  531. */
  532. void() info_player_start2 =
  533. {
  534. };
  535.  
  536.  
  537. /*
  538. saved out by quaked in region mode
  539. */
  540. void() testplayerstart =
  541. {
  542. };
  543.  
  544. /*QUAKED info_player_deathmatch (1 0 1) (-16 -16 -24) (16 16 24)
  545. potential spawning position for deathmatch games
  546. */
  547. void() info_player_deathmatch =
  548. {
  549. };
  550.  
  551. /*QUAKED info_player_coop (1 0 1) (-16 -16 -24) (16 16 24)
  552. potential spawning position for coop games
  553. */
  554. void() info_player_coop =
  555. {
  556. };
  557.  
  558. /*
  559. ===============================================================================
  560.  
  561. RULES
  562.  
  563. ===============================================================================
  564. */
  565.  
  566. void(entity c) PrintClientScore =
  567. {
  568.     if (c.frags > -10 && c.frags < 0)
  569.         bprint (" ");
  570.     else if (c.frags >= 0)
  571.     {
  572.         if (c.frags < 100)
  573.             bprint (" ");
  574.         if (c.frags < 10)
  575.             bprint (" ");
  576.     }
  577.     bprint (ftos(c.frags));
  578.     bprint (" ");
  579.     bprint (c.netname);
  580.     bprint ("\n");
  581. };
  582.  
  583. void() DumpScore =
  584. {
  585.     local entity    e, sort, walk;
  586.  
  587.     if (world.chain)
  588.         error ("DumpScore: world.chain is set");
  589.  
  590. // build a sorted lis
  591.     e = find(world, classname, "player");
  592.     sort = world;
  593.     while (e)
  594.     {
  595.         if (!sort)
  596.         {
  597.             sort = e;
  598.             e.chain = world;
  599.         }
  600.         else
  601.         {
  602.             if (e.frags > sort.frags)
  603.             {
  604.                 e.chain = sort;
  605.                 sort = e;
  606.             }
  607.             else
  608.             {
  609.                 walk = sort;
  610.                 do
  611.                 {
  612.                     if (!walk.chain)
  613.                     {
  614.                         e.chain = world;
  615.                         walk.chain = e;
  616.                     }
  617.                     else if (walk.chain.frags < e.frags)
  618.                     {
  619.                         e.chain = walk.chain;
  620.                         walk.chain = e;
  621.                     }
  622.                     else
  623.                         walk = walk.chain;
  624.                 } while (walk.chain != e);
  625.             }
  626.         }
  627.         
  628.         e = find(e, classname, "player");
  629.     }
  630.  
  631. // print the list
  632.     
  633.     bprint ("\n");    
  634.     while (sort)
  635.     {
  636.         PrintClientScore (sort);
  637.         sort = sort.chain;
  638.     }
  639.     bprint ("\n");
  640. };
  641.  
  642. /*
  643. go to the next level for deathmatch
  644. */
  645. void() NextLevel =
  646. {
  647.     local entity o;
  648.  
  649. // find a trigger changelevel
  650.     o = find(world, classname, "trigger_changelevel");
  651.     if (!o || mapname == "start")
  652.     {    // go back to same map if no trigger_changelevel
  653.         o = spawn();
  654.         o.map = mapname;
  655.     }
  656.  
  657.     nextmap = o.map;
  658.     
  659.     if (o.nextthink < time)
  660.     {
  661.         o.think = execute_changelevel;
  662.         o.nextthink = time + 0.1;
  663.     }
  664. };
  665.  
  666. /*
  667. ============
  668. CheckRules
  669.  
  670. Exit deathmatch games upon conditions
  671. ============
  672. */
  673. void() CheckRules =
  674. {
  675.     local    float        timelimit;
  676.     local    float        fraglimit;
  677.     
  678.     if (gameover)    // someone else quit the game already
  679.         return;
  680.         
  681.     timelimit = cvar("timelimit") * 60;
  682.     fraglimit = cvar("fraglimit");
  683.     
  684.     if (timelimit && time >= timelimit)
  685.     {
  686. NextLevel ();
  687. /*
  688.         gameover = TRUE;
  689.         bprint ("\n\n\n==============================\n");
  690.         bprint ("game exited after ");
  691.         bprint (ftos(timelimit/60));
  692.         bprint (" minutes\n");
  693.         DumpScore ();
  694.         localcmd ("killserver\n");
  695. */
  696.         return;
  697.     }
  698.     
  699.     if (fraglimit && self.frags >= fraglimit)
  700.     {
  701. NextLevel ();
  702. /*
  703.         gameover = TRUE;
  704.         bprint ("\n\n\n==============================\n");
  705.         bprint ("game exited after ");
  706.         bprint (ftos(self.frags));
  707.         bprint (" frags\n");
  708.         DumpScore ();
  709.         localcmd ("killserver\n");
  710. */
  711.         return;
  712.     }    
  713. };
  714.  
  715. //============================================================================
  716.  
  717. void() PlayerDeathThink =
  718. {
  719.     local entity    old_self;
  720.     local float        forward;
  721.  
  722.     if ((self.flags & FL_ONGROUND))
  723.     {
  724.         forward = vlen (self.velocity);
  725.         forward = forward - 20;
  726.         if (forward <= 0)
  727.             self.velocity = '0 0 0';
  728.         else    
  729.             self.velocity = forward * normalize(self.velocity);
  730.     }
  731.  
  732. // wait for all buttons released
  733.     if (self.deadflag == DEAD_DEAD)
  734.     {
  735.         if (self.button2 || self.button1 || self.button0)
  736.             return;
  737.         self.deadflag = DEAD_RESPAWNABLE;
  738. //                votehelp();                     //kb
  739.                 sprint(self,"Type \"votehelp\" for voting help.\n");
  740.  
  741.         return;
  742.     }
  743.  
  744.  
  745. // wait for any button down
  746.     if (!self.button2 && !self.button1 && !self.button0)
  747.         return;
  748.  
  749.     self.button0 = 0;
  750.     self.button1 = 0;
  751.     self.button2 = 0;
  752.     respawn();
  753. };
  754.  
  755.  
  756. void() PlayerJump =
  757. {
  758.     local vector start, end;
  759.     
  760.     if (self.flags & FL_WATERJUMP)
  761.         return;
  762.     
  763.     if (self.waterlevel >= 2)
  764.     {
  765.         if (self.watertype == CONTENT_WATER)
  766.             self.velocity_z = 100;
  767.         else if (self.watertype == CONTENT_SLIME)
  768.             self.velocity_z = 80;
  769.         else
  770.             self.velocity_z = 50;
  771.  
  772. // play swiming sound
  773.         if (self.swim_flag < time)
  774.         {
  775.             self.swim_flag = time + 1;
  776.             if (random() < 0.5)
  777.                 sound (self, CHAN_BODY, "misc/water1.wav", 1, ATTN_NORM);
  778.             else
  779.                 sound (self, CHAN_BODY, "misc/water2.wav", 1, ATTN_NORM);
  780.         }
  781.  
  782.         return;
  783.     }
  784.  
  785.     if (!(self.flags & FL_ONGROUND))
  786.         return;
  787.  
  788.     if ( !(self.flags & FL_JUMPRELEASED) )
  789.         return;        // don't pogo stick
  790.  
  791.     self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
  792.  
  793.     self.flags = self.flags - FL_ONGROUND;    // don't stairwalk
  794.     
  795.     self.button2 = 0;
  796. // player jumping sound
  797.     sound (self, CHAN_BODY, "player/plyrjmp8.wav", 1, ATTN_NORM);
  798.     self.velocity_z = self.velocity_z + 270;
  799. };
  800.  
  801.  
  802. /*
  803. ===========
  804. WaterMove
  805.  
  806. ============
  807. */
  808. .float    dmgtime;
  809.  
  810. void() WaterMove =
  811. {
  812. //dprint (ftos(self.waterlevel));
  813.     if (self.movetype == MOVETYPE_NOCLIP)
  814.         return;
  815.     if (self.health < 0)
  816.         return;
  817.  
  818.     if (self.waterlevel != 3)
  819.     {
  820.         if (self.air_finished < time)
  821.             sound (self, CHAN_VOICE, "player/gasp2.wav", 1, ATTN_NORM);
  822.         else if (self.air_finished < time + 9)
  823.             sound (self, CHAN_VOICE, "player/gasp1.wav", 1, ATTN_NORM);
  824.         self.air_finished = time + 12;
  825.         self.dmg = 2;
  826.     }
  827.     else if (self.air_finished < time)
  828.     {    // drown!
  829.         if (self.pain_finished < time)
  830.         {
  831.             self.dmg = self.dmg + 2;
  832.             if (self.dmg > 15)
  833.                 self.dmg = 10;
  834.             T_Damage (self, world, world, self.dmg);
  835.             self.pain_finished = time + 1;
  836.         }
  837.     }
  838.     
  839.     if (!self.waterlevel)
  840.     {
  841.         if (self.flags & FL_INWATER)
  842.         {    
  843.             // play leave water sound
  844.             sound (self, CHAN_BODY, "misc/outwater.wav", 1, ATTN_NORM);
  845.             self.flags = self.flags - FL_INWATER;
  846.         }
  847.         return;
  848.     }
  849.  
  850.     if (self.watertype == CONTENT_LAVA)
  851.     {    // do damage
  852.         if (self.dmgtime < time)
  853.         {
  854.             if (self.radsuit_finished > time)
  855.                 self.dmgtime = time + 1;
  856.             else
  857.                 self.dmgtime = time + 0.2;
  858.  
  859.             T_Damage (self, world, world, 10*self.waterlevel);
  860.         }
  861.     }
  862.     else if (self.watertype == CONTENT_SLIME)
  863.     {    // do damage
  864.         if (self.dmgtime < time && self.radsuit_finished < time)
  865.         {
  866.             self.dmgtime = time + 1;
  867.             T_Damage (self, world, world, 4*self.waterlevel);
  868.         }
  869.     }
  870.     
  871.     if ( !(self.flags & FL_INWATER) )
  872.     {    
  873.  
  874. // player enter water sound
  875.  
  876.         if (self.watertype == CONTENT_LAVA)
  877.             sound (self, CHAN_BODY, "player/inlava.wav", 1, ATTN_NORM);
  878.         if (self.watertype == CONTENT_WATER)
  879.             sound (self, CHAN_BODY, "player/inh2o.wav", 1, ATTN_NORM);
  880.         if (self.watertype == CONTENT_SLIME)
  881.             sound (self, CHAN_BODY, "player/slimbrn2.wav", 1, ATTN_NORM);
  882.  
  883.         self.flags = self.flags + FL_INWATER;
  884.         self.dmgtime = 0;
  885.     }
  886.     
  887.     if (! (self.flags & FL_WATERJUMP) )
  888.         self.velocity = self.velocity - 0.8*self.waterlevel*frametime*self.velocity;
  889. };
  890.  
  891. void() CheckWaterJump =
  892. {
  893.     local vector start, end;
  894.  
  895. // check for a jump-out-of-water
  896.     makevectors (self.angles);
  897.     start = self.origin;
  898.     start_z = start_z + 8; 
  899.     v_forward_z = 0;
  900.     normalize(v_forward);
  901.     end = start + v_forward*24;
  902.     traceline (start, end, TRUE, self);
  903.     if (trace_fraction < 1)
  904.     {    // solid at waist
  905.         start_z = start_z + self.maxs_z - 8;
  906.         end = start + v_forward*24;
  907.         self.movedir = trace_plane_normal * -50;
  908.         traceline (start, end, TRUE, self);
  909.         if (trace_fraction == 1)
  910.         {    // open at eye level
  911.             self.flags = self.flags | FL_WATERJUMP;
  912.             self.velocity_z = 225;
  913.             self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
  914.             self.teleport_time = time + 2;    // safety net
  915.             return;
  916.         }
  917.     }
  918. };
  919.  
  920.  
  921. /*
  922. ================
  923. PlayerPreThink
  924.  
  925. Called every frame before physics are run
  926. ================
  927. */
  928. void() PlayerPreThink =
  929. {
  930.     local    float    mspeed, aspeed;
  931.     local    float    r;
  932.  
  933.     if (intermission_running)
  934.     {
  935.         IntermissionThink ();    // otherwise a button could be missed between
  936.         return;                    // the think tics
  937.     }
  938.  
  939.     if (self.view_ofs == '0 0 0')
  940.         return;        // intermission or finale
  941.  
  942.     makevectors (self.v_angle);        // is this still used
  943.  
  944.     CheckRules ();
  945.     WaterMove ();
  946.  
  947.     if (self.waterlevel == 2)
  948.         CheckWaterJump ();
  949.  
  950.     if (self.deadflag >= DEAD_DEAD)
  951.     {
  952.         PlayerDeathThink ();
  953.         return;
  954.     }
  955.     
  956.     if (self.deadflag == DEAD_DYING)
  957.         return;    // dying, so do nothing
  958.  
  959.     if (self.button2)
  960.     {
  961.         PlayerJump ();
  962.     }
  963.     else
  964.         self.flags = self.flags | FL_JUMPRELEASED;
  965.  
  966. // teleporters can force a non-moving pause time    
  967.     if (time < self.pausetime)
  968.         self.velocity = '0 0 0';
  969.  
  970.  
  971.  if (self.showedmsg == 1)
  972.   {
  973.    connectmessage();      //kb
  974.    self.showedmsg = 0 ;
  975.   }
  976.  
  977.  
  978. };
  979.     
  980. /*
  981. ================
  982. CheckPowerups
  983.  
  984. Check for turning off powerups
  985. ================
  986. */
  987. void() CheckPowerups =
  988. {
  989.     if (self.health <= 0)
  990.         return;
  991.  
  992. // invisibility
  993.     if (self.invisible_finished)
  994.     {
  995. // sound and screen flash when items starts to run out
  996.         if (self.invisible_sound < time)
  997.         {
  998.             sound (self, CHAN_AUTO, "items/inv3.wav", 0.5, ATTN_IDLE);
  999.             self.invisible_sound = time + ((random() * 3) + 1);
  1000.         }
  1001.  
  1002.  
  1003.         if (self.invisible_finished < time + 3)
  1004.         {
  1005.             if (self.invisible_time == 1)
  1006.             {
  1007.                 sprint (self, "Ring of Shadows magic is fading\n");
  1008.                 stuffcmd (self, "bf\n");
  1009.                 sound (self, CHAN_AUTO, "items/inv2.wav", 1, ATTN_NORM);
  1010.                 self.invisible_time = time + 1;
  1011.             }
  1012.             
  1013.             if (self.invisible_time < time)
  1014.             {
  1015.                 self.invisible_time = time + 1;
  1016.                 stuffcmd (self, "bf\n");
  1017.             }
  1018.         }
  1019.  
  1020.         if (self.invisible_finished < time)
  1021.         {    // just stopped
  1022.             self.items = self.items - IT_INVISIBILITY;
  1023.             self.invisible_finished = 0;
  1024.             self.invisible_time = 0;
  1025.         }
  1026.         
  1027.     // use the eyes
  1028.         self.frame = 0;
  1029.         self.modelindex = modelindex_eyes;
  1030.     }
  1031.     else
  1032.         self.modelindex = modelindex_player;    // don't use eyes
  1033.  
  1034. // invincibility
  1035.     if (self.invincible_finished)
  1036.     {
  1037. // sound and screen flash when items starts to run out
  1038.         if (self.invincible_finished < time + 3)
  1039.         {
  1040.             if (self.invincible_time == 1)
  1041.             {
  1042.                 sprint (self, "Protection is almost burned out\n");
  1043.                 stuffcmd (self, "bf\n");
  1044.                 sound (self, CHAN_AUTO, "items/protect2.wav", 1, ATTN_NORM);
  1045.                 self.invincible_time = time + 1;
  1046.             }
  1047.             
  1048.             if (self.invincible_time < time)
  1049.             {
  1050.                 self.invincible_time = time + 1;
  1051.                 stuffcmd (self, "bf\n");
  1052.             }
  1053.         }
  1054.         
  1055.         if (self.invincible_finished < time)
  1056.         {    // just stopped
  1057.             self.items = self.items - IT_INVULNERABILITY;
  1058.             self.invincible_time = 0;
  1059.             self.invincible_finished = 0;
  1060.         }
  1061.         if (self.invincible_finished > time)
  1062.             self.effects = self.effects | EF_DIMLIGHT;
  1063.         else
  1064.             self.effects = self.effects - (self.effects & EF_DIMLIGHT);
  1065.     }
  1066.  
  1067. // super damage
  1068.     if (self.super_damage_finished)
  1069.     {
  1070.  
  1071. // sound and screen flash when items starts to run out
  1072.  
  1073.         if (self.super_damage_finished < time + 3)
  1074.         {
  1075.             if (self.super_time == 1)
  1076.             {
  1077.                 sprint (self, "Quad Damage is wearing off\n");
  1078.                 stuffcmd (self, "bf\n");
  1079.                 sound (self, CHAN_AUTO, "items/damage2.wav", 1, ATTN_NORM);
  1080.                 self.super_time = time + 1;
  1081.             }      
  1082.             
  1083.             if (self.super_time < time)
  1084.             {
  1085.                 self.super_time = time + 1;
  1086.                 stuffcmd (self, "bf\n");
  1087.             }
  1088.         }
  1089.  
  1090.         if (self.super_damage_finished < time)
  1091.         {    // just stopped
  1092.             self.items = self.items - IT_QUAD;
  1093.             self.super_damage_finished = 0;
  1094.             self.super_time = 0;
  1095.         }
  1096.         if (self.super_damage_finished > time)
  1097.             self.effects = self.effects | EF_DIMLIGHT;
  1098.         else
  1099.             self.effects = self.effects - (self.effects & EF_DIMLIGHT);
  1100.     }    
  1101.  
  1102. // suit    
  1103.     if (self.radsuit_finished)
  1104.     {
  1105.         self.air_finished = time + 12;        // don't drown
  1106.  
  1107. // sound and screen flash when items starts to run out
  1108.         if (self.radsuit_finished < time + 3)
  1109.         {
  1110.             if (self.rad_time == 1)
  1111.             {
  1112.                 sprint (self, "Air supply in Biosuit expiring\n");
  1113.                 stuffcmd (self, "bf\n");
  1114.                 sound (self, CHAN_AUTO, "items/suit2.wav", 1, ATTN_NORM);
  1115.                 self.rad_time = time + 1;
  1116.             }
  1117.             
  1118.             if (self.rad_time < time)
  1119.             {
  1120.                 self.rad_time = time + 1;
  1121.                 stuffcmd (self, "bf\n");
  1122.             }
  1123.         }
  1124.  
  1125.         if (self.radsuit_finished < time)
  1126.         {    // just stopped
  1127.             self.items = self.items - IT_SUIT;
  1128.             self.rad_time = 0;
  1129.             self.radsuit_finished = 0;
  1130.         }
  1131.     }    
  1132.  
  1133. };
  1134.  
  1135.  
  1136. /*
  1137. ================
  1138. PlayerPostThink
  1139.  
  1140. Called every frame after physics are run
  1141. ================
  1142. */
  1143. void() PlayerPostThink =
  1144. {
  1145.     local    float    mspeed, aspeed;
  1146.     local    float    r;
  1147.  
  1148.     if (self.view_ofs == '0 0 0')
  1149.         return;        // intermission or finale
  1150.     if (self.deadflag)
  1151.         return;
  1152.         
  1153. // do weapon stuff
  1154.  
  1155.     W_WeaponFrame ();
  1156.  
  1157. // check to see if player landed and play landing sound    
  1158.     if ((self.jump_flag < -300) && (self.flags & FL_ONGROUND) && (self.health > 0))
  1159.     {
  1160.         if (self.watertype == CONTENT_WATER)
  1161.             sound (self, CHAN_BODY, "player/h2ojump.wav", 1, ATTN_NORM);
  1162.         else if (self.jump_flag < -650)
  1163.         {
  1164.             T_Damage (self, world, world, 5); 
  1165.             sound (self, CHAN_VOICE, "player/land2.wav", 1, ATTN_NORM);
  1166.             self.deathtype = "falling";
  1167.         }
  1168.         else
  1169.             sound (self, CHAN_VOICE, "player/land.wav", 1, ATTN_NORM);
  1170.  
  1171.         self.jump_flag = 0;
  1172.     }
  1173.  
  1174.     if (!(self.flags & FL_ONGROUND))
  1175.         self.jump_flag = self.velocity_z;
  1176.  
  1177.     CheckPowerups ();
  1178.  
  1179.  
  1180. };
  1181.  
  1182.  
  1183. /*
  1184. ===========
  1185. ClientConnect
  1186.  
  1187. called when a player connects to a server
  1188. ============
  1189. */
  1190. void() ClientConnect =
  1191. {
  1192.     bprint (self.netname);
  1193.     bprint (" entered the game\n");
  1194.  
  1195.         regvoter(self);                             //kb
  1196.         self.showedmsg = 1 ;
  1197.  
  1198. // a client connecting during an intermission can cause problems
  1199.     if (intermission_running)
  1200.         ExitIntermission ();
  1201. };
  1202.  
  1203.  
  1204. /*
  1205. ===========
  1206. ClientDisconnect
  1207.  
  1208. called when a player disconnects from a server
  1209. ============
  1210. */
  1211. void() ClientDisconnect =
  1212. {
  1213.     if (gameover)
  1214.         return;
  1215.     // if the level end trigger has been activated, just return
  1216.     // since they aren't *really* leaving
  1217.  
  1218.     // let everyone else know
  1219.     bprint (self.netname);
  1220.     bprint (" left the game with ");
  1221.     bprint (ftos(self.frags));
  1222.     bprint (" frags\n");
  1223.     sound (self, CHAN_BODY, "player/tornoff2.wav", 1, ATTN_NONE);
  1224.     set_suicide_frame ();
  1225.  
  1226.  
  1227. }; //clientdisconnect
  1228.  
  1229. /*
  1230. ===========
  1231. ClientObituary
  1232.  
  1233. called when a player dies
  1234. ============
  1235. */
  1236. void(entity targ, entity attacker) ClientObituary =
  1237. {
  1238.     local    float rnum;
  1239.     local    string deathstring, deathstring2;
  1240.     rnum = random();
  1241.  
  1242.     if (targ.classname == "player")
  1243.     {
  1244.         if (attacker.classname == "teledeath")
  1245.         {
  1246.             bprint (targ.netname);
  1247.             bprint (" was telefragged by ");
  1248.             bprint (attacker.owner.netname);
  1249.             bprint ("\n");
  1250.  
  1251.             attacker.owner.frags = attacker.owner.frags + 1;
  1252.             return;
  1253.         }
  1254.  
  1255.         if (attacker.classname == "teledeath2")
  1256.         {
  1257.             bprint ("Satan's power deflects ");
  1258.             bprint (targ.netname);
  1259.             bprint ("'s telefrag\n");
  1260.  
  1261.             targ.frags = targ.frags - 1;
  1262.             return;
  1263.         }
  1264.  
  1265.         if (attacker.classname == "player")
  1266.         {
  1267.             if (targ == attacker)
  1268.             {
  1269.                 // killed self
  1270.                 attacker.frags = attacker.frags - 1;
  1271.                 bprint (targ.netname);
  1272.                 
  1273.                 if (targ.weapon == 64 && targ.waterlevel > 1)
  1274.                 {
  1275.                     bprint (" discharges into the water.\n");
  1276.                     return;
  1277.                 }
  1278.                 if (targ.weapon == 16)
  1279.                     bprint (" tries to put the pin back in\n");
  1280.                 else if (rnum)
  1281.                     bprint (" becomes bored with life\n");
  1282.                 else
  1283.                     bprint (" checks if his weapon is loaded\n");
  1284.                 return;
  1285.             }
  1286.             else
  1287.             {
  1288.                 attacker.frags = attacker.frags + 1;
  1289.  
  1290.                 rnum = attacker.weapon;
  1291.                 if (rnum == IT_AXE)
  1292.                 {
  1293.                     deathstring = " was ax-murdered by ";
  1294.                     deathstring2 = "\n";
  1295.                 }
  1296.                 if (rnum == IT_SHOTGUN)
  1297.                 {
  1298.                     deathstring = " chewed on ";
  1299.                     deathstring2 = "'s boomstick\n";
  1300.                 }
  1301.                 if (rnum == IT_SUPER_SHOTGUN)
  1302.                 {
  1303.                     deathstring = " ate 2 loads of ";
  1304.                     deathstring2 = "'s buckshot\n";
  1305.                 }
  1306.                 if (rnum == IT_NAILGUN)
  1307.                 {
  1308.                     deathstring = " was nailed by ";
  1309.                     deathstring2 = "\n";
  1310.                 }
  1311.                 if (rnum == IT_SUPER_NAILGUN)
  1312.                 {
  1313.                     deathstring = " was punctured by ";
  1314.                     deathstring2 = "\n";
  1315.                 }
  1316.                 if (rnum == IT_GRENADE_LAUNCHER)
  1317.                 {
  1318.                     deathstring = " eats ";
  1319.                     deathstring2 = "'s pineapple\n";
  1320.                     if (targ.health < -40)
  1321.                     {
  1322.                         deathstring = " was gibbed by ";
  1323.                         deathstring2 = "'s grenade\n";
  1324.                     }
  1325.                 }
  1326.                 if (rnum == IT_ROCKET_LAUNCHER)
  1327.                 {
  1328.                     deathstring = " rides ";
  1329.                     deathstring2 = "'s rocket\n";
  1330.                     if (targ.health < -40)
  1331.                     {
  1332.                         deathstring = " was gibbed by ";
  1333.                         deathstring2 = "'s rocket\n" ;
  1334.                     }
  1335.                 }
  1336.                 if (rnum == IT_LIGHTNING)
  1337.                 {
  1338.                     deathstring = " accepts ";
  1339.                     if (attacker.waterlevel > 1)
  1340.                         deathstring2 = "'s discharge\n";
  1341.                     else
  1342.                         deathstring2 = "'s shaft\n";
  1343.                 }
  1344.                 bprint (targ.netname);
  1345.                 bprint (deathstring);
  1346.                 bprint (attacker.netname);
  1347.                 bprint (deathstring2);
  1348.             }
  1349.             return;
  1350.         }
  1351.         else
  1352.         {
  1353.             targ.frags = targ.frags - 1;        // killed self
  1354.             rnum = targ.watertype;
  1355.  
  1356.             bprint (targ.netname);
  1357.             if (rnum == -3)
  1358.             {
  1359.                 if (random() < 0.5)
  1360.                     bprint (" sleeps with the fishes\n");
  1361.                 else
  1362.                     bprint (" sucks it down\n");
  1363.                 return;
  1364.             }
  1365.             else if (rnum == -4)
  1366.             {
  1367.                 if (random() < 0.5)
  1368.                     bprint (" gulped a load of slime\n");
  1369.                 else
  1370.                     bprint (" can't exist on slime alone\n");
  1371.                 return;
  1372.             }
  1373.             else if (rnum == -5)
  1374.             {
  1375.                 if (targ.health < -15)
  1376.                 {
  1377.                     bprint (" burst into flames\n");
  1378.                     return;
  1379.                 }
  1380.                 if (random() < 0.5)
  1381.                     bprint (" turned into hot slag\n");
  1382.                 else
  1383.                     bprint (" visits the Volcano God\n");
  1384.                 return;
  1385.             }
  1386.  
  1387.             if (attacker.flags & FL_MONSTER)
  1388.             {
  1389.                 if (attacker.classname == "monster_army")
  1390.                     bprint (" was shot by a Grunt\n");
  1391.                 if (attacker.classname == "monster_demon1")
  1392.                     bprint (" was eviscerated by a Fiend\n");
  1393.                 if (attacker.classname == "monster_dog")
  1394.                     bprint (" was mauled by a Rottweiler\n");
  1395.                 if (attacker.classname == "monster_dragon")
  1396.                     bprint (" was fried by a Dragon\n");
  1397.                 if (attacker.classname == "monster_enforcer")
  1398.                     bprint (" was blasted by an Enforcer\n");
  1399.                 if (attacker.classname == "monster_fish")
  1400.                     bprint (" was fed to the Rotfish\n");
  1401.                 if (attacker.classname == "monster_hell_knight")
  1402.                     bprint (" was slain by a Death Knight\n");
  1403.                 if (attacker.classname == "monster_knight")
  1404.                     bprint (" was slashed by a Knight\n");
  1405.                 if (attacker.classname == "monster_ogre")
  1406.                     bprint (" was destroyed by an Ogre\n");
  1407.                 if (attacker.classname == "monster_oldone")
  1408.                     bprint (" became one with Shub-Niggurath\n");
  1409.                 if (attacker.classname == "monster_shalrath")
  1410.                     bprint (" was exploded by a Vore\n");
  1411.                 if (attacker.classname == "monster_shambler")
  1412.                     bprint (" was smashed by a Shambler\n");
  1413.                 if (attacker.classname == "monster_tarbaby")
  1414.                     bprint (" was slimed by a Spawn\n");
  1415.                 if (attacker.classname == "monster_vomit")
  1416.                     bprint (" was vomited on by a Vomitus\n");
  1417.                 if (attacker.classname == "monster_wizard")
  1418.                     bprint (" was scragged by a Scrag\n");
  1419.                 if (attacker.classname == "monster_zombie")
  1420.                     bprint (" joins the Zombies\n");
  1421.  
  1422.                 return;
  1423.             }
  1424.             if (attacker.classname == "explo_box")
  1425.             {
  1426.                 bprint (" blew up\n");
  1427.                 return;
  1428.             }
  1429.             if (attacker.solid == SOLID_BSP && attacker != world)
  1430.             {    
  1431.                 bprint (" was squished\n");
  1432.                 return;
  1433.             }
  1434.             if (targ.deathtype == "falling")
  1435.             {
  1436.                 targ.deathtype = "";
  1437.                 bprint (" fell to his death\n");
  1438.                 return;
  1439.             }
  1440.             if (attacker.classname == "trap_shooter" || attacker.classname == "trap_spikeshooter")
  1441.             {
  1442.                 bprint (" was spiked\n");
  1443.                 return;
  1444.             }
  1445.             if (attacker.classname == "fireball")
  1446.             {
  1447.                 bprint (" ate a lavaball\n");
  1448.                 return;
  1449.             }
  1450.             if (attacker.classname == "trigger_changelevel")
  1451.             {
  1452.                 bprint (" tried to leave\n");
  1453.                                 bprint ("Server running QvoteV2.7.\n"); //kb
  1454.                                 return;
  1455.             }
  1456.  
  1457.  
  1458.                         bprint (" died\n");
  1459.         }
  1460.     }
  1461.  
  1462. };
  1463.