From: Mario Date: Wed, 25 Apr 2018 12:26:45 +0000 (+1000) Subject: Merge branch 'master' into DefaultUser/trigger_cleanup X-Git-Tag: xonotic-v0.8.5~2176^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0b6694545ba935bbac13c20fc11842ba1850d972;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into DefaultUser/trigger_cleanup # Conflicts: # qcsrc/common/triggers/func/pointparticles.qc # qcsrc/common/triggers/misc/laser.qc # qcsrc/common/triggers/target/music.qc --- 0b6694545ba935bbac13c20fc11842ba1850d972 diff --cc qcsrc/common/triggers/func/pointparticles.qc index 18d3c30e8,e028b4c83..7de5a03ef --- a/qcsrc/common/triggers/func/pointparticles.qc +++ b/qcsrc/common/triggers/func/pointparticles.qc @@@ -149,20 -169,18 +149,20 @@@ spawnfunc(func_sparks .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; diff --cc qcsrc/common/triggers/misc/laser.qc index 12b67c371,b7bdede72..df88b750f --- a/qcsrc/common/triggers/misc/laser.qc +++ b/qcsrc/common/triggers/misc/laser.qc @@@ -292,17 -249,17 +292,17 @@@ spawnfunc(misc_laser #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) { diff --cc qcsrc/common/triggers/target/music.qc index 24951b42b,47977f267..5a63872db --- a/qcsrc/common/triggers/target/music.qc +++ b/qcsrc/common/triggers/target/music.qc @@@ -324,12 -291,11 +317,11 @@@ NET_HANDLE(ENT_CLIENT_TRIGGER_MUSIC, bo 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); } } }