From: Mario Date: Sun, 27 Mar 2016 11:32:48 +0000 (+1000) Subject: Finish off activator (it's unused, so using it doesn't make sense) X-Git-Tag: xonotic-v0.8.2~945^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b5f0b4b23205a054de531e85420a4aefba4029ea;p=xonotic%2Fxonotic-data.pk3dir.git Finish off activator (it's unused, so using it doesn't make sense) --- diff --git a/qcsrc/common/triggers/subs.qh b/qcsrc/common/triggers/subs.qh index 557bc8621..8c62a01c5 100644 --- a/qcsrc/common/triggers/subs.qh +++ b/qcsrc/common/triggers/subs.qh @@ -58,7 +58,7 @@ void SUB_VanishOrRemove (entity ent); .string platmovetype; .float platmovetype_start, platmovetype_end; -entity activator; +//entity activator; .string killtarget; diff --git a/qcsrc/common/triggers/target/spawn.qc b/qcsrc/common/triggers/target/spawn.qc index 3a8eb7b36..f02b29625 100644 --- a/qcsrc/common/triggers/target/spawn.qc +++ b/qcsrc/common/triggers/target/spawn.qc @@ -37,7 +37,6 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti string key, value, valuefield, valueoffset, valueoffsetrandom; entity valueent; vector data, data2; - entity oldactivator; n = tokenize_console(msg); @@ -218,11 +217,7 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti value = strcat("target_spawn_helper", value); putentityfieldstring(target_spawn_spawnfunc_field, e, value); - oldactivator = activator; - - activator = act; WITHSELF(e, e.target_spawn_spawnfunc(e)); - activator = oldactivator; // We called an external function, so we have to re-tokenize msg. n = tokenize_console(msg); @@ -286,7 +281,7 @@ void target_spawn_use(entity this, entity actor, entity trigger) else if(this.target == "*activator") { // edit entity - if(activator) + if(actor) target_spawn_useon(actor, this, actor, trigger); } else diff --git a/qcsrc/common/triggers/trigger/keylock.qc b/qcsrc/common/triggers/trigger/keylock.qc index 5b24b1b63..cc45e2490 100644 --- a/qcsrc/common/triggers/trigger/keylock.qc +++ b/qcsrc/common/triggers/trigger/keylock.qc @@ -1,11 +1,11 @@ /** * trigger given targets */ -void trigger_keylock_trigger(string s) -{SELFPARAM(); +void trigger_keylock_trigger(entity this, entity actor, string s) +{ for(entity t = world; (t = find(t, targetname, s)); ) if(t.use1) - t.use1(t, NULL, this); + t.use1(t, actor, this); } /** @@ -31,8 +31,6 @@ void trigger_keylock_touch() if(self.itemkeys) key_used = item_keys_usekey(self, other); - activator = other; - if(self.itemkeys) { #ifdef SVQC @@ -57,7 +55,7 @@ void trigger_keylock_touch() if(self.delay <= time || started_delay == true) if(self.target2) { - trigger_keylock_trigger(self.target2); + trigger_keylock_trigger(this, other, self.target2); started_delay = true; self.delay = time + self.wait; } @@ -71,7 +69,7 @@ void trigger_keylock_touch() #endif if(self.target) - trigger_keylock_trigger(self.target); + trigger_keylock_trigger(this, other, self.target); if(self.killtarget) trigger_keylock_kill(self.killtarget);