]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mapobjects/misc/laser.qh
Some more cleanup to map objects, allow trigger_delay and trigger_counter to be deact...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / misc / laser.qh
1 #pragma once
2
3 // a laser goes from origin in direction angles
4 // it has color 'beam_color'
5 // and stops when something is in the way
6 entityclass(Laser);
7 classfield(Laser) .int cnt; // end effect
8 classfield(Laser) .vector colormod;
9 classfield(Laser) .int state; // on-off
10 classfield(Laser) .int count; // flags for the laser
11 classfield(Laser) .vector velocity; // laser endpoint if it is FINITE
12 classfield(Laser) .float alpha;
13 classfield(Laser) .float scale; // scaling factor of the thickness
14 classfield(Laser) .float modelscale; // scaling factor of the dlight
15
16 const int LASER_FINITE = BIT(1);
17 const int LASER_NOTRACE = BIT(2);
18 const int LASER_INVERT_TEAM = BIT(3);
19
20 const int SF_LASER_UPDATE_ORIGIN = BIT(0);
21 const int SF_LASER_UPDATE_TARGET = BIT(1);
22 const int SF_LASER_UPDATE_ACTIVE = BIT(2);
23 const int SF_LASER_UPDATE_EFFECT = BIT(3);
24
25 const int SF_LASER_NOTRACE = BIT(4);
26 const int SF_LASER_SCALE = BIT(5);
27 const int SF_LASER_ALPHA = BIT(6);
28 const int SF_LASER_FINITE = BIT(7);
29
30 .vector beam_color;
31
32 const float LASER_BEAM_MAXLENGTH = 32768; // maximum length of a beam trace
33 // TODO: find a better way to do this
34 const float LASER_BEAM_MAXWORLDSIZE = 1048576; // to make sure the endpoint of the beam is not visible inside