head.totalfrags_lastcheck = head.totalfrags;
}
+void bot_calculate_stepheightvec(void)
+{
+ stepheightvec = autocvar_sv_stepheight * '0 0 1';
+ jumpstepheightvec = stepheightvec +
+ ((autocvar_sv_jumpvelocity * autocvar_sv_jumpvelocity) / (2 * autocvar_sv_gravity)) * '0 0 0.85';
+ // 0.75 factor is for safety to make the jumps easy
+}
+
void bot_serverframe()
{
float realplayers, bots, activerealplayers;
if (time < 2)
return;
- stepheightvec = autocvar_sv_stepheight * '0 0 1';
+ bot_calculate_stepheightvec();
bot_navigation_movemode = ((autocvar_bot_navigation_ignoreplayers) ? MOVE_NOMONSTERS : MOVE_NORMAL);
if(time > autoskill_nextthink)
localcmd("quit\n");
}
- if (currentbots > 0 || autocvar_g_waypointeditor)
+ if (currentbots > 0 || autocvar_g_waypointeditor || autocvar_g_waypointeditor_auto)
if (botframe_spawnedwaypoints)
{
if(botframe_cachedwaypointlinks)
if (autocvar_g_waypointeditor)
botframe_showwaypointlinks();
+ if (autocvar_g_waypointeditor_auto)
+ botframe_autowaypoints();
+
if(time > bot_cvar_nextthink)
{
if(currentbots>0)