*/
void SUB_UseTargets()
{SELFPARAM();
- entity t, stemp, otemp, act;
+ entity t, otemp, act;
string s;
float i;
// fire targets
//
act = activator;
- stemp = self;
otemp = other;
- if(stemp.target_random)
+ if(this.target_random)
RandomSelection_Init();
for(i = 0; i < 4; ++i)
switch(i)
{
default:
- case 0: s = stemp.target; break;
- case 1: s = stemp.target2; break;
- case 2: s = stemp.target3; break;
- case 3: s = stemp.target4; break;
+ case 0: s = this.target; break;
+ case 1: s = this.target2; break;
+ case 2: s = this.target3; break;
+ case 3: s = this.target4; break;
}
if (s != "")
{
for(t = world; (t = find(t, targetname, s)); )
if(t.use)
{
- if(stemp.target_random)
+ if(this.target_random)
{
RandomSelection_Add(t, 0, string_null, 1, 0);
}
{
if (t.classname == "func_clientwall" || t.classname == "func_clientillusionary")
t.antiwall_flag = aw_flag;
- self = t;
- other = stemp;
+ setself(t);
+ other = this;
activator = act;
self.use();
}
}
}
- if(stemp.target_random && RandomSelection_chosen_ent)
+ if(this.target_random && RandomSelection_chosen_ent)
{
- self = RandomSelection_chosen_ent;
- other = stemp;
+ setself(RandomSelection_chosen_ent);
+ other = this;
activator = act;
self.use();
}
activator = act;
- self = stemp;
+ setself(this);
other = otemp;
}