void button_use()
{
-// if (activator.classname != "player")
-// {
-// dprint(activator.classname);
-// dprint(" triggered a button\n");
-// }
-
if not (self.active == ACTIVE_ACTIVE)
return;
void button_touch()
{
-// if (activator.classname != "player")
-// {
-// dprint(activator.classname);
-// dprint(" touched a button\n");
-// }
if (!other)
return;
if not(other.iscreature)
self.health = self.health - damage;
if (self.health <= 0)
{
- // if (activator.classname != "player")
- // {
- // dprint(activator.classname);
- // dprint(" killed a button\n");
- // }
self.enemy = damage_attacker;
button_fire ();
}
// this door require a key
// only a player can have a key
- if (other.classname != "player")
+ if not(IS_PLAYER(other))
return FALSE;
if (item_keys_usekey(door, other)) {
*/
void door_touch()
{
- if(other.classname != "player")
+ if not(IS_PLAYER(other))
return;
if (self.owner.attack_finished_single > time)
return;
if (!(self.owner.dmg) && (self.owner.message != ""))
{
- if (other.flags & FL_CLIENT)
+ if (IS_CLIENT(other))
centerprint (other, self.owner.message);
play2(other, "misc/talk.wav");
}
if (self.message)
{
- if (other.flags & FL_CLIENT)
+ if (IS_CLIENT(other))
centerprint (other, self.message);
play2(other, "misc/talk.wav");
}
for(e = world; (e = findentity(e, conveyor, self)); )
{
- if(e.flags & FL_CLIENT) // doing it via velocity has quite some advantages
+ if(IS_CLIENT(e)) // doing it via velocity has quite some advantages
continue; // done in SV_PlayerPhysics
setorigin(e, e.origin + self.movedir * sys_frametime);