.int dphitcontentsmask;
entityclass(PointParticles);
- class(PointParticles) .int cnt; // effect number
- class(PointParticles) .vector velocity; // particle velocity
- class(PointParticles) .float waterlevel; // direction jitter
- class(PointParticles) .int count; // count multiplier
- class(PointParticles) .int impulse; // density
- class(PointParticles) .string noise; // sound
- class(PointParticles) .float atten;
- class(PointParticles) .float volume;
- class(PointParticles) .int absolute; // 1 = count per second is absolute, ABSOLUTE_ONLY_SPAWN_AT_TOGGLE = only spawn at toggle
- class(PointParticles) .vector movedir; // trace direction
- class(PointParticles) .float glow_color; // palette index
+ classfield(PointParticles) .int cnt; // effect number
+ classfield(PointParticles) .vector velocity; // particle velocity
+ classfield(PointParticles) .float waterlevel; // direction jitter
+ classfield(PointParticles) .int count; // count multiplier
+ classfield(PointParticles) .int impulse; // density
+ classfield(PointParticles) .string noise; // sound
+ classfield(PointParticles) .float atten;
+ classfield(PointParticles) .float volume;
-classfield(PointParticles) .float absolute; // 1 = count per second is absolute, 2 = only spawn at toggle
++classfield(PointParticles) .float absolute; // 1 = count per second is absolute, ABSOLUTE_ONLY_SPAWN_AT_TOGGLE = only spawn at toggle
+ classfield(PointParticles) .vector movedir; // trace direction
+ classfield(PointParticles) .float glow_color; // palette index
+const int ABSOLUTE_ONLY_SPAWN_AT_TOGGLE = 2;
+
void Draw_PointParticles(entity this)
{
float n, i, fail;
#elif defined(CSQC)
// a laser goes from origin in direction angles
-// it has color 'colormod'
+// it has color 'beam_color'
// and stops when something is in the way
entityclass(Laser);
- class(Laser) .int cnt; // end effect
- class(Laser) .vector beam_color;
- class(Laser) .int active; // on-off
- class(Laser) .int count; // flags for the laser
- class(Laser) .vector velocity; // laser endpoint if it is FINITE
- class(Laser) .float alpha;
- class(Laser) .float scale; // scaling factor of the thickness
- class(Laser) .float modelscale; // scaling factor of the dlight
+ classfield(Laser) .int cnt; // end effect
+ classfield(Laser) .vector colormod;
+ classfield(Laser) .int state; // on-off
+ classfield(Laser) .int count; // flags for the laser
-classfield(Laser) .vector velocity;
++classfield(Laser) .vector velocity; // laser endpoint if it is FINITE
+ classfield(Laser) .float alpha;
+ classfield(Laser) .float scale; // scaling factor of the thickness
+ classfield(Laser) .float modelscale; // scaling factor of the dlight
void Draw_Laser(entity this)
{
if(this.noise != s)
{
precache_sound(this.noise);
- _sound(this, CH_BGM_SINGLE, this.noise, 0, ATTEN_NONE);
+ sound7(this, CH_BGM_SINGLE, this.noise, 0, ATTEN_NONE, 0, BIT(4));
if(getsoundtime(this, CH_BGM_SINGLE) < 0)
{
- LOG_TRACEF("Cannot initialize sound %s", this.noise);
+ LOG_WARNF("Cannot initialize sound %s", this.noise);
- strunzone(this.noise);
- this.noise = string_null;
+ strfree(this.noise);
}
}
}