Merge branch 'master' into terencehill/bot_waypoints
authorterencehill <piuntn@gmail.com>
Tue, 29 Aug 2017 15:39:05 +0000 (17:39 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 29 Aug 2017 15:39:05 +0000 (17:39 +0200)
# Conflicts:
# qcsrc/server/command/sv_cmd.qc
# qcsrc/server/impulse.qc

1  2 
qcsrc/common/triggers/teleporters.qc
qcsrc/server/bot/default/bot.qc
qcsrc/server/bot/default/waypoints.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/sv_main.qc

@@@ -235,15 -235,9 +235,15 @@@ void teleport_findtarget(entity this
                ++n;
  #ifdef SVQC
                if(e.move_movetype == MOVETYPE_NONE)
 -                      waypoint_spawnforteleporter(this, e.origin, 0);
 +              {
 +                      entity tracetest_ent = spawn();
 +                      setsize(tracetest_ent, PL_MIN_CONST, PL_MAX_CONST);
 +                      tracetest_ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
 +                      waypoint_spawnforteleporter(this, e.origin, 0, tracetest_ent);
 +                      delete(tracetest_ent);
 +              }
                if(e.classname != "info_teleport_destination")
-                       LOG_INFO("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
+                       LOG_INFO("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.");
  #endif
        }
  
@@@ -684,21 -694,11 +693,24 @@@ void bot_serverframe(
                return;
  
        if (time < 2)
+       {
+               currentbots = -1;
                return;
+       }
  
 +      if(autocvar_skill != skill)
 +      {
 +              float wpcost_update = false;
 +              if(skill >= autocvar_bot_ai_bunnyhop_skilloffset && autocvar_skill < autocvar_bot_ai_bunnyhop_skilloffset)
 +                      wpcost_update = true;
 +              if(skill < autocvar_bot_ai_bunnyhop_skilloffset && autocvar_skill >= autocvar_bot_ai_bunnyhop_skilloffset)
 +                      wpcost_update = true;
 +
 +              skill = autocvar_skill;
 +              if (wpcost_update)
 +                      waypoint_updatecost_foralllinks();
 +      }
 +
        bot_calculate_stepheightvec();
        bot_navigation_movemode = ((autocvar_bot_navigation_ignoreplayers) ? MOVE_NOMONSTERS : MOVE_NORMAL);
  
Simple merge
@@@ -1566,13 -1568,11 +1568,13 @@@ void GameCommand_trace(float request, f
  
                                case "walk":
                                {
 -                                      if (argc == 4)
 +                                      if (argc == 4 || argc == 5)
                                        {
                                                e = nextent(NULL);
 -                                              if (tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), MOVE_NORMAL)) LOG_INFO("can walk");
 -                                              else LOG_INFO("cannot walk");
 +                                              if (tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), stof(argv(4)), MOVE_NORMAL))
-                                                       LOG_INFO("can walk\n");
++                                                      LOG_INFO("can walk");
 +                                              else
-                                                       LOG_INFO("cannot walk\n");
++                                                      LOG_INFO("cannot walk");
                                                return;
                                        }
                                }
                }
  
                default:
-                       LOG_INFO("Incorrect parameters for ^2trace^7\n");
+                       LOG_INFO("Incorrect parameters for ^2trace^7");
                case CMD_REQUEST_USAGE:
                {
-                       LOG_INFO("\nUsage:^3 sv_cmd trace command [startpos endpos] [endpos_height]\n");
-                       LOG_INFO("  Where startpos and endpos are parameters for 'walk' and 'showline' commands,\n");
-                       LOG_INFO("  'endpos_height' is an optional parameter for 'walk' command,\n");
-                       LOG_INFO("  Full list of commands here: \"debug, debug2, walk, showline.\"\n");
-                       LOG_INFO("See also: ^2bbox, gettaginfo^7\n");
 -                      LOG_INFO("Usage:^3 sv_cmd trace command (startpos endpos)");
++                      LOG_INFO("Usage:^3 sv_cmd trace command [startpos endpos] [endpos_height]");
++                      LOG_INFO("  Where startpos and endpos are parameters for 'walk' and 'showline' commands,");
++                      LOG_INFO("  'endpos_height' is an optional parameter for 'walk' command,");
+                       LOG_INFO("  Full list of commands here: \"debug, debug2, walk, showline.\"");
+                       LOG_INFO("See also: ^2bbox, gettaginfo^7");
                        return;
                }
        }
Simple merge