From: terencehill Date: Thu, 22 Aug 2019 00:56:40 +0000 (+0200) Subject: Small cleanups X-Git-Tag: xonotic-v0.8.5~1356^2~2 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=994a4288f31059c8c25d534e9d59d394ccabc9bc;p=xonotic%2Fxonotic-data.pk3dir.git Small cleanups --- diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 10bab67f0..6f257a9ca 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -441,10 +441,7 @@ void havocbot_movetogoal(entity this) 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 diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index b282f258e..ee847bc6d 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -1024,7 +1024,7 @@ float waypoint_gettravelcost(vector from, vector to, entity from_ent, entity to_ 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)); @@ -1839,8 +1839,7 @@ float waypoint_loadall() 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;