Merge branch 'master' into terencehill/bot_waypoints
authorterencehill <piuntn@gmail.com>
Sat, 20 May 2017 12:29:16 +0000 (14:29 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 20 May 2017 12:29:16 +0000 (14:29 +0200)
# Conflicts:
# qcsrc/server/bot/default/navigation.qc
# qcsrc/server/impulse.qc

1  2 
qcsrc/common/triggers/func/ladder.qc
qcsrc/server/bot/default/navigation.qc

Simple merge
@@@ -179,22 -178,6 +179,22 @@@ bool tracewalk(entity e, vector start, 
                                        tracebox(org + jumpstepheightvec, m1, m2, move + jumpstepheightvec, movemode, e);
                                        if (trace_fraction < 1 || trace_startsolid)
                                        {
-                                               FOREACH_ENTITY_CLASS("func_ladder", true,
 +                                              bool ladder_found = false;
++                                              IL_EACH(g_ladders, it.classname == "func_ladder",
 +                                              {
 +                                                      if(boxesoverlap(org + jumpheight_vec + m1 + '-1 -1 -1', org + jumpheight_vec + m2 + '1 1 1', it.absmin, it.absmax))
 +                                                      if(boxesoverlap(end, end2, it.absmin + (m1 - eZ * m1.z - '1 1 0'), it.absmax + (m2 - eZ * m2.z + '1 1 0')))
 +                                                              ladder_found = true; // can't return here ("Loop mutex held by tracewalk" error)
 +                                              });
 +                                              if(ladder_found)
 +                                              {
 +                                                      if(autocvar_bot_debug_tracewalk)
 +                                                              debugnodestatus(end, DEBUG_NODE_SUCCESS);
 +
 +                                                      //print("tracewalk: ", vtos(start), " can reach ", vtos(end), "\n");
 +                                                      return true;
 +                                              }
 +
                                                if(autocvar_bot_debug_tracewalk)
                                                        debugnodestatus(trace_endpos, DEBUG_NODE_WARNING);