X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Frelay_if.qc;h=728252c70400972a4259b3f49eea02c5100027d2;hb=268f9c69576b6bb929f66d19f0d077d19ba47edd;hp=cadd95e5840abd319b53af727505d19a05cc9cc4;hpb=c89dfaa4d0342b98c320621557973a65114fbdf4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/relay_if.qc b/qcsrc/common/triggers/trigger/relay_if.qc index cadd95e58..728252c70 100644 --- a/qcsrc/common/triggers/trigger/relay_if.qc +++ b/qcsrc/common/triggers/trigger/relay_if.qc @@ -1,20 +1,20 @@ +#include "relay_if.qh" #ifdef SVQC -void trigger_relay_if_use() -{SELFPARAM(); - float n; - n = self.count; +void trigger_relay_if_use(entity this, entity actor, entity trigger) +{ + int n = this.count; // TODO make this generic AND faster than nextent()ing through all, if somehow possible - n = (cvar_string(self.netname) == cvar_string(self.message)); - if(self.spawnflags & 1) + n = (cvar_string(this.netname) == cvar_string(this.message)); + if(this.spawnflags & 1) n = !n; if(n) - SUB_UseTargets(); + SUB_UseTargets(this, actor, trigger); } -void spawnfunc_trigger_relay_if() -{SELFPARAM(); - self.use = trigger_relay_if_use; +spawnfunc(trigger_relay_if) +{ + this.use = trigger_relay_if_use; } #endif