12 sendflags = sendflags & 0x0F;
19 if(this.
mins !=
'0 0 0' || this.
maxs !=
'0 0 0')
36 if(this.
model !=
"null")
72 if(this.bgmscript !=
"")
95 if(this.
model !=
"") { precache_model(this.
model); _setmodel(
this, this.
model); }
97 if(this.
mdl !=
"") this.
cnt = 0;
99 if(!this.bgmscriptsustain) this.bgmscriptsustain = 1;
100 else if(this.bgmscriptsustain < 0) this.bgmscriptsustain = 0;
111 setsize(
this,
'0 0 0', this.
maxs - this.
mins);
142 this.
mdl =
"TE_SPARK";
145 spawnfunc_func_pointparticles(
this);
164const int ABSOLUTE_ONLY_SPAWN_AT_TOGGLE = 2;
166void Draw_PointParticles(
entity this)
175 if(this.absolute == ABSOLUTE_ONLY_SPAWN_AT_TOGGLE)
178 n = this.just_toggled ? this.
impulse : 0;
185 if(this.just_toggled)
192 for(i =
random(); i <= n && fail <= 64*n; ++i)
208 eff_num = _particleeffectnum(this.
mdl);
217 eff_num = _particleeffectnum(this.
mdl);
225 this.just_toggled = 0;
227 else if(this.absolute)
236void Ent_PointParticles_Remove(
entity this)
243NET_HANDLE(ENT_CLIENT_POINTPARTICLES,
bool isnew)
252 this.just_toggled = 1;
277 this.mins = this.
maxs =
'0 0 0';
280 this.
cnt = ReadShort();
309 if(this.bgmscript !=
"")
311 this.bgmscriptattack =
ReadByte() / 64.0;
312 this.bgmscriptdecay =
ReadByte() / 64.0;
313 this.bgmscriptsustain =
ReadByte() / 255.0;
314 this.bgmscriptrelease =
ReadByte() / 64.0;
323 this.absolute = (this.
impulse >= 0);
326 v = this.
maxs - this.mins;
327 this.
impulse *= -v.x * v.y * v.z / (64**3);
332 this.absolute = ABSOLUTE_ONLY_SPAWN_AT_TOGGLE;
334 setorigin(
this, this.
origin);
335 setsize(
this, this.mins, this.
maxs);
337 this.draw = Draw_PointParticles;
339 this.entremove = Ent_PointParticles_Remove;
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void BGMScript_InitEntity(entity e)
float doBGMScript(entity e)
IntrusiveList g_drawables
float compressShortVector(vector vec)
vector decompressShortVector(int data)
vector trace_plane_normal
const int SF_TRIGGER_RESET
const int SF_TRIGGER_INIT
const int SF_TRIGGER_UPDATE
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define NET_HANDLE(id, param)
#define WriteHeader(to, id)
#define REGISTER_NET_LINKED(id)
void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
float WarpZoneLib_BoxTouchesBrush(vector mi, vector ma, entity e, entity ig)
void pointparticles_think(entity this)
bool pointparticles_SendEntity(entity this, entity to, float sendflags)
const int PARTICLES_VISCULLING
const int SF_POINTPARTICLES_IMPULSE
const int PARTICLES_IMPULSE
const int SF_POINTPARTICLES_BOUNDS
const int SF_POINTPARTICLES_MOVING
const int SF_POINTPARTICLES_JITTER_AND_COUNT
#define _sound(e, c, s, v, a)
void generic_netlinked_reset(entity this)
void generic_netlinked_legacy_use(entity this, entity actor, entity trigger)
void generic_netlinked_setactive(entity this, int act)