From: terencehill Date: Tue, 29 Aug 2017 15:39:05 +0000 (+0200) Subject: Merge branch 'master' into terencehill/bot_waypoints X-Git-Tag: xonotic-v0.8.5~2378^2~77 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=98b2c4213abe04f3ec96a95471ba5fe5fe57e008 Merge branch 'master' into terencehill/bot_waypoints # Conflicts: # qcsrc/server/command/sv_cmd.qc # qcsrc/server/impulse.qc --- 98b2c4213abe04f3ec96a95471ba5fe5fe57e008 diff --cc qcsrc/common/triggers/teleporters.qc index 13a0c41d3,8e9936b2e..2ba6e7e3c --- a/qcsrc/common/triggers/teleporters.qc +++ b/qcsrc/common/triggers/teleporters.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 } diff --cc qcsrc/server/bot/default/bot.qc index 878f076a9,f8ddd0c63..f599124db --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@@ -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); diff --cc qcsrc/server/command/sv_cmd.qc index 241a48e5c,2bb0f1365..43ce29160 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@@ -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; } } @@@ -1595,14 -1595,12 +1597,14 @@@ } 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; } }