X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Ffourier.qc;fp=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Ffourier.qc;h=0000000000000000000000000000000000000000;hb=fbd313c7ceb26a09310d8062926f4ac2468623a8;hp=28e0f0f7c74df039f84a7f2d111ca32a634f0844;hpb=15560a4a494efe42e0e5fa69a628eebc11d97fc7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/func/fourier.qc b/qcsrc/common/triggers/func/fourier.qc deleted file mode 100644 index 28e0f0f7c..000000000 --- a/qcsrc/common/triggers/func/fourier.qc +++ /dev/null @@ -1,89 +0,0 @@ -#include "fourier.qh" -#ifdef SVQC -/*QUAKED spawnfunc_func_fourier (0 .5 .8) ? -Brush model that moves in a pattern of added up sine waves, can be used e.g. for circular motions. -netname: list of quadruples, separated by spaces; note that phase 0 represents a sine wave, and phase 0.25 a cosine wave (by default, it uses 1 0 0 0 1, to match func_bobbing's defaults -speed: how long one cycle of frequency multiplier 1 in seconds (default 4) -height: amplitude modifier (default 32) -phase: cycle timing adjustment (0-1 as a fraction of the cycle, default 0) -noise: path/name of looping .wav file to play. -dmg: Do this mutch dmg every .dmgtime intervall when blocked -dmgtime: See above. -*/ - -void func_fourier_controller_think(entity this) -{ - vector v; - float n, i, t; - - this.nextthink = time + 0.1; - if(this.owner.active != ACTIVE_ACTIVE) - { - this.owner.velocity = '0 0 0'; - return; - } - - - n = floor((tokenize_console(this.owner.netname)) / 5); - t = this.nextthink * this.owner.cnt + this.owner.phase * 360; - - v = this.owner.destvec; - - for(i = 0; i < n; ++i) - { - makevectors((t * stof(argv(i*5)) + stof(argv(i*5+1)) * 360) * '0 1 0'); - v = v + ('1 0 0' * stof(argv(i*5+2)) + '0 1 0' * stof(argv(i*5+3)) + '0 0 1' * stof(argv(i*5+4))) * this.owner.height * v_forward_y; - } - - if(this.owner.classname == "func_fourier") // don't brake stuff if the func_fourier was killtarget'ed - // * 10 so it will arrive in 0.1 sec - this.owner.velocity = (v - this.owner.origin) * 10; -} - -spawnfunc(func_fourier) -{ - entity controller; - if (this.noise != "") - { - precache_sound(this.noise); - soundto(MSG_INIT, this, CH_TRIGGER_SINGLE, this.noise, VOL_BASE, ATTEN_IDLE); - } - - if (!this.speed) - this.speed = 4; - if (!this.height) - this.height = 32; - this.destvec = this.origin; - this.cnt = 360 / this.speed; - - setblocked(this, generic_plat_blocked); - if(this.dmg && (this.message == "")) - this.message = " was squished"; - if(this.dmg && (this.message2 == "")) - this.message2 = "was squished by"; - if(this.dmg && (!this.dmgtime)) - this.dmgtime = 0.25; - this.dmgtime2 = time; - - if(this.netname == "") - this.netname = "1 0 0 0 1"; - - if (!InitMovingBrushTrigger(this)) - return; - - this.active = ACTIVE_ACTIVE; - - // wait for targets to spawn - controller = new(func_fourier_controller); - controller.owner = this; - controller.nextthink = time + 1; - setthink(controller, func_fourier_controller_think); - this.nextthink = this.ltime + 999999999; - setthink(this, SUB_NullThink); // for PushMove - - // Savage: Reduce bandwith, critical on e.g. nexdm02 - this.effects |= EF_LOWPRECISION; - - // TODO make a reset function for this one -} -#endif