+#include "button.qh"
#ifdef SVQC
// button and multiple button
}
-void button_blocked()
+void button_blocked(entity this, entity blocker)
{
// do nothing, just don't come all the way back out
}
return;
this.enemy = actor;
- WITHSELF(this, button_fire(this));
+ button_fire(this);
}
-void button_touch(entity this)
+void button_touch(entity this, entity toucher)
{
- if (!other)
+ if (!toucher)
return;
- if (!other.iscreature)
+ if (!toucher.iscreature)
return;
- if(other.velocity * this.movedir < 0)
+ if(toucher.velocity * this.movedir < 0)
return;
- this.enemy = other;
- if (other.owner)
- this.enemy = other.owner;
+ this.enemy = toucher;
+ if (toucher.owner)
+ this.enemy = toucher.owner;
button_fire (this);
}
if (this.health <= 0)
{
this.enemy = damage_attacker;
- WITHSELF(this, button_fire(this));
+ button_fire(this);
}
}
return;
this.effects |= EF_LOWPRECISION;
- this.blocked = button_blocked;
+ setblocked(this, button_blocked);
this.use = button_use;
// if (this.health == 0) // all buttons are now shootable