Guest User

Untitled

a guest
May 9th, 2021
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.46 KB | None | 0 0
  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. .float items2;
  214. //.float new_weapon;
  215. //.float new_items;
  216. .float ammo_shells1, ammo_nails1, ammo_rockets1, ammo_cells1;
  217. .float ammo_lava_nails;
  218. .float ammo_multi_rockets;
  219. .float ammo_plasma;
  220. .float gravity;
  221. /*
  222. ==============================================================================
  223.  
  224. VARS NOT REFERENCED BY C CODE
  225.  
  226. ==============================================================================
  227. */
  228.  
  229. string version = "\npViolent Rumble \nBeta 1"; // inspired by Copper
  230.  
  231. //
  232. // constants
  233. //
  234.  
  235. float FALSE = 0;
  236. float TRUE = 1;
  237.  
  238. // worldtype values
  239. float WORLDTYPE_MEDIEVAL = 0;
  240. float WORLDTYPE_METAL = 1;
  241. float WORLDTYPE_BASE = 2;
  242.  
  243. // edict.flags
  244. float FL_FLY = 1;
  245. float FL_SWIM = 2;
  246. float FL_CLIENT = 8; // set for all client edicts
  247. float FL_INWATER = 16; // for enter / leave water splash
  248. float FL_MONSTER = 32;
  249. float FL_GODMODE = 64; // player cheat
  250. float FL_NOTARGET = 128; // player cheat
  251. float FL_ITEM = 256; // extra wide size for bonus items
  252. float FL_ONGROUND = 512; // standing on something
  253. float FL_PARTIALGROUND = 1024; // not all corners are valid
  254. float FL_WATERJUMP = 2048; // player jumping out of water
  255. float FL_JUMPRELEASED = 4096; // for jump debouncing
  256.  
  257. // edict.movetype values
  258. float MOVETYPE_NONE = 0; // never moves
  259. //float MOVETYPE_ANGLENOCLIP = 1;
  260. //float MOVETYPE_ANGLECLIP = 2;
  261. float MOVETYPE_WALK = 3; // players only
  262. float MOVETYPE_STEP = 4; // discrete, not real time unless fall
  263. float MOVETYPE_FLY = 5;
  264. float MOVETYPE_TOSS = 6; // gravity
  265. float MOVETYPE_PUSH = 7; // no clip to world, push and crush
  266. float MOVETYPE_NOCLIP = 8;
  267. float MOVETYPE_FLYMISSILE = 9; // fly with extra size against monsters
  268. float MOVETYPE_BOUNCE = 10;
  269. float MOVETYPE_BOUNCEMISSILE = 11; // bounce with extra size
  270.  
  271. // edict.solid values
  272. float SOLID_NOT = 0; // no interaction with other objects
  273. float SOLID_TRIGGER = 1; // touch on edge, but not blocking
  274. float SOLID_BBOX = 2; // touch on edge, block
  275. float SOLID_SLIDEBOX = 3; // touch on edge, but not an onground
  276. float SOLID_BSP = 4; // bsp clip, touch on edge, block
  277.  
  278. // range values
  279. float RANGE_MELEE = 0;
  280. float RANGE_NEAR = 1;
  281. float RANGE_MID = 2;
  282. float RANGE_FAR = 3;
  283.  
  284. // deadflag values
  285.  
  286. float DEAD_NO = 0;
  287. float DEAD_DYING = 1;
  288. float DEAD_DEAD = 2;
  289. float DEAD_RESPAWNABLE = 3;
  290.  
  291. // takedamage values
  292.  
  293. float DAMAGE_NO = 0;
  294. float DAMAGE_YES = 1;
  295. float DAMAGE_AIM = 2;
  296.  
  297. // items
  298. float IT_AXE = 2048;
  299. float IT_SHOTGUN = 1;
  300. float IT_SUPER_SHOTGUN = 2;
  301. float IT_NAILGUN = 4;
  302. float IT_SUPER_NAILGUN = 8;
  303. float IT_GRENADE_LAUNCHER = 16;
  304. float IT_ROCKET_LAUNCHER = 32;
  305. float IT_LIGHTNING = 64;
  306. //float IT_EXTRA_WEAPON = 128;
  307.  
  308.  
  309. //moved to items 2
  310. //float IT_SHELLS = 128;
  311. //float IT_NAILS = 256;
  312. //float IT_ROCKETS = 512;
  313. //float IT_CELLS = 1024;
  314.  
  315.  
  316.  
  317. float IT_LAVA_NAILGUN = 4096;
  318. float IT_LAVA_SUPER_NAILGUN = 8192;
  319. float IT_MULTI_GRENADE = 16384; //15
  320. float IT_MULTI_ROCKET = 32768;
  321. float IT_PLASMA_GUN = 65536;
  322. float IT_MJOLNIR = 128;
  323. float IT_LASER_CANNON = 256;
  324. float IT_PROXIMITY_GUN = 512;
  325.  
  326.  
  327.  
  328. //moved to items 2
  329. //float IT_ARMOR1 = 8192;
  330. //float IT_ARMOR2 = 16384;
  331. //float IT_ARMOR3 = 32768;
  332. //float IT_SUPERHEALTH = 65536;
  333.  
  334. float IT_KEY1 = 131072;
  335. float IT_KEY2 = 262144;
  336.  
  337. float IT_INVISIBILITY = 524288;
  338. float IT_INVULNERABILITY = 1048576;
  339. float IT_SUIT = 2097152;
  340. float IT_QUAD = 4194304;
  341. //ZOID --
  342. float IT_GRAPPLE = 1024;
  343. //-- ZOID
  344.  
  345. //fall under items2 and therefore have a different set of bitflags... god this shit is autistic
  346. float IT2_ARMOR1 = 1;
  347. float IT2_ARMOR2 = 2;
  348. float IT2_ARMOR3 = 4;
  349. float IT2_LAVA_NAILS = 8;
  350. float IT2_PLASMA_AMMO = 16;
  351. float IT2_MULTI_ROCKETS = 32;
  352. float IT2_SHIELD = 64;
  353. float IT2_ANTIGRAV = 128;
  354. float IT2_SUPERHEALTH = 256;
  355. float HIP_IT_WETSUIT = 512;
  356. float HIP_IT_EMPATHY_SHIELDS = 1024;
  357. float HIP_IT_HORN_OF_CONJURING = 2048;
  358. float IT2_SHELLS = 4096;
  359. float IT2_NAILS = 8192;
  360. float IT2_ROCKETS = 16384;
  361. float IT2_CELLS = 32768;
  362. float IT2_JBOOTS = 65536; //JCR's super jump boots
  363.  
  364. //float IT2_EARTHQUAKE = 512;
  365. //float IT2_V_SPHERE = 1024;
  366.  
  367. // point content values
  368.  
  369. float CONTENT_EMPTY = -1;
  370. float CONTENT_SOLID = -2;
  371. float CONTENT_WATER = -3;
  372. float CONTENT_SLIME = -4;
  373. float CONTENT_LAVA = -5;
  374. float CONTENT_SKY = -6;
  375.  
  376. float STATE_TOP = 0;
  377. float STATE_BOTTOM = 1;
  378. float STATE_UP = 2;
  379. float STATE_DOWN = 3;
  380.  
  381. vector VEC_ORIGIN = '0 0 0';
  382. vector VEC_HULL_MIN = '-16 -16 -24';
  383. vector VEC_HULL_MAX = '16 16 32';
  384. vector VEC_HULL_SIZE = '32 32 56';
  385. vector VEC_HULL2_MIN = '-32 -32 -24';
  386. vector VEC_HULL2_MAX = '32 32 64';
  387. vector VEC_HULL2_SIZE = '64 64 88';
  388.  
  389. // protocol bytes
  390. float SVC_UPDATESTAT = 3; // pgm black magic
  391. float SVC_SETVIEWPORT = 5; // -> Camera <- Hipnotic Drake devkit -- dumptruck_ds
  392. float SVC_SETVIEWANGLES = 10; // -> Camera <- Hipnotic Drake devkit -- dumptruck_ds
  393. float SVC_TEMPENTITY = 23;
  394. float SVC_KILLEDMONSTER = 27;
  395. float SVC_FOUNDSECRET = 28;
  396. float SVC_INTERMISSION = 30;
  397. float SVC_FINALE = 31;
  398. float SVC_CDTRACK = 32;
  399. float SVC_SELLSCREEN = 33;
  400. float SVC_CUTSCENE = 34; // Hipnotic Drake devkit -- dumptruck_ds
  401.  
  402. float STAT_TOTALMONSTERS = 12; // pgm black magic
  403.  
  404.  
  405.  
  406. float TE_SPIKE = 0;
  407. float TE_SUPERSPIKE = 1;
  408. float TE_GUNSHOT = 2;
  409. float TE_EXPLOSION = 3;
  410. float TE_EXPLOSION2 = 12; // from doe -- dumptruck_ds
  411. float TE_TAREXPLOSION = 4;
  412. float TE_LIGHTNING1 = 5;
  413. float TE_LIGHTNING2 = 6;
  414. float TE_WIZSPIKE = 7;
  415. float TE_KNIGHTSPIKE = 8;
  416. float TE_LIGHTNING3 = 9;
  417. float TE_LAVASPLASH = 10;
  418. float TE_TELEPORT = 11;
  419. float TE_BEAM = 13;
  420. float TE_DGUARDBALL = 14;
  421.  
  422. // sound channels
  423. // channel 0 never willingly overrides
  424. // other channels (1-7) always override a playing sound on that channel
  425. float CHAN_AUTO = 0;
  426. float CHAN_WEAPON = 1;
  427. float CHAN_VOICE = 2;
  428. float CHAN_ITEM = 3;
  429. float CHAN_BODY = 4;
  430.  
  431. float ATTN_NONE = 0;
  432. float ATTN_NORM = 1;
  433. float ATTN_IDLE = 2;
  434. float ATTN_STATIC = 3;
  435.  
  436. // update types
  437.  
  438. float UPDATE_GENERAL = 0;
  439. float UPDATE_STATIC = 1;
  440. float UPDATE_BINARY = 2;
  441. float UPDATE_TEMP = 3;
  442.  
  443. // entity effects
  444.  
  445. float EF_BRIGHTFIELD = 1;
  446. float EF_MUZZLEFLASH = 2;
  447. float EF_BRIGHTLIGHT = 4;
  448. float EF_DIMLIGHT = 8;
  449.  
  450.  
  451. // messages
  452. float MSG_BROADCAST = 0; // unreliable to all
  453. float MSG_ONE = 1; // reliable to one (msg_entity)
  454. float MSG_ALL = 2; // reliable to all
  455. float MSG_INIT = 3; // write to the init string
  456.  
  457. // spawnflags for func_movewall
  458. float MOVEWALL_VISIBLE = 1;
  459. float MOVEWALL_TOUCH = 2;
  460. float MOVEWALL_NONBLOCKING = 4;
  461.  
  462. // known_release values -- iw
  463. float KNOWN_RELEASE_NOT = 0;
  464. float KNOWN_RELEASE_ID1 = 1;
  465. float KNOWN_RELEASE_FUNC_MAPJAMX = 2;
  466.  
  467. //================================================
  468.  
  469. //
  470. // globals
  471. //
  472. float movedist;
  473. float gameover; // set when a rule exits
  474.  
  475. string string_null; // null string, nothing should be held here
  476. //float empty_float;
  477.  
  478. entity newmis; // launch_spike sets this after spawning it
  479.  
  480. entity activator; // the entity that activated a trigger or brush
  481.  
  482. entity damage_attacker; // set by T_Damage
  483. float framecount;
  484.  
  485. float skill;
  486.  
  487. float known_release; // unique id for a release; see values above -- iw
  488.  
  489. //================================================
  490.  
  491. //
  492. // world fields (FIXME: make globals)
  493. //
  494. .string wad;
  495. .string map;
  496. .float worldtype; // 0=medieval 1=metal 2=base
  497.  
  498. //================================================
  499.  
  500. .string killtarget;
  501.  
  502. //
  503. // quakeed fields
  504. //
  505. .float light_lev; // not used by game, but parsed by light util
  506. .float style;
  507.  
  508.  
  509. //
  510. // monster ai
  511. //
  512. .void() th_stand;
  513. .void() th_walk;
  514. .void() th_run;
  515. .void() th_missile;
  516. .void() th_melee;
  517. .void() th_charge;
  518. .void(entity attacker, float damage) th_pain;
  519. .void() th_die;
  520.  
  521. .entity oldenemy; // mad at this player before taking damage
  522.  
  523. .float speed;
  524.  
  525. .float lefty;
  526.  
  527. .float search_time;
  528. .float attack_state;
  529.  
  530. float AS_STRAIGHT = 1;
  531. float AS_SLIDING = 2;
  532. float AS_MELEE = 3;
  533. float AS_MISSILE = 4;
  534.  
  535. //
  536. // player only fields
  537. //
  538. .float walkframe;
  539.  
  540. .float attack_finished;
  541. .float pain_finished;
  542.  
  543. .float invincible_finished;
  544. .float invisible_finished;
  545. .float super_damage_finished;
  546. .float radsuit_finished;
  547.  
  548. .float invincible_time, invincible_sound;
  549. .float invisible_time, invisible_sound;
  550. .float super_time, super_sound;
  551. .float rad_time;
  552. .float fly_sound;
  553.  
  554. .float shield_finished, antigrav_finished;
  555. .float shield_time, antigrav_time;
  556. .entity shield_entity;
  557. .float axhitme;
  558.  
  559. .float show_hostile; // set to time+0.2 whenever a client fires a
  560. // weapon or takes damage. Used to alert
  561. // monsters that otherwise would let the player go
  562. .float jump_flag; // player jump flag
  563. .float swim_flag; // player swimming sound flag
  564. .float air_finished; // when time > air_finished, start drowning
  565. .float bubble_count; // keeps track of the number of bubbles
  566. .string deathtype; // keeps track of how the player died
  567.  
  568. //
  569. // object stuff
  570. //
  571. .string mdl;
  572. .vector mangle; // angle at start
  573.  
  574. .vector oldorigin; // only used by secret door
  575.  
  576. .float t_length, t_width;
  577.  
  578.  
  579. //
  580. // doors, etc
  581. //
  582. .vector dest, dest1, dest2;
  583. .float wait; // time from firing to restarting
  584. .float delay; // time from activation to firing
  585. .entity trigger_field; // door's trigger entity
  586. .string noise4;
  587.  
  588. //
  589. // monsters
  590. //
  591. .float pausetime;
  592. .entity movetarget;
  593.  
  594.  
  595. //
  596. // doors
  597. //
  598. .float aflag;
  599. .float dmg; // damage done by door when hit
  600.  
  601. //
  602. // misc
  603. //
  604. .float cnt; // misc flag
  605.  
  606. //
  607. // subs
  608. //
  609. .void() think1;
  610. .vector finaldest, finalangle;
  611.  
  612. //
  613. // triggers
  614. //
  615. .float count; // for counting triggers
  616.  
  617.  
  618. //
  619. // plats / doors / buttons
  620. //
  621. .float lip;
  622. .float state;
  623. .vector pos1, pos2; // top and bottom positions
  624. .float height;
  625.  
  626. //
  627. // sounds
  628. //
  629. .float waitmin, waitmax;
  630. .float distance;
  631. .float volume;
  632.  
  633.  
  634. //
  635. // support for item_key_custom -- iw
  636. //
  637. .string keyname;
  638. .float customkeys;
  639.  
  640. //
  641. // dragon specific fields
  642. //
  643. .float playerInRoom;
  644. .float playerInTransit;
  645. .float dragonInRoom;
  646. .float dragonInTransit;
  647. .float dragonAttacking;
  648. .float dragonPainSequence;
  649. .vector dragonLastVelocity;
  650.  
  651. //
  652. // Other Rogue Fields
  653. //
  654. .float AGping;
  655. .float childrenSpawned;
  656. .float ltrailLastUsed;
  657. .float shield_death_time;
  658. .float shieldSoundTime;
  659. .float dragonDeathState;
  660. .float orbitPosition;
  661.  
  662. // variables for enhanced triggering from Custents - dumptruck_ds
  663. .string target2; // second target's name
  664. .string target3; // third target's name
  665. .string target4; // fourth target's name
  666. .string targetname2; // second name
  667. .string targetname3; // third name
  668. .string targetname4; // fourth name
  669. .string killtarget2; // second target to kill
  670. string lastnameused; // the targetname that was last used to trigger somthing
  671.  
  672.  
  673. //===========================================================================
  674.  
  675.  
  676. //
  677. // builtin functions
  678. //
  679.  
  680. void(vector ang) makevectors = #1; // sets v_forward, etc globals
  681. void(entity e, vector o) setorigin = #2;
  682. void(entity e, string m) setmodel = #3; // set movetype and solid first
  683. void(entity e, vector min, vector max) setsize = #4;
  684. // #5 was removed
  685. void() break = #6;
  686. float() random = #7; // returns 0 - 1
  687. void(entity e, float chan, string samp, float vol, float atten) sound = #8;
  688. vector(vector v) normalize = #9;
  689. void(string e) error = #10;
  690. void(string e) objerror = #11;
  691. float(vector v) vlen = #12;
  692. float(vector v) vectoyaw = #13;
  693. entity() spawn = #14;
  694. void(entity e) remove = #15;
  695.  
  696. // sets trace_* globals
  697. // nomonsters can be:
  698. // An entity will also be ignored for testing if forent == test,
  699. // forent->owner == test, or test->owner == forent
  700. // a forent of world is ignored
  701. void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;
  702.  
  703. entity() checkclient = #17; // returns a client to look for
  704. entity(entity start, .string fld, string match) find = #18;
  705. string(string s) precache_sound = #19;
  706. string(string s) precache_model = #20;
  707. void(entity client, string s)stuffcmd = #21;
  708. entity(vector org, float rad) findradius = #22;
  709. void(string s) bprint = #23;
  710. void(entity client, string s) sprint = #24;
  711. void(string s) dprint = #25;
  712. string(float f) ftos = #26;
  713. string(vector v) vtos = #27;
  714. void() coredump = #28; // prints all edicts
  715. void() traceon = #29; // turns statment trace on
  716. void() traceoff = #30;
  717. void(entity e) eprint = #31; // prints an entire edict
  718. float(float yaw, float dist) walkmove = #32; // returns TRUE or FALSE
  719. // #33 was removed
  720. float(float yaw, float dist) droptofloor= #34; // TRUE if landed on floor
  721. void(float style, string value) lightstyle = #35;
  722. float(float v) rint = #36; // round to nearest int
  723. float(float v) floor = #37; // largest integer <= v
  724. float(float v) ceil = #38; // smallest integer >= v
  725. // #39 was removed
  726. float(entity e) checkbottom = #40; // true if self is on ground
  727. float(vector v) pointcontents = #41; // returns a CONTENT_*
  728. // #42 was removed
  729. float(float f) fabs = #43;
  730. vector(entity e, float speed) aim = #44; // returns the shooting vector
  731. float(string s) cvar = #45; // return cvar.value
  732. void(string s) localcmd = #46; // put string into local que
  733. entity(entity e) nextent = #47; // for looping through all ents
  734. void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
  735. void() ChangeYaw = #49; // turn towards self.ideal_yaw
  736. // at self.yaw_speed
  737. // #50 was removed
  738. vector(vector v) vectoangles = #51;
  739.  
  740. //
  741. // direct client message generation
  742. //
  743. void(float to, float f) WriteByte = #52;
  744. void(float to, float f) WriteChar = #53;
  745. void(float to, float f) WriteShort = #54;
  746. void(float to, float f) WriteLong = #55;
  747. void(float to, float f) WriteCoord = #56;
  748. void(float to, float f) WriteAngle = #57;
  749. void(float to, string s) WriteString = #58;
  750. void(float to, entity s) WriteEntity = #59;
  751.  
  752. //
  753. // broadcast client message generation
  754. //
  755.  
  756. // void(float f) bWriteByte = #59;
  757. // void(float f) bWriteChar = #60;
  758. // void(float f) bWriteShort = #61;
  759. // void(float f) bWriteLong = #62;
  760. // void(float f) bWriteCoord = #63;
  761. // void(float f) bWriteAngle = #64;
  762. // void(string s) bWriteString = #65;
  763. // void(entity e) bWriteEntity = #66;
  764.  
  765. void(float step) movetogoal = #67;
  766.  
  767. string(string s) precache_file = #68; // no effect except for -copy
  768. void(entity e) makestatic = #69;
  769. void(string s) changelevel = #70;
  770.  
  771. //#71 was removed
  772.  
  773. void(string var, string val) cvar_set = #72; // sets cvar.value
  774.  
  775. void(entity client, string s) centerprint = #73; // sprint, but in middle
  776.  
  777. // The following function definitions allow the engine's builtin
  778. // centerprint function (builtin #73) to be called with different
  779. // numbers of string arguments. The string that will be printed is the
  780. // concatenation of the string arguments.
  781. //
  782. // These definitions work because builtin #73 is implemented in such
  783. // a way that it can accept multiple string arguments in this manner,
  784. // even though the original QuakeC code didn't take advantage of this
  785. // fact. A maximum of seven string arguments can be passed because
  786. // a function is limited to a total of eight arguments (and the first
  787. // argument is the client). Note that in the original engine, all of
  788. // the strings for a centerprint message are concatenated into a single
  789. // 256-char buffer, therefore excessively long messages should be
  790. // avoided. -- iw
  791. //
  792. void(entity client, string s1, string s2) centerprint2 = #73;
  793. void(entity client, string s1, string s2, string s3) centerprint3 = #73;
  794. void(entity client, string s1, string s2, string s3, string s4) centerprint4 = #73;
  795. void(entity client, string s1, string s2, string s3, string s4, string s5) centerprint5 = #73;
  796. void(entity client, string s1, string s2, string s3, string s4, string s5, string s6) centerprint6 = #73;
  797. void(entity client, string s1, string s2, string s3, string s4, string s5, string s6, string s7) centerprint7 = #73;
  798.  
  799. void(vector pos, string samp, float vol, float atten) ambientsound = #74;
  800.  
  801. string(string s) precache_model2 = #75; // registered version only
  802. string(string s) precache_sound2 = #76; // registered version only
  803. string(string s) precache_file2 = #77; // registered version only
  804.  
  805. void(entity e) setspawnparms = #78; // set parm1... to the
  806. // values at level start
  807. // for coop respawn
  808.  
  809. //============================================================================
  810.  
  811. //
  812. // subs.qc
  813. //
  814. void(vector tdest, float tspeed, void() func) SUB_CalcMove;
  815. void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt;
  816. void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove;
  817. void() SUB_CalcMoveDone;
  818. void() SUB_CalcAngleMoveDone;
  819. void() SUB_Null;
  820. void() SUB_UseTargets;
  821. void() SUB_Remove;
  822.  
  823. //
  824. // combat.qc
  825. //
  826. void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
  827.  
  828.  
  829. float (entity e, float healamount, float ignore) T_Heal; // health function
  830.  
  831. float(entity targ, entity inflictor) CanDamage;
  832.  
  833. //
  834. // new_items.qc
  835. //
  836. void(entity theEntity) UpdateAmmoCounts;
  837.  
  838. // sphere.qc
  839. //void(entity ownerEntity) sphere_remove;
  840.  
  841.  
  842.  
  843. void() DummyFunction = //gets rid of the last compiler warnings ; - )
  844. {
  845. local string w;
  846. local float l;
  847. w = self.wad;
  848. l = self.light_lev;
  849. }
  850. .float is_waiting; // Supa, triggers, wait until activated before we can trigger?
  851. .float gravity; //from custdefs.qc by way of Hipnotic
  852. // These are required by the Hipnotic code
  853. //added update stat message
  854. float SVC_UPDATESTAT = 3;
  855. //added total monster message
  856. float STAT_TOTALMONSTERS = 12;
  857.  
  858. //dumptruck_ds from Rogue eod defs
  859.  
  860. //
  861. // elevator fields
  862. //
  863.  
  864. .float elevatorLastUse;
  865. .float elevatorOnFloor;
  866. .float elevatorToFloor;
  867. .vector elevatorDestination;
  868.  
  869. //
  870. // plat2 fields
  871. //
  872. .float plat2Called;
  873. .float plat2LastMove;
  874. .float plat2GoTime;
  875. .float plat2GoTo;
  876. //
  877. // misc pd_additions
  878. //
  879. .float reset_items; //dumptruck_ds
  880. .float spawn_angry; //dumptruck_ds
  881. .string mdl_debris; //dumptruck_ds
  882. .float keep_ammo; //dumptruck_ds
  883. .string obit_name; //dumptruck_ds
  884. .string obit_method; //dumptruck_ds
  885. .float damage_mod; //dumptruck_ds
  886. .float speed_mod;
  887. .float hitscan_range;
  888.  
  889.  
  890. /*============================================================================
  891. johnfitz new defs from Rubicon2
  892. ============================================================================*/
  893. float BREAKABLE_NO_MONSTERS = 1;
  894.  
  895. .float wantedgravity; // thanks Spike!
  896. .float onladder;
  897. //.float ladder_step_finished; //footsteps on ladder no uses -- dumptruck_ds
  898.  
  899. //dumptruck_ds defs for breakables in rubcon2.qc -- thanks to Qmaster and the Arcane Dimensions team
  900. /*
  901. .string break_template1_e;
  902. .string break_template2_e;
  903. .string break_template3_e;
  904. .string break_template4_e;
  905. .string break_template5_e;
  906. .string find_brk_template_model;
  907. */
  908. //from remakequake -- dumptruck_ds
  909.  
  910. .vector dest, dest1, dest2;
  911.  
  912. void(string type, string text) print_self =
  913. {
  914. dprint (type);
  915. dprint (" '");
  916. dprint (self.classname);
  917. dprint ("' ");
  918. dprint (text);
  919. dprint (" at ");
  920. dprint (vtos(self.origin));
  921. dprint ("\n");
  922. };
  923.  
  924. void() monster_pain_use; //dumptruck_ds
  925. void() SUB_UsePain; //dumptruck_ds
  926. .float pain_threshold; //dumptruck_ds
  927. .string pain_target; //dumptruck_ds
  928. .float color; //Hipnotic
  929. .float megahealth_rottime; // dumptruck_ds
  930. .float alpha; // from RennyC func_fall in dtmisc.qc
  931. .float ltrailLastUsed; //from DOE lighnin
  932. .float style2; //c0burn's switchable lights
  933. .float sight_trigger; //dumptruck_ds
  934. .float keep_ammo; //dumptruck_ds
  935. .float berserk; //dumptruck_ds
  936. nosave float *world_sounds; //via Spike fun times! nosave=noclobber
  937. void() trigger_changemusic; // dumptruck_ds
  938. void() onlookat_touch; // dumptruck_ds
  939.  
  940.  
  941. // Drake Cutscenes -- Borrowed from Zerstorer.
  942. .string script; //dhm - denotes which script to read.
  943. .string next_script; //dhm - denotes the current script.
  944. .string script_num; //dhm - number for info_scripts.
  945. //.string camera_point; //dhm - target for camera to move to.
  946. .string focal_point; //dhm - focus point for camera.
  947. .float script_delay; //dhm - time until next script.
  948. .float script_time; //dhm - used for script timing.
  949. .float script_count; //dhm - ditto.
  950. // cutscene.qc - - -
  951. void() Cutscene_Think;
  952. float cutscene; // Set to TRUE during a cutscene.
  953. float mindex_inviso; // Invisible (null sprite)
  954. .string null_string; // Replace 'string_null' with 'world.null_string'.
  955. // null string, nothing should be held here.
  956. // Drake Cutscenes end
  957.  
  958. // from Custents
  959. // variable for healing trigger
  960. .float heal_timer;
  961. .float heal_amount;
  962. .float health_max;
  963. // Constants for the healing trigger
  964. float HEAL_START_ON = 1;
  965. float HEAL_PLAYER_ONLY = 2;
  966. float HEAL_MONSTER_ONLY = 4;
  967.  
  968. // Custom Monster Sounds START -- dumptruck_ds
  969.  
  970. .string snd_death;
  971. .string snd_pain;
  972. .string snd_sight;
  973. .string snd_attack;
  974. .string snd_hit;
  975. .string snd_idle;
  976. .string snd_land;
  977. .string snd_move;
  978. .string snd_misc;
  979. .string snd_misc1;
  980. .string snd_misc2;
  981. .string snd_misc3;
  982.  
  983. // Custom Monster Sounds END -- dumptruck_ds
  984.  
  985. // Custom Model Start -- dumptruck_ds
  986.  
  987. .string mdl_head;
  988. .string mdl_body;
  989. .string mdl_legs; //for Armagon
  990. .string mdl_proj;
  991. .string mdl_proj2;
  992. .string mdl_proj3;
  993. .float skin_head;
  994. .float skin_proj;
  995. .string mdl_gib1;
  996. .string mdl_gib2;
  997. .string mdl_gib3;
  998.  
  999. // Custom Model End -- dumptruck_ds
  1000.  
  1001. .float shardvalue; // ammo shard value
  1002.  
  1003. .float drop_item; // key DropStuff
  1004.  
  1005.  
  1006.  
  1007. //=================================================================================
  1008. //ammo autism to get rid of extra 'weapon' entries and clear up bitflags
  1009. //=================================================================================
  1010.  
  1011. float mjolnir_mode; //unpowered/powered
  1012. //float shotgun_mode; //might add eventually (buckshot / projectile slug with penetration ?)
  1013. //float super_shotgun_mode; //might add eventually (buckshot / high spread AD-style flechettes with bleed DOT ?)
  1014. float nailgun_mode; //nail/lava nail
  1015. float super_nailgun_mode; //nail/lava nail
  1016. float grenade_launcher_mode; //grenade/prox/multi
  1017. float rocket_launcher_mode; //rocket/multi
  1018. float lightning_gun_mode; //lightning/plasma
  1019. //float laser_cannon_mode; //might add eventually (laser / charged 3x plasma shot that bounces and explodes with each impact ?)
  1020. float grapple_mode; //pull/just swing
  1021.  
  1022. //for checking if ammo switch is valid, otherwise mode goes back to 0 (or at least +1 again for grenade launcher)
  1023. float can_mjolnir; // can use powered attack if mjolnir is in inventory AND cells are sufficient
  1024. float can_lava;
  1025. float can_multi;
  1026. float can_prox;
  1027. float can_nade; //needed if proximity gun is acquired before regular grenade launcher
  1028. float can_plasma;
  1029.  
  1030.  
  1031. //jump boot stuff
  1032.  
  1033. .float jboots_got; //JCR super jump defs
  1034. .float jboots_rechargelimit;
  1035. .float jboots_sfx;
  1036. .float jboots_ammo;
  1037. .float jboots_onground;
  1038. .float jboots_finished;
  1039. .float jboots_time;
  1040.  
Add Comment
Please, Sign In to add comment