v = wcross_origin - wcross_oldorigin;
v.x /= vid_conwidth;
v.y /= vid_conheight;
- if(vlen(v) > 0.01)
+ if(vdist(v, >, 0.01))
shottype = SHOTTYPE_HITOBSTRUCTION;
}
if(!autocvar_crosshair_hittest_showimpact)
w.solid = SOLID_TRIGGER;
setorigin(w, (m1 + m2) * 0.5);
setsize(w, m1 - w.origin, m2 - w.origin);
- if (vlen(w.size) > 0)
+ if (w.size)
w.wpisbox = true;
if(!w.wpisbox)
}
else
wp.model = "";
- wp.wpisbox = vlen(wp.size) > 0;
+ wp.wpisbox = vdist(wp.size, >, 0);
wp.enemy = NULL;
if (!(wp.wpflags & WAYPOINTFLAG_PERSONAL))
wp.owner = NULL;
float n, m;
n = m = 0;
- while (vlen(c - b) > 1)
+ while (vdist(c - b, >, 1))
{
++m;
// apply push
if (targ.damageforcescale)
- if (vlen(force))
+ if (force)
if (!IS_PLAYER(targ) || time >= targ.spawnshieldtime || targ == attacker)
{
vector farce = damage_explosion_calcpush(targ.damageforcescale * force, targ.velocity, autocvar_g_balance_damagepush_speedfactor);
UpdateCSQCProjectile(targ);
}
// apply damage
- if (damage != 0 || (targ.damageforcescale && vlen(force)))
+ if (damage != 0 || (targ.damageforcescale && force))
if (targ.event_damage)
targ.event_damage (targ, inflictor, attacker, damage, deathtype, hitloc, force);
// print(" finaldmg ", ftos(finaldmg), " force ", vtos(force));
// print(" (", ftos(a), ")\n");
//}
- if(finaldmg || vlen(force))
+ if(finaldmg || force)
{
if(targ.iscreature)
{
// immediately return is bad
// maybe start a shorter countdown?
}
- if(vlen(force) <= 0)
+ if(force == '0 0 0')
return;
if(time > this.pushltime)
if(IS_PLAYER(attacker))
vector wander_point;
wander_point = v_forward - oldpoint;
- if (vlen(wander_point) > tresh)
+ if (vdist(wander_point, >, tresh))
return oldpoint;
range = bound(0,range,1);