home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer 3.2 / 1997-05_Disc_3.2.iso / QUAKECTF / SRC / CTF / DEFS.QC < prev    next >
Text File  |  1997-02-02  |  25KB  |  949 lines

  1. /*
  2. ==============================================================================
  3.  
  4.             SOURCE FOR GLOBALVARS_T C STRUCTURE
  5.  
  6. ==============================================================================
  7. */
  8.  
  9. //
  10. // system globals
  11. //
  12. entity        self;
  13. entity        other;
  14. entity        world;
  15. float        time;
  16. float        frametime;
  17.  
  18. float        force_retouch;        // force all entities to touch triggers
  19.                                 // next frame.  this is needed because
  20.                                 // non-moving things don't normally scan
  21.                                 // for triggers, and when a trigger is
  22.                                 // created (like a teleport trigger), it
  23.                                 // needs to catch everything.
  24.                                 // decremented each frame, so set to 2
  25.                                 // to guarantee everything is touched
  26. string        mapname;
  27.  
  28. float        deathmatch;
  29. float        coop;
  30. float        teamplay;
  31.  
  32. float        serverflags;        // propagated from level to level, used to
  33.                                 // keep track of completed episodes
  34.  
  35. float        total_secrets;
  36. float        total_monsters;
  37.  
  38. float        found_secrets;        // number of secrets found
  39. float        killed_monsters;    // number of monsters killed
  40.  
  41.  
  42. // spawnparms are used to encode information about clients across server
  43. // level changes
  44. float        parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  45.  
  46. //
  47. // global variables set by built in functions
  48. //    
  49. vector        v_forward, v_up, v_right;    // set by makevectors()
  50.     
  51. // set by traceline / tracebox
  52. float        trace_allsolid;
  53. float        trace_startsolid;
  54. float        trace_fraction;
  55. vector        trace_endpos;
  56. vector        trace_plane_normal;
  57. float        trace_plane_dist;
  58. entity        trace_ent;
  59. float        trace_inopen;
  60. float        trace_inwater;
  61.  
  62. entity        msg_entity;                // destination of single entity writes
  63.  
  64. //
  65. // required prog functions
  66. //
  67. void()         main;                        // only for testing
  68.  
  69. void()        StartFrame;
  70.  
  71. void()         PlayerPreThink;
  72. void()         PlayerPostThink;
  73.  
  74. void()        ClientKill;
  75. void()        ClientConnect;
  76. void()         PutClientInServer;        // call after setting the parm1... parms
  77. void()        ClientDisconnect;
  78.  
  79. void()        SetNewParms;            // called when a client first connects to
  80.                                     // a server. sets parms so they can be
  81.                                     // saved off for restarts
  82.  
  83. void()        SetChangeParms;            // call to set parms for self so they can
  84.                                     // be saved for a level transition
  85.  
  86.  
  87. //================================================
  88. void        end_sys_globals;        // flag for structure dumping
  89. //================================================
  90.  
  91. /*
  92. ==============================================================================
  93.  
  94.             SOURCE FOR ENTVARS_T C STRUCTURE
  95.  
  96. ==============================================================================
  97. */
  98.  
  99. //
  100. // system fields (*** = do not set in prog code, maintained by C code)
  101. //
  102. .float        modelindex;        // *** model index in the precached list
  103. .vector        absmin, absmax;    // *** origin + mins / maxs
  104.  
  105. .float        ltime;            // local time for entity
  106. .float        movetype;
  107. .float        solid;
  108.  
  109. .vector        origin;            // ***
  110. .vector        oldorigin;        // ***
  111. .vector        velocity;
  112. .vector        angles;
  113. .vector        avelocity;
  114.  
  115. .vector        punchangle;        // temp angle adjust from damage or recoil
  116.  
  117. .string        classname;        // spawn function
  118. .string        model;
  119. .float        frame;
  120. .float        skin;
  121. .float        effects;
  122.  
  123. .vector        mins, maxs;        // bounding box extents reletive to origin
  124. .vector        size;            // maxs - mins
  125.  
  126. .void()        touch;
  127. .void()        use;
  128. .void()        think;
  129. .void()        blocked;        // for doors or plats, called when can't push other
  130.  
  131. .float        nextthink;
  132. .entity        groundentity;
  133.  
  134. // stats
  135. .float        health;
  136. .float        frags;
  137. .float        weapon;            // one of the IT_SHOTGUN, etc flags
  138. .string        weaponmodel;
  139. .float        weaponframe;
  140. .float        currentammo;
  141. .float        ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  142.  
  143. .float        items;            // bit flags
  144.  
  145. .float        takedamage;
  146. .entity        chain;
  147. .float        deadflag;
  148.  
  149. .vector        view_ofs;            // add to origin to get eye point
  150.  
  151.  
  152. .float        button0;        // fire
  153. .float        button1;        // use
  154. .float        button2;        // jump
  155.  
  156. .float        impulse;        // weapon changes
  157.  
  158. .float        fixangle;
  159. .vector        v_angle;        // view / targeting angle for players
  160. .float        idealpitch;        // calculated pitch angle for lookup up slopes
  161.  
  162.  
  163. .string        netname;
  164.  
  165. .entity     enemy;
  166.  
  167. .float        flags;
  168.  
  169. .float        colormap;
  170. .float        team;
  171.  
  172. .float        max_health;        // players maximum health is stored here
  173.  
  174. .float        teleport_time;    // don't back up
  175.  
  176. .float        armortype;        // save this fraction of incoming damage
  177. .float        armorvalue;
  178.  
  179. .float        waterlevel;        // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  180. .float        watertype;        // a contents value
  181.  
  182. .float        ideal_yaw;
  183. .float        yaw_speed;
  184.  
  185. .entity        aiment;
  186.  
  187. .entity     goalentity;        // a movetarget or an enemy
  188.  
  189. .float        spawnflags;
  190.  
  191. .string        target;
  192. .string        targetname;
  193.  
  194. // damage is accumulated through a frame. and sent as one single
  195. // message, so the super shotgun doesn't generate huge messages
  196. .float        dmg_take;
  197. .float        dmg_save;
  198. .entity        dmg_inflictor;
  199.  
  200. .entity        owner;        // who launched a missile
  201. .vector        movedir;    // mostly for doors, but also used for waterjump
  202.  
  203. .string        message;        // trigger messages
  204.  
  205. .float        sounds;        // either a cd track number or sound number
  206.  
  207. .string        noise, noise1, noise2, noise3;    // contains names of wavs to play
  208.  
  209. //================================================
  210. void        end_sys_fields;            // flag for structure dumping
  211. //================================================
  212.  
  213.  
  214. // CTFBOT [[[
  215.  
  216. //---------------------------------------------------
  217. // flags only
  218. float hook_use_enabled;
  219. float bots_have_normal_names;
  220. float smooth_move;
  221. float map_has_waypoints;
  222. float debug_markers_visible;
  223.  
  224. //---------------------------------------------------
  225. // candidates for deletion
  226. float next_bot_num;
  227.  
  228. //---------------------------------------------------
  229. // globals
  230. float bot_debug;
  231. float next_bot_red;
  232. float next_bot_blue;
  233.  
  234. float current_red_waypoint;
  235. float current_blue_waypoint;
  236. float current_waypoint;
  237.  
  238. float spawning_waypoints;
  239. float spawning_general_waypoints;
  240. float cur_bot_cpu;
  241.  
  242. entity wp_first;
  243. entity wp_last;
  244. .entity wp_chain;
  245.  
  246. /*
  247. entity wpheadred;            // doubly-linked list of red waypoints
  248. entity wpheadblue;            // doubly-linked list of red waypoints
  249. entity wpheadgeneral;        // doubly-linked list of red waypoints
  250. entity wptailred;            // doubly-linked list of red waypoints
  251. entity wptailblue;            // doubly-linked list of red waypoints
  252. entity wptailgeneral;        // doubly-linked list of red waypoints
  253. .entity wpprev;
  254. .entity wpnext;
  255. */
  256.  
  257. //---------------------------------------------------
  258. // global times
  259. float last_flag_capture;
  260. float last_flag_pickup;
  261. float last_capture_team;
  262. float last_pickup_team;
  263. float last_order_time_team1;
  264. float last_order_time_team2;
  265.  
  266. float bot_ping;
  267.  
  268. float level_over_time;
  269.  
  270. //---------------------------------------------------
  271. // player flags
  272. .float observer_flags;
  273.  
  274. //---------------------------------------------------
  275. // item flags
  276. .float bot_wants_item;        // optimization
  277.  
  278. //---------------------------------------------------
  279. // bot flags
  280.  
  281. //---------------------------------------------------
  282. // bot times
  283. .float escort_time;
  284. .float hook_snag_time;
  285. .float last_say;
  286. .float noticed_item_time;
  287. .float next_waypoint_time;
  288.  
  289. //---------------------------------------------------
  290. // bot follow ent
  291. /*
  292. .float last_follow_spawn;
  293. .float follow_num;
  294. .entity follow1;
  295. .entity follow2;
  296. .entity follow3;
  297. */
  298.  
  299. //---------------------------------------------------
  300. // bot fields
  301. .vector current_velocity;
  302. .float current_evade_yaw;
  303. .vector camping_spot;
  304. .float camping_time;
  305. .float last_see_camp_ent;
  306. .float bot_blocked;
  307. .float bsort;
  308.  
  309. .float bot_ignore_until_time;
  310. .float bot_ignore_team;
  311. .float large_dist_pulse;
  312. .float bogus_start;
  313. .float dynamically_created;
  314. .float spawn_time;
  315. .vector oldorigin;
  316. .float stuck_count;
  317. .float enemy_team;
  318. .float last_weapon_shot;
  319. .float hooked_on_someone;
  320. .entity bot_enemy;
  321. .float bot_plan;
  322.  
  323. .entity debug_marker;
  324. .entity camping_entity;
  325. .entity escort_entity;
  326.  
  327. .float enemy_notice_time;
  328. .vector bot_aim;
  329. .string altname;
  330. .string botname;
  331. .float rune_drop_time;
  332. .float last_rune;
  333. .float bot_action;    
  334. .float old_waterlevel;
  335. .float old_watertype;
  336. .vector spawnorigin;
  337. .float fire_hook_immediately;
  338.  
  339. //---------------------------------------------------
  340. // bot skill fields
  341. .float bot_skill;
  342. .float large_dist_pulse_items;
  343.  
  344. .float bsk_next_pulse_time;
  345. .float bsk_next_pulse_time_items;
  346. .float bsk_extra_large_pulse_dist;
  347. .float bsk_extra_awareness_dist;
  348. .float bsk_extra_jump_chance;
  349. .float bsk_move_while_firing;
  350. .float bot_skill_inverse;
  351. .float bsk_evade_chance;
  352. .float bsk_bot_fov;
  353. .float bsk_reaction_time;
  354.  
  355. .float bsk_skill_lin1;
  356. .float bsk_skill_lin2;
  357. .float bsk_skill_lin3;
  358.  
  359. float large_pulse_dist_base;
  360. float awareness_dist_base;
  361. float item_large_pulse_dist_base;
  362. float item_awareness_dist_base;
  363.  
  364. float large_pulse_dist;
  365. float awareness_dist;
  366. float item_large_pulse_dist;
  367. float item_awareness_dist;
  368.  
  369. .vector gib_velocity;
  370.  
  371. //---------------------------------------------------
  372. // waypoint fields
  373. .float waypoint_num;
  374. //---------------------------------------------------
  375. // extra frame move
  376. float use_extra_move_frame;
  377. .void() extramove_oldthink;
  378. .float extramove_yaw;
  379. .float extramove_dist;
  380. .float extramove_lastframewasextra;
  381.  
  382. /* BOTCAM
  383. //---------------------------------------------------
  384. // camera stuff
  385. float last_camera_update;
  386. float auto_camera_view;
  387. float auto_fov_control;
  388. entity cur_camera_watch_ent;
  389. entity last_camera_ent;
  390. */
  391.  
  392. entity goal_winner;        // INVASION
  393.  
  394. //---------------------------------------------------
  395. // detailed scores
  396. .float        num_kills;            // CTFBOT EXTRAS number of kills
  397. .float        num_deaths;            // CTFBOT EXTRAS number of deaths
  398. .float        num_suicides;        // CTFBOT EXTRAS number of suicides
  399. .float        num_captures;        // CTFBOT EXTRAS number of personal flag captures 
  400. .float         num_pickups;        // CTFBOT EXTRAS number of personal enemy flag pickups
  401. .float         num_recovery;        // CTFBOT EXTRAS number of flag recoveries
  402. .float         num_assists;        // CTFBOT EXTRAS number of assists
  403. .float         num_bonus;            // CTFBOT EXTRAS number of general bonuses
  404.  
  405. //---------------------------------------------------
  406. // unused
  407. //.float suspicious_about_time;
  408. //.vector suspicious_about;
  409.  
  410. // CTFBOT ]]]
  411.  
  412. /*
  413. ==============================================================================
  414.  
  415.                 VARS NOT REFERENCED BY C CODE
  416.  
  417. ==============================================================================
  418. */
  419.  
  420.  
  421. //
  422. // constants
  423. //
  424.  
  425. float    FALSE                    = 0;
  426. float     TRUE                    = 1;
  427.  
  428. // edict.flags
  429. float    FL_FLY                    = 1;
  430. float    FL_SWIM                    = 2;
  431. float    FL_CLIENT                = 8;    // set for all client edicts
  432. float    FL_INWATER                = 16;    // for enter / leave water splash
  433. float    FL_MONSTER                = 32;
  434. float    FL_GODMODE                = 64;    // player cheat
  435. float    FL_NOTARGET                = 128;    // player cheat
  436. float    FL_ITEM                    = 256;    // extra wide size for bonus items
  437. float    FL_ONGROUND                = 512;    // standing on something
  438. float    FL_PARTIALGROUND        = 1024;    // not all corners are valid
  439. float    FL_WATERJUMP            = 2048;    // player jumping out of water
  440. float    FL_JUMPRELEASED            = 4096;    // for jump debouncing
  441.  
  442. // edict.movetype values
  443. float    MOVETYPE_NONE            = 0;    // never moves
  444. //float    MOVETYPE_ANGLENOCLIP    = 1;
  445. //float    MOVETYPE_ANGLECLIP        = 2;
  446. float    MOVETYPE_WALK            = 3;    // players only
  447. float    MOVETYPE_STEP            = 4;    // discrete, not real time unless fall
  448. float    MOVETYPE_FLY            = 5;
  449. float    MOVETYPE_TOSS            = 6;    // gravity
  450. float    MOVETYPE_PUSH            = 7;    // no clip to world, push and crush
  451. float    MOVETYPE_NOCLIP            = 8;
  452. float    MOVETYPE_FLYMISSILE        = 9;    // fly with extra size against monsters
  453. float    MOVETYPE_BOUNCE            = 10;
  454. float    MOVETYPE_BOUNCEMISSILE    = 11;    // bounce with extra size
  455.  
  456. // edict.solid values
  457. float    SOLID_NOT                = 0;    // no interaction with other objects
  458. float    SOLID_TRIGGER            = 1;    // touch on edge, but not blocking
  459. float    SOLID_BBOX                = 2;    // touch on edge, block
  460. float    SOLID_SLIDEBOX            = 3;    // touch on edge, but not an onground
  461. float    SOLID_BSP                = 4;    // bsp clip, touch on edge, block
  462.  
  463. // range values
  464. float    RANGE_MELEE                = 0;
  465. float    RANGE_NEAR                = 1;
  466. float    RANGE_MID                = 2;
  467. float    RANGE_FAR                = 3;
  468.  
  469. // deadflag values
  470.  
  471. float    DEAD_NO                    = 0;
  472. float    DEAD_DYING                = 1;
  473. float    DEAD_DEAD                = 2;
  474. float    DEAD_RESPAWNABLE        = 3;
  475.  
  476. // takedamage values
  477.  
  478. float    DAMAGE_NO                = 0;
  479. float    DAMAGE_YES                = 1;
  480. float    DAMAGE_AIM                = 2;
  481.  
  482. // items
  483. float    IT_AXE                    = 4096;
  484. float    IT_SHOTGUN                = 1;
  485. float    IT_SUPER_SHOTGUN        = 2;
  486. float    IT_NAILGUN                = 4;
  487. float    IT_SUPER_NAILGUN        = 8;
  488. float    IT_GRENADE_LAUNCHER        = 16;
  489. float    IT_ROCKET_LAUNCHER        = 32;
  490. float    IT_LIGHTNING            = 64;
  491. float    IT_EXTRA_WEAPON            = 128;
  492.  
  493. float    IT_SHELLS                = 256;
  494. float    IT_NAILS                = 512;
  495. float    IT_ROCKETS                = 1024;
  496. float    IT_CELLS                = 2048;
  497.  
  498. float    IT_ARMOR1                = 8192;
  499. float    IT_ARMOR2                = 16384;
  500. float    IT_ARMOR3                = 32768;
  501. float    IT_SUPERHEALTH            = 65536;
  502.  
  503. float    IT_KEY1                    = 131072;
  504. float    IT_KEY2                    = 262144;
  505.  
  506. float    IT_INVISIBILITY            = 524288;
  507. float    IT_INVULNERABILITY        = 1048576;
  508. float    IT_SUIT                    = 2097152;
  509. float    IT_QUAD                    = 4194304;
  510. float    IT_HOOK                    = 8388608;
  511.  
  512. // point content values
  513.  
  514. float    CONTENT_EMPTY            = -1;
  515. float    CONTENT_SOLID            = -2;
  516. float    CONTENT_WATER            = -3;
  517. float    CONTENT_SLIME            = -4;
  518. float    CONTENT_LAVA            = -5;
  519. float    CONTENT_SKY                = -6;
  520.  
  521. float    STATE_TOP        = 0;
  522. float    STATE_BOTTOM    = 1;
  523. float    STATE_UP        = 2;
  524. float    STATE_DOWN        = 3;
  525.  
  526. vector    VEC_ORIGIN = '0 0 0';
  527. vector    VEC_HULL_MIN = '-16 -16 -24';
  528. vector    VEC_HULL_MAX = '16 16 32';
  529.  
  530. vector    VEC_HULL2_MIN = '-32 -32 -24';
  531. vector    VEC_HULL2_MAX = '32 32 64';
  532.  
  533. // protocol bytes
  534. float    SVC_TEMPENTITY        = 23;
  535. float    SVC_KILLEDMONSTER    = 27;
  536. float    SVC_FOUNDSECRET        = 28;
  537. float    SVC_INTERMISSION    = 30;
  538. float    SVC_FINALE            = 31;
  539. float    SVC_CDTRACK            = 32;
  540. float    SVC_SELLSCREEN        = 33;
  541.  
  542.  
  543. float    TE_SPIKE        = 0;
  544. float    TE_SUPERSPIKE    = 1;
  545. float    TE_GUNSHOT        = 2;
  546. float    TE_EXPLOSION    = 3;
  547. float    TE_TAREXPLOSION    = 4;
  548. float    TE_LIGHTNING1    = 5;
  549. float    TE_LIGHTNING2    = 6;
  550. float    TE_WIZSPIKE        = 7;
  551. float    TE_KNIGHTSPIKE    = 8;
  552. float    TE_LIGHTNING3    = 9;
  553. float    TE_LAVASPLASH    = 10;
  554. float    TE_TELEPORT        = 11;
  555.  
  556. // sound channels
  557. // channel 0 never willingly overrides
  558. // other channels (1-7) allways override a playing sound on that channel
  559. float    CHAN_AUTO        = 0;
  560. float    CHAN_WEAPON        = 1;
  561. float    CHAN_VOICE        = 2;
  562. float    CHAN_ITEM        = 3;
  563. float    CHAN_BODY        = 4;
  564.  
  565. float    ATTN_NONE        = 0;
  566. float    ATTN_NORM        = 1;
  567. float    ATTN_IDLE        = 2;
  568. float    ATTN_STATIC        = 3;
  569.  
  570. // update types
  571.  
  572. float    UPDATE_GENERAL    = 0;
  573. float    UPDATE_STATIC    = 1;
  574. float    UPDATE_BINARY    = 2;
  575. float    UPDATE_TEMP        = 3;
  576.  
  577. // entity effects
  578.  
  579. float    EF_BRIGHTFIELD    = 1;
  580. float    EF_MUZZLEFLASH     = 2;
  581. float    EF_BRIGHTLIGHT     = 4;
  582. float    EF_DIMLIGHT     = 8;
  583.  
  584.  
  585. // messages
  586. float    MSG_BROADCAST    = 0;        // unreliable to all
  587. float    MSG_ONE            = 1;        // reliable to one (msg_entity)
  588. float    MSG_ALL            = 2;        // reliable to all
  589. float    MSG_INIT        = 3;        // write to the init string
  590.  
  591. //================================================
  592.  
  593. //
  594. // globals
  595. //
  596. float    movedist;
  597. float    gameover;        // set when a rule exits
  598.  
  599. string    string_null;    // null string, nothing should be held here
  600. float    empty_float;
  601.  
  602. entity    newmis;            // launch_spike sets this after spawning it
  603.  
  604. entity    activator;        // the entity that activated a trigger or brush
  605.  
  606. entity    damage_attacker;    // set by T_Damage
  607. float    framecount;
  608.  
  609. float        skill;
  610.  
  611. entity    runespawn;
  612. float    runespawned;
  613. float    capturespawned;
  614. float    teamscored;        // non-zero if teams scored
  615.  
  616. //================================================
  617.  
  618. //
  619. // world fields (FIXME: make globals)
  620. //
  621. .string        wad;
  622. .string     map;
  623. .float        worldtype;    // 0=medieval 1=metal 2=base
  624.  
  625. //================================================
  626.  
  627. .string        killtarget;
  628.  
  629. //
  630. // quakeed fields
  631. //
  632. .float        light_lev;        // not used by game, but parsed by light util
  633. .float        style;
  634.  
  635.  
  636. //
  637. // monster ai
  638. //
  639. .void()        th_stand;
  640. .void()        th_walk;
  641. .void()        th_run;
  642. .void()        th_missile;
  643. .void()        th_melee;
  644. .void(entity attacker, float damage)        th_pain;
  645. .void()        th_die;
  646.  
  647. .entity        oldenemy;        // mad at this player before taking damage
  648.  
  649. .float        speed;
  650.  
  651. .float    lefty;
  652.  
  653. .float    search_time;
  654. .float    attack_state;
  655.  
  656. float    AS_STRAIGHT        = 1;
  657. float    AS_SLIDING        = 2;
  658. float    AS_MELEE        = 3;
  659. float    AS_MISSILE        = 4;
  660.  
  661. //
  662. // player only fields
  663. //
  664.  
  665. // *TEAMPLAY*
  666.  
  667. .float          lastteam;       // The last team this player was a member of.
  668.  
  669. // *XXX* EXPERT CTF ALTERNATE SCORING
  670.  
  671. // time values
  672.  
  673. .float         flag_since;         // how long a player has had the flag
  674. .float        last_returned_flag;     // last time player returned his own flag
  675. .float        last_fragged_carrier;     // last time player fragged a flag carrier
  676. .float        last_hurt_carrier;     // last time player hurt the flag carrier
  677.  
  678. // *XXX* end 
  679.  
  680. // OBSERVER
  681. .float observer;
  682. .float do_observer;
  683.  
  684. //ADMIN
  685. .float accesslvl; // current access level
  686. .float accessparm; // current access parm
  687.  
  688. .float        walkframe;
  689.  
  690. .float         attack_finished;
  691. .float        pain_finished;
  692. .float        hook_out;
  693.  
  694. .float        invincible_finished;
  695. .float        invisible_finished;
  696. .float        super_damage_finished;
  697. .float        radsuit_finished;
  698.  
  699. .float        invincible_time, invincible_sound;
  700. .float        invisible_time, invisible_sound;
  701. .float        super_time, super_sound;
  702. .float        regeneration_sound;//RUNE: Elder Magic
  703. .float        haste_sound;//RUNE: Hell Magic
  704. .float        rad_time;
  705. .float        fly_sound;
  706.  
  707. .float        axhitme;
  708.  
  709. .float        show_hostile;    // set to time+0.2 whenever a client fires a
  710.                             // weapon or takes damage.  Used to alert
  711.                             // monsters that otherwise would let the player go
  712. .float        jump_flag;        // player jump flag
  713. .float        swim_flag;        // player swimming sound flag
  714. .float        air_finished;    // when time > air_finished, start drowning
  715. .float        bubble_count;    // keeps track of the number of bubbles
  716. .string        deathtype;        // keeps track of how the player died
  717. .float         player_flag;    // misc flags (skins, etc.)
  718. .float        staydeadtime;    // how long we should stay dead
  719. .float        regen_time;        // time to next regen
  720. .float        rune_notice_time;    // last time we notified about multi-runes
  721.  
  722. // ZOID: Runes
  723. float        ITEM_RUNE1_FLAG        = 1;
  724. float        ITEM_RUNE2_FLAG        = 2;
  725. float        ITEM_RUNE3_FLAG        = 4;
  726. float        ITEM_RUNE4_FLAG        = 8;
  727. float        ITEM_RUNE_MASK        = 15;
  728.  
  729. // ZOID: Capture the flag
  730. float        ITEM_ENEMY_FLAG        = 16;
  731. // TEAMPLAY
  732. float        TEAM_STUFF_COLOR    = 32;
  733.  
  734. .float        motd_time;
  735. .float        motd_count;
  736.  
  737. .float        suicide_count;
  738. .float        killed;            // have we been killed yet
  739.  
  740. //McBain: PreviousWeaponCommand
  741. .float        previous_weapon;    // one of the IT_SHOTGUN, etc flags
  742.  
  743. //
  744. // object stuff
  745. //
  746. .string        mdl;
  747. .vector        mangle;            // angle at start
  748.  
  749. .vector        oldorigin;        // only used by secret door
  750.  
  751. .float        t_length, t_width;
  752.  
  753.  
  754. //
  755. // doors, etc
  756. //
  757. .vector        dest, dest1, dest2;
  758. .float        wait;            // time from firing to restarting
  759. .float        delay;            // time from activation to firing
  760. .entity        trigger_field;    // door's trigger entity
  761. .string        noise4;
  762.  
  763. //
  764. // monsters
  765. //
  766. .float         pausetime;
  767. .entity     movetarget;
  768.  
  769.  
  770. //
  771. // doors
  772. //
  773. .float        aflag;
  774. .float        dmg;            // damage done by door when hit
  775.     
  776. //
  777. // misc
  778. //
  779. .float        cnt;             // misc flag
  780.     
  781. //
  782. // subs
  783. //
  784. .void()        think1;
  785. .vector        finaldest, finalangle;
  786.  
  787. //
  788. // triggers
  789. //
  790. .float        count;            // for counting triggers
  791.  
  792.  
  793. //
  794. // plats / doors / buttons
  795. //
  796. .float        lip;
  797. .float        state;
  798. .vector        pos1, pos2;        // top and bottom positions
  799. .float        height;
  800.  
  801. //
  802. // sounds
  803. //
  804. .float        waitmin, waitmax;
  805. .float        distance;
  806. .float        volume;
  807.  
  808.  
  809.  
  810.  
  811. //===========================================================================
  812.     
  813.  
  814. //
  815. // builtin functions
  816. //
  817.  
  818. void(vector ang)    makevectors        = #1;        // sets v_forward, etc globals
  819. void(entity e, vector o) setorigin    = #2;
  820. void(entity e, string m) setmodel    = #3;        // set movetype and solid first
  821. void(entity e, vector min, vector max) setsize = #4;
  822. // #5 was removed
  823. void() break                        = #6;
  824. float() random                        = #7;        // returns 0 - 1
  825. void(entity e, float chan, string samp, float vol, float atten) sound = #8;
  826. vector(vector v) normalize            = #9;
  827. void(string e) error                = #10;
  828. void(string e) objerror                = #11;
  829. float(vector v) vlen                = #12;
  830. float(vector v) vectoyaw            = #13;
  831. entity() spawn                        = #14;
  832. void(entity e) remove                = #15;
  833.  
  834. // sets trace_* globals
  835. // nomonsters can be:
  836. // An entity will also be ignored for testing if forent == test,
  837. // forent->owner == test, or test->owner == forent
  838. // a forent of world is ignored
  839. void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
  840.  
  841. entity() checkclient                = #17;    // returns a client to look for
  842. entity(entity start, .string fld, string match) find = #18;
  843. string(string s) precache_sound        = #19;
  844. string(string s) precache_model        = #20;
  845. void(entity client, string s)stuffcmd = #21;
  846. entity(vector org, float rad) findradius = #22;
  847. void(string s) bprint                = #23;
  848. void(entity client, string s) sprint = #24;
  849. void(string s) dprint                = #25;
  850. string(float f) ftos                = #26;
  851. string(vector v) vtos                = #27;
  852. void() coredump                        = #28;        // prints all edicts
  853. void() traceon                        = #29;        // turns statment trace on
  854. void() traceoff                        = #30;
  855. void(entity e) eprint                = #31;        // prints an entire edict
  856. float(float yaw, float dist) walkmove    = #32;    // returns TRUE or FALSE
  857. // #33 was removed
  858. float(float yaw, float dist) droptofloor= #34;    // TRUE if landed on floor
  859. void(float style, string value) lightstyle = #35;
  860. float(float v) rint                    = #36;        // round to nearest int
  861. float(float v) floor                = #37;        // largest integer <= v
  862. float(float v) ceil                    = #38;        // smallest integer >= v
  863. // #39 was removed
  864. float(entity e) checkbottom            = #40;        // true if self is on ground
  865. float(vector v) pointcontents        = #41;        // returns a CONTENT_*
  866. // #42 was removed
  867. float(float f) fabs = #43;
  868. vector(entity e, float speed) aim = #44;        // returns the shooting vector
  869. float(string s) cvar = #45;                        // return cvar.value
  870. void(string s) localcmd = #46;                    // put string into local que
  871. entity(entity e) nextent = #47;                    // for looping through all ents
  872. void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
  873. void() ChangeYaw = #49;                        // turn towards self.ideal_yaw
  874.                                             // at self.yaw_speed
  875. // #50 was removed
  876. vector(vector v) vectoangles            = #51;
  877.  
  878. //
  879. // direct client message generation
  880. //
  881. void(float to, float f) WriteByte        = #52;
  882. void(float to, float f) WriteChar        = #53;
  883. void(float to, float f) WriteShort        = #54;
  884. void(float to, float f) WriteLong        = #55;
  885. void(float to, float f) WriteCoord        = #56;
  886. void(float to, float f) WriteAngle        = #57;
  887. void(float to, string s) WriteString    = #58;
  888. void(float to, entity s) WriteEntity    = #59;
  889.  
  890. //
  891. // broadcast client message generation
  892. //
  893.  
  894. // void(float f) bWriteByte        = #59;
  895. // void(float f) bWriteChar        = #60;
  896. // void(float f) bWriteShort        = #61;
  897. // void(float f) bWriteLong        = #62;
  898. // void(float f) bWriteCoord        = #63;
  899. // void(float f) bWriteAngle        = #64;
  900. // void(string s) bWriteString    = #65;
  901. // void(entity e) bWriteEntity = #66;
  902.  
  903. void(float step) movetogoal                = #67;
  904.  
  905. string(string s) precache_file        = #68;    // no effect except for -copy
  906. void(entity e) makestatic        = #69;
  907. void(string s) changelevel = #70;
  908.  
  909. //#71 was removed
  910.  
  911. void(string var, string val) cvar_set = #72;    // sets cvar.value
  912.  
  913. void(entity client, string s) centerprint = #73;    // sprint, but in middle
  914.  
  915. void(vector pos, string samp, float vol, float atten) ambientsound = #74;
  916.  
  917. string(string s) precache_model2    = #75;        // registered version only
  918. string(string s) precache_sound2    = #76;        // registered version only
  919. string(string s) precache_file2        = #77;        // registered version only
  920.  
  921. void(entity e) setspawnparms        = #78;        // set parm1... to the
  922.                                                 // values at level start
  923.                                                 // for coop respawn
  924.  
  925. //============================================================================
  926.  
  927. //
  928. // subs.qc
  929. //
  930. void(vector tdest, float tspeed, void() func) SUB_CalcMove;
  931. void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt;
  932. void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove;
  933. void()  SUB_CalcMoveDone;
  934. void() SUB_CalcAngleMoveDone;
  935. void() SUB_Null;
  936. void() SUB_UseTargets;
  937. void() SUB_Remove;
  938.  
  939. //
  940. //    combat.qc
  941. //
  942. void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
  943.  
  944.  
  945. float (entity e, float healamount, float ignore) T_Heal; // health function
  946.  
  947. float(entity targ, entity inflictor) CanDamage;
  948.  
  949.