| |
| | Quake Zone - MOD Tutorials |
 | | Firstly, alter the defintion of the procedure itself as follows: |
 | | void fire_lightning (edict_t *self, vec3_t start, vec3_t aimdir, vec3_t aimend, int dirtype, int damage) // PJT - aimend and dirtype added /* PJT if dirtype = 0, use aimdir (fire direction) to calculate end point if dirtype = 1, use aimend (end point) as end point of lightning */ |
 | | // PJT - end point calculated from direction of fire if (dirtype == 0) { vectoangles2 (aimdir, dir); AngleVectors (dir, forward, right, up); VectorMA (start, 8192, forward, end); } else // PJT - end point passed as parameter VectorCopy (aimend, end); // PJT |
| www.users.globalnet.co.uk /~thompp/Quake2/q2tut09.html (1635 words) |
|