X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Fvectormamamam.qc;h=951a740a2024675371cd2e35412f8887adfe188e;hb=42d51a516d5741c23c505a46b6e94bd806b04def;hp=eb7a5428bc38b2ce0b41719d5886b3a1e6085e5f;hpb=daab9330abb8952053b47239d1322cd029b08cd1;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/func/vectormamamam.qc b/qcsrc/common/triggers/func/vectormamamam.qc index eb7a5428b..951a740a2 100644 --- a/qcsrc/common/triggers/func/vectormamamam.qc +++ b/qcsrc/common/triggers/func/vectormamamam.qc @@ -1,3 +1,4 @@ +#include "vectormamamam.qh" #ifdef SVQC // reusing some fields havocbots declared .entity wp00, wp01, wp02, wp03; @@ -57,36 +58,36 @@ vector func_vectormamamam_origin(entity o, float t) return v; } -void func_vectormamamam_controller_think() -{SELFPARAM(); - self.nextthink = time + 0.1; +void func_vectormamamam_controller_think(entity this) +{ + this.nextthink = time + 0.1; - if(self.owner.active != ACTIVE_ACTIVE) + if(this.owner.active != ACTIVE_ACTIVE) { - self.owner.velocity = '0 0 0'; + this.owner.velocity = '0 0 0'; return; } - if(self.owner.classname == "func_vectormamamam") // don't brake stuff if the func_vectormamamam was killtarget'ed - self.owner.velocity = (self.owner.destvec + func_vectormamamam_origin(self.owner, 0.1) - self.owner.origin) * 10; + if(this.owner.classname == "func_vectormamamam") // don't brake stuff if the func_vectormamamam was killtarget'ed + this.owner.velocity = (this.owner.destvec + func_vectormamamam_origin(this.owner, 0.1) - this.owner.origin) * 10; } void func_vectormamamam_findtarget(entity this) { if(this.target != "") - this.wp00 = find(world, targetname, this.target); + this.wp00 = find(NULL, targetname, this.target); if(this.target2 != "") - this.wp01 = find(world, targetname, this.target2); + this.wp01 = find(NULL, targetname, this.target2); if(this.target3 != "") - this.wp02 = find(world, targetname, this.target3); + this.wp02 = find(NULL, targetname, this.target3); if(this.target4 != "") - this.wp03 = find(world, targetname, this.target4); + this.wp03 = find(NULL, targetname, this.target4); if(!this.wp00 && !this.wp01 && !this.wp02 && !this.wp03) - objerror("No reference entity found, so there is nothing to move. Aborting."); + objerror(this, "No reference entity found, so there is nothing to move. Aborting."); this.destvec = this.origin - func_vectormamamam_origin(this, 0); @@ -117,19 +118,19 @@ spawnfunc(func_vectormamamam) if(!this.target4factor) this.target4factor = 1; - if(vlen(this.targetnormal)) + if(this.targetnormal) this.targetnormal = normalize(this.targetnormal); - if(vlen(this.target2normal)) + if(this.target2normal) this.target2normal = normalize(this.target2normal); - if(vlen(this.target3normal)) + if(this.target3normal) this.target3normal = normalize(this.target3normal); - if(vlen(this.target4normal)) + if(this.target4normal) this.target4normal = normalize(this.target4normal); - this.blocked = generic_plat_blocked; + setblocked(this, generic_plat_blocked); if(this.dmg && (this.message == "")) this.message = " was squished"; if(this.dmg && (this.message == "")) @@ -145,8 +146,8 @@ spawnfunc(func_vectormamamam) return; // wait for targets to spawn - this.SUB_NEXTTHINK = this.SUB_LTIME + 999999999; - this.SUB_THINK = SUB_NullThink; // for PushMove + this.nextthink = this.ltime + 999999999; + setthink(this, SUB_NullThink); // for PushMove // Savage: Reduce bandwith, critical on e.g. nexdm02 this.effects |= EF_LOWPRECISION;