float PUSH_SILENT = 2;
.float pushltime;
+.float istypefrag;
.float height;
void() SUB_UseTargets;
other.flags &~= FL_ONGROUND;
- if (other.classname == "player")
+ if (IS_PLAYER(other))
{
// reset tracking of oldvelocity for impact damage (sudden velocity changes)
other.oldvelocity = other.velocity;
sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
self.pushltime = time + 0.2;
}
- float ct;
- ct = clienttype(other);
- if( ct == CLIENTTYPE_REAL || ct == CLIENTTYPE_BOT)
+ if(IS_REAL_CLIENT(other) || IS_BOT_CLIENT(other))
{
float i;
float found;
other.jumppadcount = other.jumppadcount + 1;
}
- if(ct == CLIENTTYPE_REAL)
+ if(IS_REAL_CLIENT(other))
{
if(self.message)
centerprint(other, self.message);
else
other.lastteleporttime = time;
- if (!other.animstate_override)
- {
- if (other.crouch)
- setanim(other, other.anim_duckjump, FALSE, TRUE, TRUE);
- else
- setanim(other, other.anim_jump, FALSE, TRUE, TRUE);
- }
+ if (other.deadflag == DEAD_NO)
+ animdecide_setaction(other, ANIMACTION_JUMP, TRUE);
}
else
other.jumppadcount = TRUE;
// reset tracking of who pushed you into a hazard (for kill credit)
other.pushltime = 0;
+ other.istypefrag = 0;
}
if(self.enemy.target)
if (self.spawnflags & PUSH_ONCE)
{
- self.touch = SUB_Null;
+ self.touch = func_null;
self.think = SUB_Remove;
self.nextthink = time;
}
else if(n == 1)
{
// exactly one dest - bots love that
- self.enemy = find(e, targetname, self.target);
+ self.enemy = find(world, targetname, self.target);
}
else
{