Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
laser.qh
Go to the documentation of this file.
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
7classfield(Laser) .int cnt; // end effect
8classfield(Laser) .vector colormod;
9classfield(Laser) .int state; // on-off
10classfield(Laser) .int count; // flags for the laser
11classfield(Laser) .vector velocity; // laser endpoint if it is FINITE
12classfield(Laser) .float alpha;
13classfield(Laser) .float scale; // scaling factor of the thickness
14classfield(Laser) .float modelscale; // scaling factor of the dlight
15
16const int LASER_FINITE = BIT(1);
17const int LASER_NOTRACE = BIT(2);
18const int LASER_INVERT_TEAM = BIT(3);
19
24
25const int SF_LASER_NOTRACE = BIT(4);
26const int SF_LASER_SCALE = BIT(5);
27const int SF_LASER_ALPHA = BIT(6);
28const int SF_LASER_FINITE = BIT(7);
29
30.vector beam_color;
31
32const float LASER_BEAM_MAXLENGTH = 32768; // maximum length of a beam trace
33// TODO: find a better way to do this
34const float LASER_BEAM_MAXWORLDSIZE = 1048576; // to make sure the endpoint of the beam is not visible inside
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition bits.qh:8
float cnt
Definition powerups.qc:24
vector colormod
Definition powerups.qc:21
float count
Definition powerups.qc:22
float alpha
Definition items.qc:13
vector velocity
int state
const int LASER_NOTRACE
Definition laser.qh:17
const int SF_LASER_NOTRACE
Definition laser.qh:25
const int SF_LASER_FINITE
Definition laser.qh:28
const float LASER_BEAM_MAXLENGTH
Definition laser.qh:32
vector beam_color
Definition laser.qh:30
const float LASER_BEAM_MAXWORLDSIZE
Definition laser.qh:34
const int SF_LASER_UPDATE_EFFECT
Definition laser.qh:23
const int SF_LASER_UPDATE_ACTIVE
Definition laser.qh:22
const int SF_LASER_UPDATE_TARGET
Definition laser.qh:21
const int LASER_FINITE
Definition laser.qh:16
const int SF_LASER_ALPHA
Definition laser.qh:27
const int SF_LASER_UPDATE_ORIGIN
Definition laser.qh:20
const int LASER_INVERT_TEAM
Definition laser.qh:18
const int SF_LASER_SCALE
Definition laser.qh:26
float modelscale
Definition models.qh:3
#define entityclass(...)
Definition oo.qh:52
#define classfield(name)
Definition oo.qh:57
float scale
Definition projectile.qc:14