CS(this).movement = '0 0 0';
maxspeed = autocvar_sv_maxspeed;
- if (this.goalcurrent.wpflags & WAYPOINTFLAG_CROUCH)
- PHYS_INPUT_BUTTON_CROUCH(this) = true;
- else
- PHYS_INPUT_BUTTON_CROUCH(this) = false;
+ PHYS_INPUT_BUTTON_CROUCH(this) = boolean(this.goalcurrent.wpflags & WAYPOINTFLAG_CROUCH);
PHYS_INPUT_BUTTON_JETPACK(this) = false;
// Jetpack navigation
if(height > jumpheight_vec.z && autocvar_sv_gravity > 0)
{
float height_cost; // fall cost
- if (boolean(from_ent.wpflags & WAYPOINTFLAG_JUMP))
+ if (from_ent.wpflags & WAYPOINTFLAG_JUMP)
height_cost = jumpheight_time + sqrt((height + jumpheight_vec.z) / (autocvar_sv_gravity / 2));
else
height_cost = sqrt(height / (autocvar_sv_gravity / 2));
if (!s)
break;
fl = stof(s);
- if (fl & WAYPOINTFLAG_NORELINK__DEPRECATED)
- fl &= ~WAYPOINTFLAG_NORELINK__DEPRECATED;
+ fl &= ~WAYPOINTFLAG_NORELINK__DEPRECATED;
waypoint_spawn(m1, m2, fl);
if (m1 == m2)
cwp = cwp + 1;